:root {
  color-scheme: light;
  --bg: #eef2f5;
  --surface: #ffffff;
  --ink: #111318;
  --muted: #667085;
  --line: #d9e0e7;
  --nav: rgba(255, 255, 255, 0.94);
  --accent: #101828;
  --blue: #1d9bf0;
  --green: #00a676;
  --rose: #f04462;
  --yellow: #f3b61f;
  --violet: #8b5cf6;
  --shadow: 0 18px 55px rgba(33, 40, 52, 0.18);
  --bottom-system-safe: env(safe-area-inset-bottom, 0px);
  --bottom-viewport-overlay: 0px;
  --bottom-app-safe: calc(var(--bottom-system-safe) + var(--bottom-viewport-overlay));
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 20% 8%, rgba(29, 155, 240, 0.14), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(240, 68, 98, 0.12), transparent 24%),
    linear-gradient(135deg, #f7f8fa, var(--bg));
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: min(100vw, 458px);
  height: min(100vh, 900px);
  height: min(100dvh, 900px);
  min-height: 720px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.top-bar {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 58px;
  padding: 18px 18px 14px;
  background: rgba(255, 255, 255, 0.96);
}

.top-bar > div {
  min-width: 0;
}

body[data-page="wall"] .top-bar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  min-height: 66px;
  padding: 22px 18px 16px;
  background: linear-gradient(180deg, rgba(5, 7, 10, 0.34), rgba(5, 7, 10, 0));
  color: #fff;
  pointer-events: none;
}

body[data-page="wall"] .top-bar h1 {
  color: #fff;
  text-shadow: 0 8px 24px rgba(5, 7, 10, 0.36);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  overflow: hidden;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  font-weight: 870;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

.icon-button,
.nav-item,
.action-tile,
.text-button,
.wall-mode-button {
  border: 0;
  background: transparent;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f2f5f8;
  color: var(--ink);
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.category-strip {
  position: sticky;
  top: 58px;
  z-index: 9;
  display: none;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 18px 12px;
  background: rgba(255, 255, 255, 0.96);
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.category-strip.is-dragging,
.quick-filters.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.category-strip::-webkit-scrollbar,
.page::-webkit-scrollbar,
.quick-filters::-webkit-scrollbar {
  display: none;
}

.category-chip,
.filter-chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #263241;
  background: #fff;
  font-size: 13px;
  font-weight: 650;
  cursor: inherit;
}

.category-chip.is-active,
.filter-chip.is-active {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}

.page {
  display: none;
  height: calc(100% - 58px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 8px 14px calc(126px + var(--bottom-app-safe));
  scroll-padding-bottom: calc(126px + var(--bottom-app-safe));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.page.is-active {
  display: block;
}

.profile-collection-feed,
.pin-panel,
.wall-control-panel,
.editor-panel,
.wave-panel,
.wave-sheet,
.lightmusic-panel,
.lightmusic-window,
.audio-library-list,
.wave-frame-picker,
.lightmusic-content {
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

#libraryPage {
  overflow: hidden;
  padding-bottom: 0;
}

#libraryPage.is-active {
  display: flex;
  flex-direction: column;
}

#homePage {
  height: calc(100% - 58px);
}

#wallPage {
  height: calc(100% - 58px);
  overflow: hidden;
  padding: 0;
}

body[data-page="wall"] #wallPage {
  height: 100%;
}

#wallPage.is-active {
  display: block;
}

.wave-player-feed {
  height: 100%;
  min-height: 0;
}

.wave-player {
  --wave-mix-panel-height: 150px;
  --wave-mix-panel-bottom: calc(112px + var(--bottom-app-safe));
  --wave-mix-content-gap: 10px;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 84px 18px calc(var(--wave-mix-panel-bottom) + var(--wave-mix-panel-height) + var(--wave-mix-content-gap));
  border-radius: 0 0 26px 26px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(8, 11, 18, 0.58) 48%, #05070a 100%),
    #0b1019;
}

.wave-player::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(244, 63, 94, 0.62), rgba(20, 184, 166, 0.38) 52%, rgba(251, 191, 36, 0.45));
  mix-blend-mode: screen;
  opacity: 0.7;
}

.wave-player-bg {
  position: absolute;
  inset: -28px;
  z-index: -2;
  width: calc(100% + 56px);
  height: calc(100% + 56px);
  object-fit: cover;
  filter: blur(28px) saturate(1.22) brightness(0.58);
  transform: scale(1.08);
}

.wave-player-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
}

.wave-player-chip,
.wave-player-total {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 800;
}

.wave-player-chip {
  max-width: 70%;
  padding: 0 13px;
  color: #101828;
  background: #ffd84d;
  box-shadow: 0 8px 24px rgba(5, 7, 10, 0.22);
}

.wave-player-total {
  color: rgba(255, 255, 255, 0.78);
}

.wave-player-title {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 14px;
  max-height: 150px;
  overflow: hidden;
  color: #fff;
  font-size: 48px;
  line-height: 0.98;
  font-weight: 900;
  text-shadow: 0 9px 32px rgba(5, 7, 10, 0.34);
  text-align: center;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.wave-player-cover {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(70vw, 286px);
  max-width: calc(100% - 18px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 22px 48px rgba(5, 7, 10, 0.38);
}

.wave-player-cover:focus-visible,
.wave-player-round:focus-visible,
.wave-player-now:focus-visible,
.wave-mix-card:focus-visible,
.lightmusic-mode:focus-visible,
.lightmusic-activate-button:focus-visible {
  outline: 3px solid rgba(255, 216, 77, 0.62);
  outline-offset: 3px;
}

.wave-player-picture {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: inherit;
  aspect-ratio: 3 / 4;
}

.wave-player-picture.pixel-picture::after {
  display: none;
}

.wave-player-controls {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 18px 0 0;
}

.wave-player-round,
.wave-player-now {
  min-height: 54px;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
  box-shadow: 0 12px 32px rgba(5, 7, 10, 0.24);
  backdrop-filter: blur(18px);
}

.wave-player-round {
  display: grid;
  place-items: center;
  width: 54px;
  border-radius: 50%;
}

.wave-player-round svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.5;
}

.wave-player-next svg {
  width: 19px;
  height: 19px;
}

.wave-player-next:disabled {
  opacity: 0.45;
}

.wave-player-round.is-active {
  color: #ff4f7a;
  background: rgba(255, 255, 255, 0.94);
}

.wave-player-now {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 18px;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 870;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-player-volume {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 12px 0 0;
  padding: 10px 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 12px 32px rgba(5, 7, 10, 0.18);
  backdrop-filter: blur(18px);
}

.wave-player-volume-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
}

.wave-player-volume-header strong,
.wave-player-volume-header output {
  font-weight: 850;
}

.wave-player-volume-header output {
  color: rgba(255, 255, 255, 0.78);
}

.wave-player-volume input {
  width: 100%;
  height: 42px;
  margin: -10px 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.wave-player-volume input::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 4px;
  background:
    linear-gradient(
      90deg,
      #ffd84d 0 var(--wave-volume),
      rgba(255, 255, 255, 0.24) var(--wave-volume) 100%
    );
}

.wave-player-volume input::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -7.5px;
  appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #ffd84d;
  box-shadow: 0 5px 14px rgba(5, 7, 10, 0.3);
}

.wave-player-volume input::-moz-range-track {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.24);
}

.wave-player-volume input::-moz-range-progress {
  height: 7px;
  border-radius: 4px;
  background: #ffd84d;
}

.wave-player-volume input::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #ffd84d;
  box-shadow: 0 5px 14px rgba(5, 7, 10, 0.3);
}

.wave-mix-strip {
  --wave-mix-card-width: 142px;
  --wave-mix-edge-padding: 18px;
  position: absolute;
  right: 0;
  bottom: var(--wave-mix-panel-bottom);
  left: 0;
  z-index: 1;
  display: flex;
  align-items: stretch;
  gap: 12px;
  height: var(--wave-mix-panel-height);
  margin: 0;
  padding: 8px 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.wave-mix-strip::before,
.wave-mix-strip::after {
  content: "";
  flex: 0 0 max(0px, calc((100% - var(--wave-mix-card-width)) / 2 - var(--wave-mix-edge-padding)));
}

.wave-mix-strip::-webkit-scrollbar {
  display: none;
}

.wave-mix-card {
  position: relative;
  flex: 0 0 var(--wave-mix-card-width);
  height: 100%;
  overflow: hidden;
  padding: 0 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: #fff;
  background: #111827;
  text-align: center;
  box-shadow: 0 14px 34px rgba(5, 7, 10, 0.28);
}

.wave-mix-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.88);
  transform: scale(1.02);
}

.wave-mix-glow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.72)),
    linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(244, 63, 94, 0.22));
}

.wave-mix-card strong,
.wave-mix-card span:last-child {
  position: relative;
  z-index: 1;
  display: block;
}

.wave-mix-card strong {
  margin-top: 74px;
  font-size: 14px;
  line-height: 1.08;
  font-weight: 900;
}

.wave-mix-card span:last-child {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 760;
}

.wave-mix-card.is-active {
  border-color: rgba(255, 216, 77, 0.92);
  box-shadow:
    inset 0 0 0 2px rgba(255, 216, 77, 0.72),
    0 16px 40px rgba(5, 7, 10, 0.34);
}

.wave-mix-card.is-lightmusic {
  background:
    linear-gradient(135deg, #151827, #36206d 48%, #0b8f88);
}

.lightmusic-mix-visual {
  position: absolute;
  inset: 14px 16px 50px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
}

.lightmusic-mix-visual span {
  width: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd84d, #ff4f7a 52%, #24d7c8);
  box-shadow: 0 0 20px rgba(36, 215, 200, 0.38);
}

.lightmusic-mix-visual span:nth-child(1) { height: 28px; }
.lightmusic-mix-visual span:nth-child(2) { height: 48px; }
.lightmusic-mix-visual span:nth-child(3) { height: 36px; }
.lightmusic-mix-visual span:nth-child(4) { height: 62px; }
.lightmusic-mix-visual span:nth-child(5) { height: 42px; }

.lightmusic-player {
  background:
    linear-gradient(180deg, rgba(8, 11, 18, 0.1) 0%, rgba(8, 11, 18, 0.54) 54%, #05070a 100%),
    linear-gradient(135deg, #111827, #4c1d95 42%, #0f766e 100%);
}

.lightmusic-player::before {
  background:
    linear-gradient(135deg, rgba(255, 216, 77, 0.4), rgba(244, 63, 94, 0.52) 42%, rgba(36, 215, 200, 0.48));
  opacity: calc(0.34 + var(--lightmusic-ui-brightness, 0.3) * 0.58);
}

.lightmusic-content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
  scrollbar-width: none;
}

.lightmusic-content::-webkit-scrollbar {
  display: none;
}

.lightmusic-player .wave-player-title {
  display: block;
  margin: 4px 0 8px;
  max-height: none;
  overflow: visible;
  font-size: clamp(39px, 8.6vw, 46px);
  line-height: 1.12;
  -webkit-line-clamp: 1;
}

.lightmusic-summary-player .lightmusic-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lightmusic-summary-player .lightmusic-hint {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.70);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 760;
  text-align: center;
}

.lightmusic-hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 128px;
  margin: 0 0 10px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(5, 7, 10, 0.22);
  box-shadow: 0 20px 54px rgba(5, 7, 10, 0.32);
  backdrop-filter: blur(18px);
  filter:
    brightness(calc(0.36 + var(--lightmusic-ui-brightness, 0.3) * 1.24))
    saturate(calc(0.70 + var(--lightmusic-ui-brightness, 0.3) * 0.62));
}

.lightmusic-summary-hero {
  height: min(34vh, 220px);
  min-height: 142px;
  margin-bottom: 18px;
}

.lightmusic-window-hero {
  height: 154px;
  margin-bottom: 12px;
}

.lightmusic-hero span {
  width: min(8vw, 28px);
  min-width: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff176, #ff4f7a 52%, #24d7c8);
  box-shadow: 0 0 28px rgba(255, 79, 122, 0.38);
  opacity: calc(0.28 + var(--lightmusic-ui-brightness, 0.3) * 0.72);
  transform-origin: bottom;
}

.lightmusic-hero span:nth-child(1) { height: 42%; }
.lightmusic-hero span:nth-child(2) { height: 70%; }
.lightmusic-hero span:nth-child(3) { height: 52%; }
.lightmusic-hero span:nth-child(4) { height: 86%; }
.lightmusic-hero span:nth-child(5) { height: 62%; }
.lightmusic-hero span:nth-child(6) { height: 76%; }
.lightmusic-hero span:nth-child(7) { height: 46%; }

.lightmusic-hero.is-active span {
  animation: lightmusic-eq 920ms ease-in-out infinite alternate;
}

.lightmusic-hero.is-active span:nth-child(2) { animation-delay: 120ms; }
.lightmusic-hero.is-active span:nth-child(3) { animation-delay: 240ms; }
.lightmusic-hero.is-active span:nth-child(4) { animation-delay: 80ms; }
.lightmusic-hero.is-active span:nth-child(5) { animation-delay: 180ms; }
.lightmusic-hero.is-active span:nth-child(6) { animation-delay: 300ms; }
.lightmusic-hero.is-active span:nth-child(7) { animation-delay: 150ms; }

.lightmusic-mode-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  margin-bottom: 9px;
}

.lightmusic-effect-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: calc(18px + var(--bottom-system-safe));
}

.lightmusic-mode {
  min-height: 68px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  text-align: left;
  backdrop-filter: blur(16px);
}

.lightmusic-mode strong,
.lightmusic-mode span {
  display: block;
}

.lightmusic-mode strong {
  font-size: 17px;
  line-height: 1.15;
  font-weight: 890;
}

.lightmusic-mode span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12.5px;
  line-height: 1.24;
  font-weight: 720;
}

.lightmusic-mode.is-active {
  color: #101828;
  border-color: rgba(255, 216, 77, 0.95);
  background: #ffd84d;
  box-shadow: 0 12px 28px rgba(5, 7, 10, 0.22);
}

.lightmusic-mode.is-active span {
  color: rgba(16, 24, 40, 0.72);
}

.lightmusic-brightness {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  width: 100%;
  margin-bottom: 9px;
  padding: 9px 12px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.lightmusic-brightness-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  line-height: 1.2;
}

.lightmusic-brightness-header strong {
  font-weight: 850;
}

.lightmusic-brightness-header output {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.lightmusic-brightness input {
  width: 100%;
  height: 44px;
  margin: -11px 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.lightmusic-brightness input::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 4px;
  background:
    linear-gradient(
      90deg,
      #ffd84d 0 var(--lightmusic-brightness),
      rgba(255, 255, 255, 0.24) var(--lightmusic-brightness) 100%
    );
}

.lightmusic-brightness input::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -7.5px;
  appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #ffd84d;
  box-shadow: 0 5px 14px rgba(5, 7, 10, 0.3);
}

.lightmusic-brightness input::-moz-range-track {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.24);
}

.lightmusic-brightness input::-moz-range-progress {
  height: 7px;
  border-radius: 4px;
  background: #ffd84d;
}

.lightmusic-brightness input::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #ffd84d;
  box-shadow: 0 5px 14px rgba(5, 7, 10, 0.3);
}

.lightmusic-brightness input:focus-visible {
  outline: 3px solid rgba(255, 216, 77, 0.62);
  outline-offset: 3px;
}

.lightmusic-brightness input:disabled {
  cursor: wait;
  opacity: 0.66;
}

.lightmusic-brightness-update {
  min-height: 34px;
  border: 0;
  border-radius: 17px;
  color: #101828;
  background: #ffd84d;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(5, 7, 10, 0.18);
}

.lightmusic-brightness-update[hidden] {
  display: none;
}

.lightmusic-brightness-update:disabled {
  opacity: 0.64;
}

.lightmusic-activate-button {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 28px;
  color: #fff;
  background: #ef1742;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 18px 38px rgba(239, 23, 66, 0.32);
}

.lightmusic-open-button {
  margin-top: 2px;
}

.lightmusic-activate-button.is-active {
  color: #101828;
  background: #24d7c8;
  box-shadow: 0 18px 38px rgba(36, 215, 200, 0.26);
}

.lightmusic-hint {
  display: none;
}

.lightmusic-sheet {
  position: absolute;
  inset: 0;
  z-index: 43;
  display: none;
}

.lightmusic-sheet.is-open {
  display: block;
}

.lightmusic-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(5, 7, 10, 0.40);
  backdrop-filter: blur(10px);
}

.lightmusic-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(8, 11, 18, 0.08), rgba(8, 11, 18, 0.66) 54%, #05070a 100%),
    linear-gradient(135deg, #111827, #4c1d95 42%, #0f766e 100%);
}

.lightmusic-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: calc(0.32 + var(--lightmusic-ui-brightness, 0.3) * 0.54);
  background: linear-gradient(135deg, rgba(255, 216, 77, 0.38), rgba(244, 63, 94, 0.48) 42%, rgba(36, 215, 200, 0.42));
  pointer-events: none;
}

.lightmusic-sheet-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 18px 18px 10px;
}

.lightmusic-sheet-header .eyebrow {
  color: rgba(255, 255, 255, 0.66);
}

.lightmusic-sheet-header h2 {
  font-size: 28px;
  line-height: 1.05;
  font-weight: 950;
}

.lightmusic-back-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
}

.lightmusic-back-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightmusic-window {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 18px calc(22px + var(--bottom-app-safe));
  scrollbar-width: none;
}

.lightmusic-window::-webkit-scrollbar {
  display: none;
}

.lightmusic-window-status {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.lightmusic-window-status strong,
.lightmusic-window-status span {
  display: block;
}

.lightmusic-window-status strong {
  font-size: 16px;
  font-weight: 900;
}

.lightmusic-window-status span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 720;
}

.lightmusic-carousel-status {
  flex: 0 0 auto;
}

.lightmusic-carousel-track {
  --lightmusic-card-width: clamp(176px, 58%, 238px);
  --lightmusic-side-padding: max(18px, calc((100% - var(--lightmusic-card-width)) / 2));
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  width: calc(100% + 36px);
  margin: 0 -18px 10px;
  padding: 0 var(--lightmusic-side-padding) 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--lightmusic-side-padding);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

.lightmusic-carousel-track::-webkit-scrollbar {
  display: none;
}

.lightmusic-preview-card {
  flex: 0 0 var(--lightmusic-card-width);
  display: grid;
  gap: 7px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 30px rgba(5, 7, 10, 0.24);
  backdrop-filter: blur(14px);
}

.lightmusic-preview-card.is-active {
  border-color: rgba(255, 216, 77, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 216, 77, 0.60),
    0 16px 34px rgba(5, 7, 10, 0.30);
}

.lightmusic-preview-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: inherit;
}

.lightmusic-mode-preview {
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(116px, 27vh, 154px);
  padding: 8px;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.72), rgba(5, 7, 10, 0.92));
}

.lightmusic-mode-image,
.lightmusic-mode-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 7px;
  image-rendering: pixelated;
  background: #05070a;
  filter: saturate(1.18) contrast(1.08);
}

.lightmusic-preview-card.is-active .lightmusic-mode-preview {
  box-shadow: inset 0 0 0 1px rgba(255, 216, 77, 0.44), 0 0 22px rgba(255, 216, 77, 0.16);
}

.lightmusic-preview-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lightmusic-preview-body strong {
  font-size: 17px;
  line-height: 1.05;
  font-weight: 940;
}

.lightmusic-preview-body span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 730;
}

.lightmusic-mode-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
}

.lightmusic-mode-progress[hidden] {
  display: none;
}

.lightmusic-mode-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd84d, #ff4f7a 52%, #24d7c8);
  transform-origin: left center;
  animation: lightmusic-mode-progress var(--lightmusic-auto-ms, 10000ms) linear forwards;
}

.lightmusic-preview-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.lightmusic-keep-button,
.lightmusic-hide-button {
  min-height: 34px;
  border: 0;
  border-radius: 17px;
  font-size: 11.5px;
  font-weight: 900;
}

.lightmusic-keep-button {
  color: #101828;
  background: #ffd84d;
}

.lightmusic-keep-button:disabled {
  opacity: 0.70;
}

.lightmusic-hide-button {
  padding: 0 12px;
  color: #fff;
  background: rgba(239, 23, 66, 0.84);
}

.lightmusic-carousel-note {
  position: relative;
  z-index: 1;
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12.5px;
  line-height: 1.34;
  font-weight: 720;
  text-align: center;
}

.lightmusic-effects-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 8px;
  color: #fff;
}

.lightmusic-effects-title strong {
  font-size: 16px;
  font-weight: 930;
}

.lightmusic-effects-title span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12.5px;
  font-weight: 780;
}

@keyframes lightmusic-eq {
  from {
    transform: scaleY(0.56);
    filter: brightness(0.82);
  }
  to {
    transform: scaleY(1.08);
    filter: brightness(1.18);
  }
}

@keyframes lightmusic-preview-pixel {
  from {
    transform: scale(0.86);
    filter: brightness(0.82);
  }
  to {
    transform: scale(1.08);
    filter: brightness(1.22);
  }
}

@keyframes lightmusic-mode-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.masonry-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.mode-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #f2f4f7;
  text-align: left;
  color: #fff;
  cursor: pointer;
  font: inherit;
  user-select: none;
}

.mode-card:focus-visible,
.profile-post:focus-visible {
  outline: 3px solid rgba(29, 155, 240, 0.42);
  outline-offset: 3px;
}

.post-edit-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 9;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #111318;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.post-edit-button svg {
  width: 18px;
  height: 18px;
}

.mode-card:hover .post-edit-button,
.mode-card:focus-within .post-edit-button,
.profile-post:hover .post-edit-button,
.profile-post:focus-within .post-edit-button {
  opacity: 1;
  transform: translateY(0);
}

.post-edit-button:focus-visible {
  opacity: 1;
  transform: translateY(0);
  outline: 3px solid rgba(29, 155, 240, 0.42);
  outline-offset: 2px;
}

@media (hover: none) {
  .post-edit-button {
    opacity: 1;
    transform: none;
  }
}

.pixel-picture,
.pixel-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111820;
}

.pixel-picture {
  --split: 50%;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 148px;
}

.pixel-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(to right, rgba(12, 18, 28, 0.72) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(12, 18, 28, 0.72) 1px, transparent 1px);
  background-size: calc(100% / 30) calc(100% / 40);
  pointer-events: none;
}

.pixel-picture::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 0 0 var(--split));
  background-image:
    linear-gradient(to right, rgba(12, 18, 28, 0.72) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(12, 18, 28, 0.72) 1px, transparent 1px);
  background-size: calc(100% / 30) calc(100% / 40);
  pointer-events: none;
}

.pixel-picture::after,
.pixel-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.06));
  mix-blend-mode: screen;
  pointer-events: none;
}

.mode-card img,
.queue-item img,
.library-item img,
.profile-post img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pixel-picture img,
.pixel-picture canvas,
.pixel-picture video {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  min-width: 0;
}

.pixel-picture img,
.pixel-picture video {
  object-fit: cover;
}

.pixel-picture canvas {
  object-fit: fill;
}

.original-half {
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
  image-rendering: auto;
}

.pixel-half {
  clip-path: inset(0 0 0 var(--split));
}

.pixel-half,
.queue-item img,
.library-item img,
.profile-post img {
  image-rendering: pixelated;
}

.pixel-picture video {
  background: #111820;
}

.pixel-picture.is-video-pixel-only {
  --split: 0%;
}

.pixel-video-full {
  inset: 0;
  image-rendering: pixelated;
}

.pixel-picture.is-plain-preview::before {
  display: none;
}

.pixel-picture.is-plain-preview .plain-preview-full {
  inset: 0;
  object-fit: cover;
  image-rendering: auto;
}

.pixel-picture.is-plain-preview .fast-still-preview {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.fast-still-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fast-still-base {
  image-rendering: pixelated;
}

.fast-still-sharp {
  opacity: 0;
  image-rendering: auto;
  transition: opacity 160ms ease;
}

.fast-still-preview.is-loaded .fast-still-sharp {
  opacity: 1;
}

.wave-video-preview-layer {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #111820;
}

.wave-video-preview-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.wave-playback-layer canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.wave-video-preview-layer .wave-next-frame {
  opacity: 0;
}

.wave-video-preview-layer.is-transitioning.wave-transition-fade .wave-next-frame {
  animation: waveFadeIn var(--wave-transition-ms, 520ms) ease forwards;
}

.wave-video-preview-layer.is-transitioning.wave-transition-slide .wave-next-frame {
  animation: waveSlideIn var(--wave-transition-ms, 520ms) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.wave-video-preview-layer.is-transitioning.wave-transition-flash .wave-next-frame {
  animation: waveFlashIn var(--wave-transition-ms, 520ms) ease forwards;
}

.wave-video-preview-layer.is-transitioning.wave-transition-wipe .wave-next-frame {
  animation: waveWipeIn var(--wave-transition-ms, 520ms) cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

.wave-playback-layer {
  --split: 50%;
  background: #05070a;
}

.wave-playback-layer.has-pixel-split::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  clip-path: inset(0 0 0 var(--split));
  background-image:
    linear-gradient(to right, rgba(2, 6, 14, 0.72) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(2, 6, 14, 0.72) 1px, transparent 1px);
  background-size: calc(100% / 30) calc(100% / 40);
  pointer-events: none;
}

.pin-picture .wave-playback-layer img {
  object-fit: cover;
}

.wave-playback-audio {
  display: none;
}

.wave-playback-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 7;
  display: grid;
  gap: 6px;
  padding: 46px 14px 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.78) 100%);
  color: #fff;
  pointer-events: none;
}

.wave-playback-control-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wave-playback-icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  pointer-events: auto;
}

.wave-playback-icon-button svg {
  width: 21px;
  height: 21px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.wave-playback-icon-button.is-active,
.wave-playback-volume-control.is-active .wave-playback-icon-button {
  background: rgba(255, 255, 255, 0.16);
}

.wave-playback-time {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 760;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-playback-progress {
  width: 100%;
  min-width: 0;
  height: 14px;
  accent-color: #fff;
  pointer-events: auto;
}

.wave-playback-volume-control {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 30px;
  pointer-events: auto;
}

.wave-playback-volume-popover {
  position: absolute;
  right: 28px;
  bottom: 72px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(96px, 128px) auto;
  align-items: center;
  gap: 9px;
  min-width: 164px;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(5, 7, 10, 0.84);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.16s ease, visibility 0.16s ease;
  transform: translateY(5px);
  visibility: hidden;
  backdrop-filter: blur(16px);
}

.wave-playback-volume-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.wave-playback-volume-popover::after {
  content: "";
  position: absolute;
  right: 70px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: rgba(5, 7, 10, 0.84);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  transform: rotate(45deg);
}

.wave-playback-volume {
  width: 100%;
  min-width: 0;
  height: 18px;
  -webkit-appearance: none;
  appearance: none;
  accent-color: #ffd84d;
  background: transparent;
  cursor: pointer;
}

.wave-playback-volume::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      #ffd84d 0 var(--wave-volume, 70%),
      rgba(255, 255, 255, 0.28) var(--wave-volume, 70%) 100%
    );
}

.wave-playback-volume::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -5.5px;
  -webkit-appearance: none;
  appearance: none;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ffd84d;
  box-shadow: 0 4px 10px rgba(5, 7, 10, 0.28);
}

.wave-playback-volume::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.wave-playback-volume::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: #ffd84d;
}

.wave-playback-volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ffd84d;
  box-shadow: 0 4px 10px rgba(5, 7, 10, 0.28);
}

.wave-playback-volume-value {
  min-width: 32px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 820;
  text-align: right;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.wave-playback-menu-popover {
  position: absolute;
  right: 10px;
  bottom: 72px;
  z-index: 31;
  display: grid;
  gap: 4px;
  min-width: 142px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(5, 7, 10, 0.88);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.16s ease, visibility 0.16s ease;
  transform: translateY(5px);
  visibility: hidden;
  backdrop-filter: blur(16px);
}

.wave-playback-menu-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.wave-playback-menu-popover button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 820;
  text-align: left;
  padding: 0 10px;
}

.wave-playback-menu-popover button:hover,
.wave-playback-menu-popover button:focus-visible,
.wave-playback-menu-popover button:active {
  background: rgba(255, 255, 255, 0.14);
}

.wave-playback-layer .split-handle {
  z-index: 6;
}

.wave-current-frame-pixel {
  background: #05070a;
  image-rendering: pixelated;
}

.wave-current-frame-pixel.led-gap-preview {
  image-rendering: auto;
}

.wave-playback-layer.has-led-gap-preview::before {
  display: none;
}

.wave-preview-picture .wave-playback-controls {
  padding: 38px 10px 10px;
}

.wave-playback-controls.is-editor-preview {
  gap: 5px;
  padding: 54px 14px 14px;
}

.wave-preview-picture .wave-playback-control-row {
  gap: 7px;
}

.wave-preview-picture .wave-playback-icon-button {
  width: 26px;
  height: 26px;
}

.wave-preview-picture .wave-playback-icon-button svg {
  width: 18px;
  height: 18px;
}

.wave-preview-picture .wave-playback-time,
.wave-preview-picture .wave-playback-volume-value {
  font-size: 11px;
}

@keyframes waveFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes waveSlideIn {
  from { opacity: 1; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes waveFlashIn {
  0% { opacity: 0; filter: brightness(1.7) saturate(1.35); transform: scale(1.04); }
  38% { opacity: 1; filter: brightness(1.35) saturate(1.22); }
  100% { opacity: 1; filter: brightness(1) saturate(1); transform: scale(1); }
}

@keyframes waveWipeIn {
  from { opacity: 1; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

.pin-picture .pin-video-player {
  object-fit: contain;
  background: #05070a;
}

.profile-post .pixel-picture.is-plain-preview img {
  image-rendering: auto;
}

.pixel-picture .preview-video-source {
  position: absolute;
  inset: auto;
  left: 0;
  top: 0;
  z-index: -1;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mode-card.tall .pixel-picture {
  min-height: 238px;
}

.mode-card.medium .pixel-picture {
  min-height: 190px;
}

.split-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  z-index: 5;
  width: 42px;
  outline: 0;
  cursor: ew-resize;
  touch-action: none;
  transform: translateX(-50%);
}

.split-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), #fff 18%, #fff 82%, rgba(255, 255, 255, 0.18));
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
}

.split-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  clip-path: circle(50% at 50% 50%);
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 8px 18px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
  transform: translate(-50%, -50%);
}

.pixel-picture.is-splitting .split-handle::after,
.wave-playback-layer.is-splitting .split-handle::after,
.split-handle:focus-visible::after {
  background: rgba(17, 19, 24, 0.9);
  border-color: rgba(255, 255, 255, 0.28);
}

.split-chevron {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 7px;
  height: 7px;
  border-color: #172033;
  border-style: solid;
  border-width: 0 0 2px 2px;
}

.split-chevron.is-left {
  left: 11px;
  transform: translateY(-50%) rotate(45deg);
}

.split-chevron.is-right {
  right: 11px;
  transform: translateY(-50%) rotate(225deg);
}

.pixel-picture.is-splitting .split-chevron,
.wave-playback-layer.is-splitting .split-chevron,
.split-handle:focus-visible .split-chevron {
  border-color: #fff;
}

.mode-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.66));
  pointer-events: none;
}

.card-body {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  display: block;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 780;
}

.card-meta {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 650;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
}

.search-row > svg {
  flex: 0 0 auto;
}

.search-row input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.search-voice-button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #eef3f8;
  color: #344054;
}

.search-voice-button svg {
  width: 19px;
  height: 19px;
}

.quick-filters {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 12px;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.collection-open-header {
  position: sticky;
  top: -12px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0 -14px 12px;
  padding: 0 14px 12px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
}

.collection-open-header[hidden] {
  display: none;
}

.collection-back-button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: #172033;
}

.collection-back-button svg {
  width: 20px;
  height: 20px;
}

.collection-open-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.collection-open-title strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-open-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.collection-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 132px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #172033;
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.collection-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.78)),
    radial-gradient(circle at 18% 20%, rgba(29, 155, 240, 0.4), transparent 38%);
  pointer-events: none;
}

.collection-preview-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  opacity: 0.78;
}

.collection-preview-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.collection-card-body {
  position: absolute;
  right: 11px;
  bottom: 11px;
  left: 11px;
  z-index: 2;
  display: grid;
  gap: 4px;
}

.collection-card-label {
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  line-height: 1;
  font-weight: 760;
}

.collection-card-title {
  display: block;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.08;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-card-count {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 650;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 760;
  box-shadow: 0 10px 26px rgba(18, 25, 38, 0.06);
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
}

.action-tile:nth-child(1) .tile-icon { background: var(--blue); }
.action-tile:nth-child(2) .tile-icon { background: var(--rose); }
.action-tile:nth-child(3) .tile-icon { background: var(--green); }
.action-tile:nth-child(4) .tile-icon { background: var(--violet); }

.playlist-strip {
  margin-top: 18px;
}

.queue-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 112px;
  gap: 10px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 2px;
}

.queue-item,
.library-item {
  overflow: hidden;
  border-radius: 8px;
  background: #f2f4f7;
}

.pixel-thumb {
  height: 92px;
}

.queue-item span,
.library-item span {
  display: block;
  padding: 8px;
  overflow: hidden;
  color: #273244;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.text-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 17px;
  background: #f2f5f8;
  color: var(--rose);
  font-size: 13px;
  font-weight: 760;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 2px 12px;
}

.profile-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 45%),
    conic-gradient(from 20deg, var(--rose), var(--yellow), var(--green), var(--blue), var(--violet), var(--rose));
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  font-weight: 820;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
}

button.profile-avatar {
  padding: 0;
}

.profile-avatar::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    rgba(17, 19, 24, 0.28);
  background-size: 9px 9px;
}

.profile-avatar span {
  position: relative;
  z-index: 1;
}

.profile-avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar img[hidden] {
  display: none;
}

.profile-avatar-change {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 10px;
  border-radius: 50%;
  background: rgba(17, 19, 24, 0.62);
  color: #fff;
  font-size: 9px;
  font-weight: 820;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.profile-avatar-change svg {
  width: 18px;
  height: 18px;
}

.profile-avatar:hover .profile-avatar-change,
.profile-avatar:focus-visible .profile-avatar-change {
  opacity: 1;
}

.profile-info {
  flex: 1 1 auto;
  min-width: 0;
}

.profile-info h2 {
  font-size: 22px;
  line-height: 1.05;
  font-weight: 820;
}

.profile-info p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.profile-settings {
  position: relative;
  flex: 0 0 auto;
  align-self: flex-start;
}

.profile-settings[hidden] {
  display: none;
}

.profile-settings-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.profile-settings-button svg {
  width: 21px;
  height: 21px;
}

.profile-settings-menu {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 18;
  min-width: 176px;
  padding: 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.profile-settings-menu[hidden] {
  display: none;
}

.profile-settings-menu button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #263241;
  font-size: 13px;
  font-weight: 820;
  text-align: left;
}

.profile-settings-menu button:hover {
  background: #f3f7fb;
}

.profile-settings-menu button.is-danger {
  color: #b0001b;
}

.profile-settings-menu button.is-danger:hover {
  background: #fff0f3;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 0 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-stats > span,
.profile-stat-button {
  padding: 11px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-align: center;
}

.profile-stat-button {
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.profile-stat-button:focus-visible {
  outline: 2px solid rgba(230, 0, 35, 0.45);
  outline-offset: -2px;
}

.profile-stats strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.profile-wall-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.profile-wall-status {
  display: grid;
  gap: 2px;
}

.profile-wall-status span,
.profile-wall-status small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 720;
}

.profile-wall-status strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 860;
}

.profile-wall-panel.is-online .profile-wall-status strong::after {
  content: " online";
  color: #00a676;
  font-size: 12px;
  font-weight: 820;
}

.profile-wall-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.profile-wall-form input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.profile-wall-form button {
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: #101828;
  color: #fff;
  font-size: 13px;
  font-weight: 840;
}

.profile-wall-form button:disabled {
  opacity: 0.62;
}

.profile-collection-feed.is-walls {
  display: block;
}

.profile-collection-feed.is-walls .profile-wall-panel {
  margin: 0;
}

.wall-device-list {
  display: grid;
  gap: 8px;
}

.wall-device-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.wall-device-row.is-active {
  border-color: rgba(230, 0, 35, 0.28);
  background: #fff7f8;
}

.wall-device-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wall-device-info strong,
.wall-device-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wall-device-info strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 840;
}

.wall-device-info small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.wall-device-row.is-online .wall-device-info strong::after {
  content: " online";
  color: #00a676;
  font-size: 11px;
  font-weight: 820;
}

.wall-device-row button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
}

.wall-device-row.is-active button {
  border-color: #101828;
  background: #101828;
  color: #fff;
}

.voice-debug-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.voice-debug-header {
  display: grid;
  gap: 2px;
}

.voice-debug-header strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 860;
}

.voice-debug-header span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 720;
}

.voice-debug-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.voice-debug-form textarea {
  min-width: 0;
  min-height: 58px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.25;
}

.voice-debug-form button {
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: #101828;
  color: #fff;
  font-size: 13px;
  font-weight: 840;
}

.voice-debug-form button:disabled {
  opacity: 0.62;
}

.voice-debug-examples {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.voice-debug-examples::-webkit-scrollbar {
  display: none;
}

.voice-debug-examples button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 780;
}

.voice-debug-output {
  min-height: 54px;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.35;
}

.voice-debug-output.is-empty {
  color: var(--muted);
}

.voice-debug-output.is-error {
  border-color: rgba(230, 0, 35, 0.24);
  background: #fff4f6;
  color: #9f1239;
}

.voice-debug-result {
  display: grid;
  gap: 8px;
}

.voice-debug-summary {
  display: grid;
  gap: 2px;
}

.voice-debug-summary strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 860;
}

.voice-debug-summary span,
.voice-debug-reason {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.voice-debug-reason {
  margin: 0;
}

.voice-debug-details {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
}

.voice-debug-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.voice-debug-details dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-debug-json-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.voice-debug-json {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 9px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.voice-debug-llm {
  display: grid;
  gap: 8px;
}

.voice-debug-llm-item {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.voice-debug-llm-meta {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-debug-llm-error {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
}

.voice-debug-llm-field {
  display: grid;
  gap: 5px;
  padding: 8px;
  border-radius: 8px;
  background: #f8fafc;
}

.voice-debug-llm-field strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 860;
}

.voice-debug-llm-field pre {
  max-height: 180px;
  overflow: auto;
  margin: 0;
  color: #1f2937;
  font: 700 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.voice-debug-raw-details {
  display: grid;
  gap: 6px;
}

.voice-debug-raw-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.profile-content-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: -2px 0 12px;
  padding: 4px;
  border-radius: 8px;
  background: #f1f4f8;
}

.profile-content-tab {
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #536274;
  font-size: 13px;
  font-weight: 820;
}

.profile-content-tab.is-active {
  background: #101828;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.profile-auth-gate {
  display: grid;
  flex: 1;
  min-height: 420px;
  place-items: center;
  padding: 24px 4px 100px;
}

.profile-auth-gate[hidden] {
  display: none;
}

.profile-auth-card {
  display: grid;
  gap: 14px;
  width: min(100%, 360px);
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.1);
}

.profile-auth-card h2 {
  font-size: 28px;
  line-height: 1.05;
  font-weight: 880;
}

.profile-auth-card p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.35;
}

.profile-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-auth-actions .pin-primary-button,
.profile-auth-actions .pin-secondary-button {
  width: 100%;
  flex-basis: auto;
}

.profile-hero[hidden],
.profile-stats[hidden],
.profile-actions[hidden],
.profile-wall-panel[hidden],
.profile-content-tabs[hidden],
.profile-feed[hidden],
#profileUploadInput[hidden] {
  display: none;
}

.profile-action-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #263241;
  font-size: 13px;
  font-weight: 760;
}

.profile-action-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.profile-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  gap: 8px;
  padding-bottom: calc(126px + var(--bottom-app-safe));
  scroll-padding-bottom: calc(126px + var(--bottom-app-safe));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.profile-feed::-webkit-scrollbar {
  display: none;
}

.profile-column {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.profile-empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  text-align: center;
}

.profile-empty-state.is-loading {
  border-style: solid;
  background: rgba(255, 255, 255, 0.72);
}

.profile-empty-state.is-loading::before {
  content: "";
  width: 24px;
  height: 24px;
  border: 3px solid rgba(16, 24, 40, 0.14);
  border-top-color: #101828;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.profile-collection-sheet {
  position: absolute;
  inset: 0;
  z-index: 34;
  display: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(29, 155, 240, 0.08), transparent 32%),
    linear-gradient(180deg, #fff 0%, #f7f9fc 62%, #fff 100%);
}

.profile-collection-sheet.is-open {
  display: block;
}

.profile-collection-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px 14px 0;
}

.profile-collection-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -14px;
  padding: 6px 14px 13px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
}

.profile-collection-back {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.profile-collection-back svg {
  width: 21px;
  height: 21px;
}

.profile-collection-header h2 {
  font-size: 25px;
  line-height: 1.05;
  font-weight: 860;
}

.profile-collection-header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.profile-collection-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  gap: 8px;
  padding: 8px 0 calc(18px + var(--bottom-app-safe));
  scrollbar-width: none;
}

.profile-collection-feed::-webkit-scrollbar {
  display: none;
}

.profile-collection-feed.is-author-profile {
  display: block;
  padding: 10px 0 calc(18px + var(--bottom-app-safe));
}

.profile-collection-feed.is-subscriptions {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 0;
  padding: 6px 0 calc(18px + var(--bottom-app-safe));
}

.author-profile-hero {
  margin: 4px 0 14px;
}

.author-profile-stats {
  margin-bottom: 12px;
}

.author-profile-actions {
  margin-bottom: 12px;
}

.author-profile-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.subscription-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 66px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.subscription-row:last-child {
  border-bottom: 0;
}

.subscription-user-button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.subscription-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 50%;
  background: conic-gradient(from 220deg, #24c6dc, #514a9d, #ff5f6d, #ffc371, #24c6dc);
  color: #fff;
  font-size: 15px;
  font-weight: 860;
}

.subscription-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subscription-info {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.subscription-info strong,
.subscription-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-info strong {
  font-size: 15px;
  font-weight: 820;
}

.subscription-info span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.subscription-follow-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: #f5f7fa;
  color: #1f2937;
  font-size: 12px;
  font-weight: 790;
}

.profile-post {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #111820;
  cursor: pointer;
}

.profile-post .pixel-picture {
  min-height: 0;
}

.profile-post-preview {
  aspect-ratio: 3 / 4;
}

.profile-post.tall .profile-post-preview {
  aspect-ratio: 3 / 5;
}

.profile-post.medium .profile-post-preview {
  aspect-ratio: 4 / 5;
}

.profile-post .split-handle {
  width: 34px;
}

.profile-post .split-handle::after {
  width: 30px;
  height: 30px;
}

.profile-post::after {
  content: "";
  position: absolute;
  inset: 46% 0 0;
  z-index: 4;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
  pointer-events: none;
}

.profile-post-picture {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.profile-post.tall .profile-post-picture {
  aspect-ratio: 3 / 5;
}

.profile-post.medium .profile-post-picture {
  aspect-ratio: 4 / 5;
}

.profile-post-picture::before,
.profile-post-picture::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.profile-post-picture::before {
  z-index: 1;
  background-image:
    linear-gradient(to right, rgba(12, 18, 28, 0.64) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(12, 18, 28, 0.64) 1px, transparent 1px);
  background-size: calc(100% / 30) calc(100% / 40);
}

.profile-post-picture::after {
  z-index: 2;
  background: linear-gradient(180deg, transparent 54%, rgba(0, 0, 0, 0.58));
}

.profile-post-meta {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  z-index: 6;
  display: grid;
  gap: 5px;
  color: rgba(255, 255, 255, 0.9);
}

.profile-post-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.1;
  font-weight: 820;
}

.profile-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.profile-post-tag {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.88);
  font-size: 9px;
  line-height: 1;
  font-weight: 740;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-post-tag.is-draft {
  background: rgba(230, 0, 35, 0.78);
  color: #fff;
}

.wall-preview {
  position: relative;
  align-self: center;
  width: min(100%, max(220px, calc((100dvh - 430px - var(--bottom-app-safe)) * 0.75)), 350px);
  aspect-ratio: 3 / 4;
  margin: 0 auto;
}

.wall-matrix {
  position: absolute;
  inset: 22px;
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  grid-template-rows: repeat(40, 1fr);
  gap: 1px;
  padding: 4px;
  border: 1px solid #c7d0dc;
  background: #172033;
}

.pixelated-wall {
  gap: 1px;
}

.pixel {
  min-width: 0;
  min-height: 0;
  border-radius: 1px;
}

.backlight {
  position: absolute;
  border-radius: 8px;
  opacity: 0.86;
}

.backlight.top {
  top: 6px;
  right: 22px;
  left: 22px;
  height: 9px;
  background: linear-gradient(90deg, #ff3d5a, #f3b61f, #00a676, #1d9bf0);
}

.backlight.bottom {
  right: 22px;
  bottom: 6px;
  left: 22px;
  height: 9px;
  background: linear-gradient(90deg, #8b5cf6, #1d9bf0, #00a676, #f3b61f);
}

.backlight.left {
  top: 22px;
  bottom: 22px;
  left: 6px;
  width: 9px;
  background: linear-gradient(180deg, #ff3d5a, #1d9bf0);
}

.backlight.right {
  top: 22px;
  right: 6px;
  bottom: 22px;
  width: 9px;
  background: linear-gradient(180deg, #00a676, #f3b61f);
}

.wall-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wall-mode-button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f6f8fb;
  color: #182230;
  font-size: 13px;
  font-weight: 780;
  text-align: left;
}

.wall-mode-button svg {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: #344054;
}

.wall-mode-button span {
  min-width: 0;
  line-height: 1.15;
}

.wave-demo-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(218, 224, 231, 0.9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.wave-demo-heading {
  display: grid;
  gap: 3px;
}

.wave-demo-heading h2 {
  font-size: 17px;
  font-weight: 840;
}

.wave-demo-heading p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.25;
}

.wave-demo-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.wave-demo-controls input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.wave-demo-controls button,
.wave-demo-preset {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 820;
}

.wave-demo-controls button {
  padding: 0 14px;
  background: #101828;
  color: #fff;
}

.wave-demo-preset {
  background: #eef4ff;
  color: #175cd3;
}

.wave-demo-source {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid #dbe7ff;
  border-radius: 8px;
  background: #f5f8ff;
}

.wave-demo-source[hidden] {
  display: none;
}

.wave-demo-source-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #e11d48;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.wave-demo-source-icon svg {
  width: 23px;
  height: 23px;
}

.wave-demo-source div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wave-demo-source strong {
  color: #182230;
  font-size: 13px;
  font-weight: 830;
}

.wave-demo-source a {
  width: fit-content;
  color: #175cd3;
  font-size: 12px;
  font-weight: 780;
  text-decoration: none;
}

.pin-sheet {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: none;
  background:
    radial-gradient(circle at 22% 0%, rgba(230, 0, 35, 0.08), transparent 30%),
    linear-gradient(180deg, #fff 0%, #f7f9fc 54%, #fff 100%);
}

.pin-sheet.is-open {
  display: block;
}

.pin-panel {
  height: 100%;
  overflow-y: auto;
  padding: 4px 14px calc(28px + var(--bottom-app-safe));
  scrollbar-width: none;
}

.pin-panel::-webkit-scrollbar {
  display: none;
}

.pin-header {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -14px 2px;
  padding: 0 14px 4px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
}

.pin-round-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.pin-round-button svg {
  width: 21px;
  height: 21px;
}

.pin-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pin-header-actions [hidden] {
  display: none;
}

.pin-preview {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #111820;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.pin-preview .pixel-picture {
  min-height: 0;
  border-radius: 8px;
}

.pin-content {
  display: grid;
  gap: 10px;
  padding: 15px 2px 0;
}

.pin-content h2 {
  font-size: 27px;
  line-height: 1.04;
  font-weight: 880;
}

.pin-content p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.pin-content p[hidden] {
  display: none;
}

.pin-author-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  min-height: 36px;
  margin: 0 0 5px;
  padding: 0 10px 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
}

.pin-author-button:hover {
  color: #b0001b;
}

.pin-author-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, #1d9bf0, #8b5cf6 45%, #f04462 70%, #f3b61f);
  color: #fff;
  font-size: 13px;
  font-weight: 880;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.pin-author-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.pin-author-text {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: left;
}

.pin-author-text span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.pin-author-text strong {
  overflow: hidden;
  color: currentColor;
  font-size: 13px;
  font-weight: 860;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 2px;
}

.pin-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 760;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.05);
}

.pin-tags span.is-media-kind {
  border-color: rgba(230, 0, 35, 0.14);
  background: #fff0f3;
  color: #b0001b;
}

.pin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 7px;
}

.pin-primary-button,
.pin-secondary-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 820;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.pin-primary-button {
  flex: 1 1 132px;
  border: 0;
  background: linear-gradient(180deg, #f01836, #d90020);
  color: #fff;
}

.pin-secondary-button {
  flex: 1 1 118px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.pin-secondary-button.is-active {
  border-color: #e60023;
  background: #fff0f3;
  color: #b0001b;
}

.wall-control-sheet {
  position: absolute;
  inset: 0;
  z-index: 42;
  display: none;
  background:
    radial-gradient(circle at 85% 3%, rgba(230, 0, 35, 0.1), transparent 30%),
    linear-gradient(180deg, #fff 0%, #f6f8fb 58%, #fff 100%);
}

.wall-control-sheet.is-open {
  display: block;
}

.wall-control-panel {
  position: absolute;
  inset: 0 0 calc(126px + var(--bottom-app-safe)) 0;
  height: auto;
  overflow-y: auto;
  padding: 4px 14px 14px;
  scroll-padding-bottom: 14px;
  scrollbar-width: none;
}

.wall-control-panel::-webkit-scrollbar {
  display: none;
}

.wall-control-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -14px 8px;
  padding: 0 14px 8px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
}

.wall-control-header div {
  min-width: 0;
}

.wall-control-header h2 {
  overflow: hidden;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.02;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wall-control-header span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wall-control-preview {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #111820;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.15);
}

.wall-control-preview .pixel-picture {
  min-height: 0;
  border-radius: 8px;
}

.wall-control-card-title {
  margin: 14px 2px 8px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.03;
  font-weight: 890;
}

.wall-control-settings {
  display: grid;
  gap: 10px;
}

.wall-control-range,
.wall-control-toggle {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 9px 24px rgba(15, 23, 42, 0.06);
}

.wall-control-range[hidden],
.wall-control-toggle[hidden] {
  display: none;
}

.wall-control-range {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.wall-control-range span,
.wall-control-toggle span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
}

.wall-control-range strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.wall-control-range input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  margin: -10px 0;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  accent-color: #e60023;
}

.wall-control-toggle {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.wall-control-toggle input {
  width: 20px;
  height: 20px;
  accent-color: #e60023;
}

.wall-control-actions {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px 14px calc(10px + var(--bottom-app-safe));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.wall-control-actions .pin-primary-button,
.wall-control-actions .pin-secondary-button {
  flex: none;
  min-width: 0;
}

.auth-sheet {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: none;
}

.auth-sheet.is-open {
  display: block;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(8px);
}

.auth-panel {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(96px + var(--bottom-app-safe));
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-header h2 {
  font-size: 24px;
  line-height: 1.05;
}

.auth-fields,
.account-fields {
  display: grid;
  gap: 10px;
}

.auth-fields[hidden],
.account-fields[hidden] {
  display: none;
}

.auth-fields label,
.account-fields label {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.auth-fields input,
.account-fields input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.auth-qr-placeholder {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 4px 0 2px;
  text-align: center;
}

.auth-qr-placeholder[hidden] {
  display: none;
}

.auth-qr-art {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 28px);
  grid-template-rows: repeat(3, 28px);
  gap: 8px;
  width: 152px;
  height: 152px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(90deg, #111318 10px, transparent 10px 18px, #111318 18px 24px, transparent 24px 32px, #111318 32px 42px, transparent 42px),
    linear-gradient(#111318 10px, transparent 10px 18px, #111318 18px 24px, transparent 24px 32px, #111318 32px 42px, transparent 42px),
    #fff;
  background-size: 56px 56px;
  background-position: 72px 72px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.12);
}

.auth-qr-art span {
  position: relative;
  display: block;
  border: 8px solid #111318;
  border-radius: 4px;
  background: #fff;
}

.auth-qr-art span::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 2px;
  background: #111318;
}

.auth-qr-art span:nth-child(2) {
  grid-column: 3;
}

.auth-qr-art span:nth-child(3) {
  grid-row: 3;
}

.auth-qr-placeholder h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.08;
  font-weight: 880;
}

.auth-qr-placeholder p {
  max-width: 310px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.auth-camera-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.auth-camera-button svg {
  width: 20px;
  height: 20px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.editor-sheet,
.audio-trim-sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
}

.editor-sheet.is-open,
.wave-sheet.is-open,
.audio-trim-sheet.is-open {
  display: block;
}

.audio-trim-sheet {
  z-index: 42;
}

.wave-sheet {
  position: absolute;
  inset: 0;
  z-index: 39;
  display: none;
  box-sizing: border-box;
  background: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: 0;
  scrollbar-width: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.wave-sheet::-webkit-scrollbar {
  display: none;
}

.editor-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(17, 24, 39, 0.38);
  backdrop-filter: blur(8px);
}

.editor-panel {
  position: absolute;
  right: 0;
  bottom: var(--bottom-viewport-overlay);
  left: 0;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  padding: 16px 14px calc(22px + var(--bottom-system-safe));
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: 0 -20px 48px rgba(15, 23, 42, 0.24);
  scrollbar-width: none;
}

.audio-trim-panel {
  position: absolute;
  right: 12px;
  bottom: calc(12px + var(--bottom-viewport-overlay));
  left: 12px;
  z-index: 1;
  display: grid;
  gap: 12px;
  max-height: calc(100% - 24px - var(--bottom-viewport-overlay));
  overflow-y: auto;
  padding: 16px 14px calc(16px + var(--bottom-system-safe));
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 -20px 48px rgba(15, 23, 42, 0.24);
  scrollbar-width: none;
}

.audio-trim-panel::-webkit-scrollbar {
  display: none;
}

.wave-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100% - var(--bottom-viewport-overlay));
  overflow: visible;
  padding: 18px 14px calc(22px + var(--bottom-system-safe));
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  scrollbar-width: none;
  touch-action: pan-y;
}

.editor-panel::-webkit-scrollbar,
.wave-panel::-webkit-scrollbar {
  display: none;
}

.wave-builder-section {
  display: grid;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.wave-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.wave-section-title h2 {
  min-width: 0;
  font-size: 16px;
  font-weight: 840;
}

.wave-section-title span {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(62%, 260px);
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-preview-section {
  gap: 10px;
}

.wave-preview-card {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.wave-preview-grid {
  display: grid;
  align-items: center;
  justify-items: stretch;
  width: 100%;
  min-width: 0;
}

.wave-preview-picture {
  justify-self: center;
  width: 100%;
  max-width: 520px;
  min-height: 0;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.wave-preview-volume-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-self: center;
  gap: 6px 10px;
  width: 100%;
  max-width: 520px;
  margin-top: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #f6f8fb;
  color: #344054;
  font-size: 12px;
  font-weight: 820;
}

.wave-preview-volume-control span {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-preview-volume-control.is-disabled {
  opacity: 0.58;
}

.wave-preview-volume-control input {
  width: 100%;
  min-width: 0;
  height: 20px;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.wave-preview-volume-control input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      #101828 0 var(--wave-preview-volume, 70%),
      rgba(15, 23, 42, 0.18) var(--wave-preview-volume, 70%) 100%
    );
}

.wave-preview-volume-control input::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -5.5px;
  -webkit-appearance: none;
  appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #101828;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.22);
}

.wave-preview-volume-control input::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
}

.wave-preview-volume-control input::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: #101828;
}

.wave-preview-volume-control input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #101828;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.22);
}

.wave-preview-volume-control output {
  min-width: 34px;
  text-align: right;
}

.wave-preview-card > strong {
  min-width: 0;
  overflow: hidden;
  color: #101828;
  font-size: 13px;
  font-weight: 860;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-preview-empty {
  width: 100%;
  min-height: 126px;
}

.wave-duration-section {
  gap: 10px;
}

.wave-duration-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.wave-duration-control input {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #f4f7fb;
  color: var(--ink);
  font-size: 22px;
  font-weight: 880;
  text-align: center;
}

.wave-duration-control span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.wave-transition-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.wave-transition-option {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #182230;
  text-align: left;
}

.wave-transition-option strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-transition-option span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.18;
  font-weight: 700;
}

.wave-transition-option.is-active {
  border-color: #101828;
  background: #101828;
  color: #fff;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.14);
}

.wave-transition-option.is-active span {
  color: rgba(255, 255, 255, 0.72);
}

.wave-transition-option:nth-child(5) {
  grid-column: 1 / -1;
}

.wave-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.wave-action-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  overflow: hidden;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #f4f7fb;
  color: #182230;
  font-size: 12px;
  font-weight: 820;
}

.wave-action-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-action-button.is-loading {
  color: transparent;
  pointer-events: none;
}

.wave-action-button.is-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(16, 24, 40, 0.18);
  border-top-color: #101828;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.wave-action-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.audio-library-list {
  display: grid;
  gap: 7px;
  max-height: clamp(220px, 32vh, 320px);
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.audio-library-list::-webkit-scrollbar {
  display: none;
}

.audio-library-item {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.audio-library-item.is-active {
  border-color: #101828;
  background: #f8fafc;
}

.audio-library-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  align-items: start;
  width: 100%;
  min-width: 0;
  gap: 8px;
}

.audio-select-button {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 42px;
  overflow: hidden;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.audio-select-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.16);
}

.audio-library-item.is-active .audio-select-button {
  background: #101828;
  color: #fff;
}

.audio-track-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.audio-track-text strong {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.16;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.audio-track-text small {
  color: currentColor;
  font-size: 11px;
  font-weight: 680;
  opacity: 0.74;
}

.audio-edit-button,
.audio-delete-button {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
}

.audio-edit-button {
  background: rgba(15, 23, 42, 0.07);
  color: #101828;
}

.audio-delete-button {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.audio-edit-button svg,
.audio-delete-button svg {
  width: 18px;
  height: 18px;
}

.audio-track-controls {
  display: grid;
  gap: 9px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.06);
}

.audio-track-controls audio {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 40px;
}

.audio-clip-summary {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-track-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.audio-trim-button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #101828;
  color: #fff;
  font-size: 12px;
  font-weight: 820;
}

.audio-trim-button.is-secondary {
  background: #eef3f8;
  color: #182230;
}

.audio-trim-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.audio-trim-body audio {
  display: block;
  width: 100%;
  min-width: 0;
}

.audio-trim-readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.audio-trim-readout span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px 8px;
  border-radius: 8px;
  background: #f4f7fb;
  text-align: center;
}

.audio-trim-readout strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-trim-readout small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.audio-trim-slider {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #182230;
  font-size: 12px;
  font-weight: 820;
}

.audio-trim-slider input {
  width: 100%;
  min-width: 0;
  accent-color: #101828;
}

.audio-trim-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8px;
}

.audio-trim-actions button {
  min-height: 44px;
}

.wave-frame-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(132px, 30vw, 196px);
  align-content: start;
  gap: 8px;
  max-height: clamp(180px, 30vh, 360px);
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.wave-frame-picker::-webkit-scrollbar {
  display: none;
}

.wave-frame-section {
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: visible;
}

.wave-frame-option {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #111820;
  color: #fff;
}

.wave-frame-option.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(29, 155, 240, 0.22), 0 14px 28px rgba(29, 155, 240, 0.16);
}

.wave-frame-option.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(29, 155, 240, 0.2);
  box-shadow: inset 0 0 0 3px var(--blue);
  pointer-events: none;
}

.wave-frame-option img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.wave-frame-option span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  overflow: hidden;
  padding: 22px 7px 7px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  font-size: 11px;
  font-weight: 820;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave-selected-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(29, 155, 240, 0.35);
}

.wave-selected-label {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 4;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0a66b7;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.wave-empty-state {
  padding: 13px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  text-align: center;
}

.wave-frame-picker .wave-empty-state {
  grid-column: 1 / -1;
}

.wave-empty-feed {
  min-height: 360px;
}

.wave-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.wave-draft-button,
.wave-publish-button {
  width: 100%;
  min-height: 48px;
}

.wave-draft-button {
  border-color: rgba(16, 24, 40, 0.14);
  background: #f7f9fc;
  color: #182230;
}

.wave-publish-button {
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
}

.wave-delete-button {
  grid-column: 1 / -1;
  min-height: 48px;
  padding: 0 16px;
  border-color: rgba(220, 38, 38, 0.28);
  color: #dc2626;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.12);
}

.wave-delete-button[hidden] {
  display: none;
}

.wave-sheet.is-saving .wave-panel {
  cursor: progress;
}

.wave-sheet.is-saving .wave-builder-section,
.wave-sheet.is-saving .wave-submit-row {
  opacity: 0.72;
}

.wave-sheet.is-saving button:disabled,
.wave-sheet.is-saving input:disabled,
.wave-sheet.is-saving select:disabled,
.wave-sheet.is-saving textarea:disabled {
  cursor: progress;
}

.wave-submit-row button:disabled {
  box-shadow: none;
  opacity: 0.68;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.editor-heading {
  min-width: 0;
  flex: 1;
}

.editor-title-row {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.editor-title-measure {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  white-space: pre;
  font: inherit;
  font-size: 24px;
  font-weight: 880;
}

.editor-title-input {
  flex: 0 1 auto;
  width: var(--editor-title-width, 12ch);
  max-width: calc(100% - 40px);
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 24px;
  font-weight: 880;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-title-input:focus {
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.14);
}

.wave-panel .editor-title-row {
  display: flex;
  width: 100%;
}

.wave-panel .editor-title-input {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-height: 34px;
  line-height: 1.08;
}

.title-edit-button {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f1f4f8;
  color: #536274;
}

.title-edit-button svg {
  width: 17px;
  height: 17px;
}

.editor-preview {
  display: grid;
  place-items: center;
  padding: 8px 0 12px;
}

.editor-picture {
  width: min(100%, 270px);
  min-height: 0;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.editor-picture {
  cursor: grab;
  touch-action: none;
}

.editor-picture.is-panning {
  cursor: grabbing;
}

.editor-picture .original-half {
  object-fit: cover;
}

.editor-picture .pixel-half {
  object-fit: fill;
  filter: none;
  transform: none;
}

.editor-picture.fit-contain .original-half {
  object-fit: contain;
}

.editor-picture.fit-stretch .original-half {
  object-fit: fill;
}

.editor-controls {
  display: grid;
  gap: 10px;
}

.editor-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #273244;
  font-size: 13px;
  font-weight: 780;
}

.editor-toggle[hidden] {
  display: none;
}

.editor-toggle input {
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  accent-color: var(--ink);
}

.editor-toggle span {
  display: grid;
  gap: 2px;
}

.editor-toggle small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.editor-segment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #f1f4f8;
}

.editor-segment button,
.editor-button-grid button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-weight: 760;
}

.editor-segment button {
  min-height: 36px;
  font-size: 12px;
}

.editor-segment button.is-active {
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.editor-button-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.editor-button-grid button {
  display: grid;
  place-items: center;
  min-height: 66px;
  padding: 7px 5px;
  background: #f8fafc;
  color: #273244;
  font-size: 11px;
}

.editor-button-grid svg {
  width: 20px;
  height: 20px;
}

.editor-button-grid .danger {
  color: var(--rose);
  background: #fff1f4;
}

.editor-slider,
.tag-editor {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #273244;
  font-size: 13px;
  font-weight: 740;
}

.editor-slider input {
  width: 100%;
  min-height: 44px;
  margin: -10px 0;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  accent-color: var(--blue);
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-chips button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: #eef3f8;
  color: #273244;
  font-size: 12px;
  font-weight: 760;
}

.tag-chips button.is-active {
  border-color: rgba(29, 155, 240, 0.32);
  background: #e5f2ff;
  color: #0a66b7;
  box-shadow: inset 0 0 0 1px rgba(29, 155, 240, 0.08);
}

.bottom-nav {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  min-height: calc(76px + var(--bottom-system-safe));
  padding: 8px 14px calc(12px + var(--bottom-system-safe));
  border-top: 1px solid rgba(218, 224, 231, 0.82);
  background: var(--nav);
  backdrop-filter: blur(18px);
}

.nav-item {
  display: grid;
  place-items: center;
  min-height: 52px;
  color: #4c596a;
  font-size: 11px;
  font-weight: 730;
}

.nav-item svg {
  width: 23px;
  height: 23px;
}

.nav-item.is-active {
  color: #05070a;
}

.nav-upload-button {
  gap: 4px;
  color: #05070a;
}

.nav-upload-button svg {
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: 50%;
  background: #05070a;
  color: #fff;
  box-shadow: 0 10px 22px rgba(5, 7, 10, 0.24);
}

.upload-action-sheet {
  position: absolute;
  inset: 0;
  z-index: 29;
  display: none;
}

.upload-action-sheet.is-open {
  display: block;
}

.upload-action-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(17, 24, 39, 0.22);
}

.upload-action-panel {
  position: absolute;
  right: 14px;
  bottom: calc(90px + var(--bottom-app-safe));
  left: 14px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(218, 224, 231, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
}

.upload-action {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #f7f9fb;
  color: #162033;
  font-weight: 760;
  text-align: left;
}

.upload-action:hover {
  background: #eef3f8;
}

.upload-action svg {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: #344054;
}

.toast {
  position: absolute;
  right: 18px;
  bottom: calc(92px + var(--bottom-app-safe));
  left: 18px;
  z-index: 30;
  min-height: 42px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(17, 19, 24, 0.92);
  color: #fff;
  font-size: 14px;
  font-weight: 720;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.progress-toast {
  position: absolute;
  right: 18px;
  bottom: calc(92px + var(--bottom-app-safe));
  left: 18px;
  z-index: 55;
  display: grid;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(17, 19, 24, 0.94);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.progress-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 760;
}

.progress-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-row strong {
  font-size: 12px;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.progress-track span {
  position: relative;
  display: block;
  width: 0%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 120ms linear;
}

.progress-track span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
  transform: translateX(-100%);
  animation: progress-shine 1.1s linear infinite;
}

@keyframes progress-shine {
  to {
    transform: translateX(100%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 760px) {
  body {
    display: grid;
    place-items: center;
    padding: 24px;
  }

  .app-shell {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 28px;
  }
}

@media (max-width: 430px) {
  :root {
    --bottom-system-safe: max(1px, env(safe-area-inset-bottom, 0px));
  }

  .app-shell {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
  }

  #wallPage {
    padding: 0;
  }

  #wallPage.is-active {
    gap: 8px;
  }

  .wave-player {
    --wave-mix-panel-height: 142px;
    --wave-mix-panel-bottom: calc(108px + var(--bottom-app-safe));
    --wave-mix-content-gap: 10px;
    padding: 72px 14px calc(var(--wave-mix-panel-bottom) + var(--wave-mix-panel-height) + var(--wave-mix-content-gap));
  }

  .wave-player-title {
    max-height: 104px;
    font-size: 36px;
  }

  .wave-player-cover {
    width: min(58vw, 228px);
  }

  .wave-player-controls {
    grid-template-columns: 50px minmax(0, 1fr) 50px;
    margin-top: 14px;
  }

  .wave-player-round,
  .wave-player-now {
    min-height: 50px;
  }

  .wave-player-round {
    width: 50px;
  }

  .wave-mix-strip {
    --wave-mix-card-width: 132px;
    --wave-mix-edge-padding: 14px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .wave-mix-card strong {
    margin-top: 68px;
  }

  .lightmusic-content {
    padding-bottom: 0;
  }

  .lightmusic-player .wave-player-title {
    max-height: none;
    margin: 4px 0 7px;
    font-size: 37px;
    line-height: 1.12;
  }

  .lightmusic-hero {
    height: 108px;
    margin-bottom: 8px;
    padding: 12px;
    border-radius: 22px;
  }

  .lightmusic-summary-hero {
    height: min(31vh, 190px);
    min-height: 136px;
    margin-bottom: 16px;
  }

  .lightmusic-window-hero {
    height: 130px;
  }

  .lightmusic-hero span {
    min-width: 14px;
  }

  .lightmusic-mode-grid {
    gap: 7px;
    margin-bottom: 8px;
  }

  .lightmusic-mode {
    min-height: 60px;
    padding: 9px;
    border-radius: 12px;
  }

  .lightmusic-mode strong {
    font-size: 15px;
  }

  .lightmusic-mode span {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.25;
  }

  .lightmusic-brightness {
    gap: 6px;
    margin-bottom: 8px;
    padding: 7px 10px 9px;
    border-radius: 12px;
  }

  .lightmusic-brightness-header {
    font-size: 13px;
  }

  .lightmusic-brightness-update {
    min-height: 32px;
    font-size: 12.5px;
  }

  .lightmusic-activate-button {
    min-height: 48px;
    font-size: 15px;
  }

  .lightmusic-hint {
    display: none;
  }

  .lightmusic-window {
    padding-top: 6px;
  }

  .lightmusic-window-status {
    margin-bottom: 8px;
    padding: 9px 11px;
    border-radius: 12px;
  }

  .lightmusic-carousel-track {
    --lightmusic-card-width: clamp(168px, 56%, 218px);
    gap: 9px;
    margin-bottom: 8px;
  }

  .lightmusic-preview-card {
    flex-basis: var(--lightmusic-card-width);
    gap: 6px;
    padding: 8px;
    border-radius: 13px;
  }

  .lightmusic-mode-preview {
    height: clamp(104px, 24vh, 132px);
    padding: 7px;
    border-radius: 11px;
  }

  .lightmusic-preview-body strong {
    font-size: 15.5px;
  }

  .lightmusic-preview-body span {
    font-size: 11px;
    line-height: 1.2;
  }

  .lightmusic-keep-button,
  .lightmusic-hide-button {
    min-height: 32px;
    font-size: 11px;
  }

  .wall-preview {
    width: min(100%, calc((100dvh - 430px - var(--bottom-app-safe)) * 0.75), 310px);
  }

  .wall-matrix {
    inset: 18px;
    padding: 3px;
  }

  .backlight.top,
  .backlight.bottom {
    right: 18px;
    left: 18px;
    height: 7px;
  }

  .backlight.top {
    top: 5px;
  }

  .backlight.bottom {
    bottom: 5px;
  }

  .backlight.left,
  .backlight.right {
    top: 18px;
    bottom: 18px;
    width: 7px;
  }

  .backlight.left {
    left: 5px;
  }

  .backlight.right {
    right: 5px;
  }

  .wall-mode-grid {
    gap: 8px;
  }

  .wall-mode-button {
    gap: 9px;
    min-height: 52px;
    padding: 0 10px;
    font-size: 12px;
  }

  .wall-mode-button svg {
    flex-basis: 22px;
    width: 22px;
    height: 22px;
  }

  .wave-demo-panel {
    gap: 8px;
    padding: 10px;
  }

  .wave-demo-controls {
    grid-template-columns: 1fr;
  }

  .wave-frame-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(146px, 42vw, 220px);
  }

  .wave-action-row {
    grid-template-columns: 1fr;
  }

  .audio-trim-actions {
    grid-template-columns: 1fr;
  }

}
