@font-face {
  font-family: "Murecho";
  src: url("./assets/Murecho-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Murecho";
  src: url("./assets/Murecho-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Murecho";
  src: url("./assets/Murecho-Bold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #101315;
  --panel: #181b1d;
  --panel-2: #202325;
  --line: rgba(255, 255, 255, 0.23);
  --muted: #a8a9aa;
  --white: #f8f9f8;
  --mint: #88f160;
  --cyan: #00e7dc;
  --ice: #dfffff;
  --gradient: linear-gradient(100deg, var(--mint) 0%, #13eada 50%, var(--ice) 100%);
  font-family: "Murecho", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #080a0b;
  color: var(--white);
}

body {
  overflow-x: hidden;
}

button,
textarea,
input {
  font: inherit;
}

button {
  color: inherit;
}

.prototype-shell {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 15% 10%, rgba(36, 74, 64, 0.22), transparent 36%),
    radial-gradient(circle at 86% 84%, rgba(19, 56, 62, 0.22), transparent 38%),
    #080a0b;
}

.prototype-meta {
  width: min(430px, calc(100vw - 36px));
  display: flex;
  justify-content: space-between;
  color: #74797a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.phone {
  position: relative;
  width: min(430px, calc(100vw - 36px));
  height: min(900px, calc(100vh - 122px));
  min-height: 700px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 42px;
  box-shadow:
    0 38px 90px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-bar {
  position: absolute;
  z-index: 80;
  top: 0;
  left: 0;
  right: 0;
  height: 49px;
  padding: 17px 27px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.status-icons {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 15px;
}

.status-icons i {
  width: 17px;
  height: 11px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 0 0 11px 11px;
  transform: rotate(180deg);
}

.status-icons b {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 13px solid white;
}

.status-icons em {
  width: 17px;
  height: 10px;
  border: 2px solid white;
  border-radius: 2px;
  position: relative;
}

.status-icons em::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 2px;
  width: 2px;
  height: 4px;
  background: white;
}

.app {
  width: 100%;
  height: 100%;
}

.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
}

.screen-scroll {
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.screen-scroll::-webkit-scrollbar,
.rail::-webkit-scrollbar,
.chips::-webkit-scrollbar {
  display: none;
}

.screen-pad {
  padding: 70px 20px 112px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  font-size: 24px;
  cursor: pointer;
}

.gradient-pill,
.pro-pill {
  border: 0;
  background: var(--gradient);
  color: #050707;
  font-weight: 800;
  cursor: pointer;
}

.gradient-pill {
  min-height: 62px;
  width: 100%;
  border-radius: 34px;
  font-size: 21px;
}

.gradient-pill:disabled {
  background: linear-gradient(#787878, #606060);
  color: #f5f5f5;
  cursor: default;
}

.pro-pill {
  min-width: 78px;
  height: 39px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 21px;
}

.bottom-nav {
  position: absolute;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: 0;
  height: 94px;
  padding: 10px 37px max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  background: rgba(30, 30, 30, 0.97);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.2);
}

.nav-button {
  border: 0;
  background: none;
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #f0f0f0;
  font-size: 14px;
  cursor: pointer;
}

.nav-button img {
  width: 37px;
  height: 37px;
  object-fit: contain;
}

/* Onboarding */
.onboarding {
  background: #050708;
}

.onboarding-visual {
  position: absolute;
  inset: -54px -52px auto;
  height: 66%;
  overflow: hidden;
}

.onboarding-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, #050708 99%);
}

.onboarding-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: rotate(-3deg) scale(1.06);
}

.onboarding-copy {
  position: absolute;
  z-index: 2;
  left: 28px;
  right: 28px;
  bottom: 43px;
  text-align: center;
}

.onboarding-copy h1 {
  margin: 0 0 7px;
  font-size: clamp(35px, 9vw, 44px);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.onboarding-copy p {
  margin: 0 auto 27px;
  max-width: 340px;
  color: #bbbdbd;
  font-size: 16px;
  line-height: 1.45;
}

.terms {
  margin-top: 13px !important;
  color: #696c6d !important;
  font-size: 10px !important;
  line-height: 1.45 !important;
}

.terms u {
  color: #9a9d9d;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Home */
.chips {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  margin: 0 -20px 24px;
  padding: 0 20px;
  scrollbar-width: none;
}

.chip {
  flex: 0 0 auto;
  height: 45px;
  padding: 0 19px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  background: linear-gradient(#1c1d1e, #151617);
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.35);
  font-size: 16px;
  cursor: pointer;
}

.chip.active {
  background: #818282;
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  font-weight: 800;
}

.section-block {
  margin-bottom: 31px;
  scroll-margin-top: 112px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.section-heading button {
  width: 38px;
  height: 38px;
  font-size: 20px;
}

.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin: 0 -20px;
  padding: 0 20px 4px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.poster-card {
  position: relative;
  flex: 0 0 105px;
  height: 186px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #252829;
  cursor: pointer;
  scroll-snap-align: start;
}

.poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.poster-card:active img {
  transform: scale(0.98);
}

.poster-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 42px 9px 11px;
  overflow: hidden;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.84));
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Detail */
.detail-screen {
  background: #151414;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(0.75) brightness(0.35);
  transform: scale(1.14);
  opacity: 0.95;
}

.detail-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.02) 70%, #050505 94%);
  pointer-events: none;
}

.detail-content {
  position: relative;
  z-index: 3;
  height: 100%;
  padding: 75px 18px 104px;
  display: flex;
  flex-direction: column;
}

.detail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.back-button,
.info-button {
  background: transparent;
  border: 0;
  cursor: pointer;
}

.back-button {
  width: 44px;
  height: 44px;
  font-size: 42px;
  line-height: 1;
  font-weight: 300;
}

.info-button {
  width: 36px;
  height: 36px;
  border: 2px solid white;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}

.detail-title {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.detail-subtitle {
  margin: 7px 0 17px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  line-height: 1.35;
}

.detail-media {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: #242424;
  padding: 0;
  cursor: pointer;
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sound-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  font-size: 21px;
}

.dots {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.dots i.active {
  background: white;
}

.detail-cta {
  flex: 0 0 auto;
}

.media-viewer {
  position: absolute;
  z-index: 90;
  inset: 0;
  padding: 48px 13px 13px;
  background: #000;
}

.media-viewer img {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
}

.media-viewer .close-viewer {
  position: absolute;
  z-index: 2;
  top: 67px;
  left: 28px;
  background: rgba(0, 0, 0, 0.52);
}

/* Template creation */
.modal-dim {
  position: absolute;
  z-index: 60;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.creation-sheet {
  position: absolute;
  z-index: 70;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 54%;
  max-height: 73%;
  overflow: auto;
  padding: 21px 18px 31px;
  border-radius: 32px 32px 0 0;
  background: #000;
  animation: sheet-up 220ms ease-out both;
}

@keyframes sheet-up {
  from { transform: translateY(38px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
}

.sheet-close {
  border: 0;
  background: transparent;
  font-size: 34px;
  font-weight: 300;
  cursor: pointer;
}

.segment {
  height: 43px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid #4f5355;
  border-radius: 24px;
  background: #080909;
}

.segment button {
  border: 0;
  border-radius: 21px;
  background: transparent;
  color: #8e8e8f;
  font-size: 16px;
  cursor: pointer;
}

.segment button.active {
  background: var(--gradient);
  color: #030505;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.upload-grid.dual {
  grid-template-columns: 1fr 1fr;
}

.upload-box {
  min-height: 190px;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 15px;
  background: #030404;
  color: white;
  cursor: pointer;
}

.upload-box img.preview {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

.upload-copy {
  display: grid;
  justify-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 800;
}

.upload-copy img {
  width: 48px;
  height: 48px;
  opacity: 0.92;
}

/* Studio */
.studio-screen {
  background: #101315 url("./assets/studio-bg.webp") center top / cover no-repeat;
}

.studio-title {
  margin: 7px 0 20px;
  text-align: center;
  font-size: 31px;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--mint), var(--cyan), white 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.studio-fx {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-left-color: #66e96b;
  border-radius: 25px;
  background: linear-gradient(100deg, rgba(6, 66, 47, 0.85), rgba(25, 27, 27, 0.93));
  box-shadow: inset 14px 0 30px rgba(24, 199, 114, 0.08);
}

.studio-fx b {
  display: block;
  font-size: 18px;
}

.studio-fx span {
  color: #b8bbbb;
  font-size: 13px;
}

.studio-fx strong {
  font-size: 26px;
}

.input-card {
  display: block;
  position: relative;
  margin-bottom: 13px;
  padding: 15px 14px 28px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 19px;
  background: rgba(12, 14, 14, 0.72);
}

.input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 17px;
  font-weight: 800;
}

.input-card textarea {
  width: 100%;
  min-height: 76px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #dedfdf;
  font-size: 13px;
  line-height: 1.4;
}

.counter {
  position: absolute;
  right: 13px;
  bottom: 10px;
  color: #747778;
  font-size: 11px;
}

.studio-segment {
  margin: 1px auto 13px;
}

.studio-upload {
  min-height: 170px;
  margin-bottom: 16px;
}

.studio-create {
  min-height: 58px;
}

/* Profile */
.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.pro-card {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  margin-bottom: 26px;
  padding: 94px 25px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  background: #09251d url("./assets/pro-card.webp") center / 100% 100% no-repeat;
  text-align: center;
}

.pro-card h2 {
  margin: 0 0 12px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.perks {
  display: flex;
  justify-content: center;
  gap: 13px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: #d5d8d7;
  font-size: 11px;
}

.perks li::before {
  content: "✓";
  color: var(--cyan);
  margin-right: 4px;
}

.pro-card .gradient-pill {
  min-height: 52px;
  font-size: 19px;
}

.profile-title {
  margin: 0 0 15px;
  font-size: 24px;
}

.empty-grid {
  position: relative;
  min-height: 290px;
  border-radius: 22px;
  background:
    linear-gradient(rgba(16, 19, 21, 0.44), rgba(16, 19, 21, 0.78)),
    url("./assets/profile-empty.webp") center top / cover no-repeat;
}

.empty-copy {
  position: absolute;
  top: 46%;
  left: 0;
  right: 0;
  text-align: center;
}

.empty-copy h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.empty-copy p {
  margin: 0;
  color: #929495;
  font-size: 13px;
}

/* Paywall */
.paywall {
  background: #000;
}

.paywall-hero {
  height: 46%;
  background: #161616 url("./assets/paywall-hero.webp") center / cover no-repeat;
  position: relative;
}

.paywall-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, #000 100%);
}

.paywall-top {
  position: absolute;
  z-index: 3;
  top: 74px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.restore {
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.paywall-close {
  background: rgba(0, 0, 0, 0.62);
}

.paywall-body {
  padding: 5px 24px 34px;
  text-align: center;
}

.paywall-body h1 {
  margin: 0 0 5px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.paywall-body > p {
  margin: 0 0 17px;
  color: #9da0a0;
  font-size: 13px;
}

.plan-list {
  display: grid;
  gap: 9px;
  margin-bottom: 15px;
}

.plan {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 65px;
  padding: 11px 14px;
  border: 1px solid #424747;
  border-radius: 18px;
  background: #111414;
  text-align: left;
}

.plan.active {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(0, 231, 220, 0.26);
}

.radio {
  width: 18px;
  height: 18px;
  border: 2px solid #707575;
  border-radius: 50%;
}

.plan.active .radio {
  border: 5px solid var(--cyan);
}

.plan b,
.plan small {
  display: block;
}

.plan small {
  color: #8c9191;
}

.price-unavailable {
  color: #8d9191;
  font-size: 12px;
}

.paywall-fine {
  margin: 10px 0 0 !important;
  font-size: 10px !important;
  line-height: 1.35;
}

/* Settings */
.settings-titlebar {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.settings-titlebar h1 {
  margin: 0;
  font-size: 28px;
}

.settings-group {
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: #181b1d;
}

.settings-row {
  min-height: 58px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  cursor: pointer;
}

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

.settings-row span:last-child {
  color: #777b7c;
}

.settings-row.danger {
  color: #ff7777;
}

.settings-source-note {
  color: #6d7172;
  font-size: 11px;
  line-height: 1.5;
}

.toast {
  position: absolute;
  z-index: 120;
  left: 50%;
  bottom: 112px;
  max-width: calc(100% - 42px);
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(29, 33, 33, 0.96);
  color: white;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: 180ms ease;
  font-size: 13px;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.prototype-note {
  width: min(430px, calc(100vw - 36px));
  margin: 0;
  color: #646869;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 540px) {
  .prototype-shell {
    display: block;
    padding: 0;
    background: #101315;
  }

  .prototype-meta,
  .prototype-note {
    display: none;
  }

  .phone {
    width: 100vw;
    height: 100dvh;
    min-height: 620px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-height: 770px) and (min-width: 541px) {
  .phone {
    min-height: 640px;
  }

  .onboarding-visual {
    height: 61%;
  }

  .onboarding-copy {
    bottom: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
