@font-face {
  font-family: BioManrope;
  src: url("/fonts/manrope-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: BioManrope;
  src: url("/fonts/manrope-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #030303;
  --panel: #101113;
  --panel-soft: #17181b;
  --panel-raised: #1e1f23;
  --line: #2a2b30;
  --line-strong: #3a3c43;
  --text: #f4f3ed;
  --muted: #9b9da5;
  --soft: #cac8c0;
  --accent: #f1eee6;
  --accent-text: #050505;
  --green: #7be39d;
  --danger: #ff9b9b;
  --font: BioManrope, "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 58% 8%, rgba(255, 255, 255, 0.06), transparent 28%),
    linear-gradient(180deg, #030303, #050505 45%, #020202);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.bio-app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.bio-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.9);
  padding: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 2px 6px 18px;
  font-weight: 700;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav-list {
  display: grid;
  gap: 4px;
  padding-top: 14px;
}

.nav-item,
.primary-button,
.ghost-button,
.mini-button,
.icon-button,
input,
select,
textarea,
.account-card,
.panel,
.settings-card,
.analytics-grid article,
.earnings-grid article,
.link-edit-card {
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 220ms ease;
}

.nav-item {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 8px 12px;
  color: #b7b7bc;
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  border-color: var(--line);
  color: var(--text);
  background: #17181b;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 0;
}

.resource-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  background: #0d0e10;
  font-size: 11px;
  font-weight: 700;
}

.account-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0a0a0b;
  padding: 11px;
}

.account-avatar {
  --avatar-cutout: #050505;
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 999px;
  color: #050505;
  background: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.account-card div:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

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

.account-card strong {
  font-size: 13px;
}

.account-card span {
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  min-width: 0;
  padding: 28px clamp(18px, 3vw, 34px) 80px;
}

.auth-gate {
  display: none;
}

body.is-guest .bio-app {
  grid-template-columns: minmax(0, 1fr);
}

body.is-guest .bio-sidebar,
body.is-guest .topbar,
body.is-guest .layout {
  display: none;
}

body.is-guest .workspace {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(152deg, transparent 0 58%, rgba(255, 255, 255, 0.08) 72%, transparent 84%),
    linear-gradient(328deg, rgba(255, 255, 255, 0.08), transparent 24%),
    #030303;
}

body.is-guest .workspace::before,
body.is-guest .workspace::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

body.is-guest .workspace::before {
  top: -28vh;
  right: -18vw;
  width: min(64vw, 780px);
  height: 76vh;
  transform: rotate(-21deg);
  border-radius: 72px;
  clip-path: polygon(20% 0, 100% 0, 84% 100%, 0 86%);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.035) 38%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), transparent);
  filter: blur(16px);
  opacity: 0.68;
}

body.is-guest .workspace::after {
  left: -22vw;
  bottom: -34vh;
  width: min(70vw, 840px);
  height: 70vh;
  transform: rotate(-28deg);
  border-radius: 72px;
  clip-path: polygon(0 14%, 92% 0, 100% 100%, 16% 86%);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.025) 42%, transparent 68%);
  filter: blur(18px);
  opacity: 0.55;
}

body.is-guest .auth-gate {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 514px);
}

.auth-gate-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: 100%;
  padding: clamp(10px, 4vw, 18px);
  text-align: center;
}

.auth-gate-brand {
  display: grid;
  place-items: center;
  gap: 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.auth-gate-brand img {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-gate-card h1 {
  max-width: 520px;
  margin: 10px 0 0;
  color: #f5f4ef;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-gate-card p {
  margin-bottom: 0;
}

.auth-gate-subtitle {
  margin: -5px 0 12px;
  color: #a5a5a9;
  font-size: 14px;
}

.gate-note {
  max-width: 380px;
  color: #a2a2a7;
  font-size: 12px;
  line-height: 1.6;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1.05;
}

h2 {
  margin-bottom: 10px;
  font-size: 21px;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.top-actions,
.section-head,
.plan-row,
.segmented-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.primary-button,
.ghost-button,
.mini-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: #111113;
}

.primary-button {
  min-height: 38px;
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent);
  padding: 0 16px;
  font-weight: 700;
}

.ghost-button {
  min-height: 36px;
  padding: 0 14px;
  color: #deddd7;
}

.mini-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.icon-button {
  width: 34px;
  height: 34px;
}

.primary-button:hover,
.ghost-button:hover,
.mini-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: #5a5c65;
}

.primary-button.full,
.ghost-button.full {
  width: 100%;
}

.link-button {
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: start;
  gap: 22px;
  max-width: 1280px;
  margin: 0 auto;
}

body:not(.is-profile-view) .layout {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1120px;
}

body:not(.is-profile-view) .preview-panel {
  display: none;
}

body.is-profile-view.is-preview-desktop .layout {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1280px;
}

body.is-profile-view.is-preview-desktop .preview-panel {
  position: static;
}

body.is-profile-view.is-preview-desktop .preview-toolbar {
  justify-content: flex-start;
}

.views {
  min-width: 0;
}

.content-view {
  display: none;
  animation: viewIn 240ms ease both;
}

.content-view.is-active {
  display: grid;
  gap: 18px;
}

.panel,
.settings-card,
.analytics-grid article,
.earnings-grid article,
.link-edit-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.055), transparent 34%),
    rgba(15, 16, 18, 0.92);
}

.panel,
.settings-card {
  padding: 20px;
}

.intro-panel {
  min-height: 126px;
}

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

.share-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.social-builder,
.upload-form,
.block-admin {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.social-builder-other {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(150px, 0.75fr) minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 12px;
}

.upload-form {
  grid-template-columns: minmax(0, 190px) minmax(220px, 1fr) auto;
}

.block-admin {
  grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr) auto;
}

.asset-list {
  display: grid;
  gap: 10px;
}

.asset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(8, 8, 9, 0.65);
}

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

.asset-row span {
  color: var(--muted);
  font-size: 12px;
}

.share-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.share-grid .panel:last-child {
  grid-column: 1 / -1;
}

.share-actions {
  display: flex;
  gap: 10px;
}

.share-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.qr-box {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: #080809;
}

.qr-box img {
  width: min(180px, 100%);
  height: auto;
}

.embed-preview-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #080809;
}

.embed-preview-card img {
  width: 100%;
  max-height: 170px;
  border-radius: 10px;
  object-fit: cover;
}

.embed-preview-card span,
.embed-preview-card small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

label {
  display: grid;
  gap: 8px;
  color: #deddd7;
  font-size: 13px;
  font-weight: 700;
}

label.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--text);
  background: #111113;
  outline: 0;
}

textarea {
  min-height: 98px;
  resize: vertical;
  padding: 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #757782;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07);
}

input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input[type="color"] {
  padding: 4px;
}

.file-picker {
  position: relative;
}

.file-picker input[type="file"] {
  position: absolute;
  inset: auto 0 0;
  width: 1px;
  height: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #111113;
  padding: 5px;
}

.file-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 9px;
  padding: 0 11px;
  color: var(--accent-text);
  background: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.file-picker-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inline-open-link {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  line-height: 1;
}

.inline-open-link:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.field-hint.is-good {
  color: var(--green);
}

.field-hint.is-bad {
  color: var(--danger);
}

.plus-hint {
  display: none;
}

.is-free .plus-hint {
  display: block;
}

.prefix-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #111113;
}

.prefix-input span {
  padding-left: 12px;
  color: var(--muted);
  font-size: 13px;
}

.prefix-input input {
  border: 0;
  background: transparent;
}

.toggle-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(17, 18, 20, 0.72);
}

.toggle-row input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

.link-editor-list,
.payout-list,
.transaction-list,
.admin-payouts,
.admin-reports,
.admin-blocks {
  display: grid;
  gap: 12px;
}

.link-edit-card {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 14px;
}

.link-safety-warning {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 198, 103, 0.25);
  border-radius: 12px;
  padding: 9px 11px;
  color: #ffd188;
  background: rgba(255, 198, 103, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.link-edit-card .link-order { grid-column: span 1; }
.link-edit-card .link-label { grid-column: span 3; }
.link-edit-card .link-url { grid-column: span 4; }
.link-edit-card .link-icon { grid-column: span 4; }
.link-edit-card .link-platform { grid-column: span 2; }
.link-edit-card .link-username { grid-column: span 3; }
.link-edit-card .link-kind { grid-column: span 2; }

.link-edit-card input,
.link-edit-card select {
  min-height: 36px;
}

.link-kind select {
  min-width: 112px;
}

.link-edit-card .toggle-row {
  min-height: 36px;
}

.link-card-actions {
  grid-column: span 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
}

.link-card-actions .toggle-row {
  grid-column: 1 / -1;
}

.danger-button {
  color: var(--danger);
}

.empty-copy {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
  background: rgba(12, 12, 13, 0.7);
  line-height: 1.45;
}

.analytics-grid,
.earnings-grid,
.settings-grid,
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.earnings-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.breakdown-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.transactions-card {
  grid-column: 1 / -1;
}

.fine-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.analytics-grid article,
.earnings-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.analytics-grid span,
.earnings-grid span {
  color: var(--muted);
  font-size: 13px;
}

.analytics-grid strong,
.earnings-grid strong {
  font-size: 30px;
}

.chart-panel {
  min-height: 320px;
}

.bio-chart {
  display: flex;
  align-items: end;
  gap: 6px;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #080809;
  padding: 14px;
}

.breakdown-list {
  display: grid;
  gap: 9px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(8, 8, 9, 0.55);
}

.breakdown-row span {
  overflow: hidden;
  color: var(--soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breakdown-row strong {
  color: var(--text);
}

.bar-stack {
  display: grid;
  align-items: end;
  flex: 1;
  min-width: 5px;
  height: 100%;
}

.bar-stack i {
  display: block;
  border-radius: 999px 999px 4px 4px;
}

.bar-stack i:first-child {
  background: linear-gradient(180deg, #f2f0e8, #77736b);
}

.bar-stack i:last-child {
  background: linear-gradient(180deg, #80e6a3, #215c38);
  opacity: 0.82;
}

.bar-stack .h-5 {
  height: 5%;
}

.bar-stack .h-10 {
  height: 10%;
}

.bar-stack .h-15 {
  height: 15%;
}

.bar-stack .h-20 {
  height: 20%;
}

.bar-stack .h-25 {
  height: 25%;
}

.bar-stack .h-30 {
  height: 30%;
}

.bar-stack .h-35 {
  height: 35%;
}

.bar-stack .h-40 {
  height: 40%;
}

.bar-stack .h-45 {
  height: 45%;
}

.bar-stack .h-50 {
  height: 50%;
}

.bar-stack .h-55 {
  height: 55%;
}

.bar-stack .h-60 {
  height: 60%;
}

.bar-stack .h-65 {
  height: 65%;
}

.bar-stack .h-70 {
  height: 70%;
}

.bar-stack .h-75 {
  height: 75%;
}

.bar-stack .h-80 {
  height: 80%;
}

.bar-stack .h-85 {
  height: 85%;
}

.bar-stack .h-90 {
  height: 90%;
}

.bar-stack .h-95 {
  height: 95%;
}

.bar-stack .h-100 {
  height: 100%;
}

.settings-card p {
  margin-bottom: 20px;
}

.payout-row,
.transaction-row,
.admin-payout-row,
.admin-report-row,
.admin-block-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 8, 9, 0.7);
  padding: 12px;
}

.admin-payout-row {
  grid-template-columns: minmax(0, 1fr) 160px 140px 110px 110px;
}

.admin-report-row {
  grid-template-columns: minmax(0, 1fr) 150px minmax(160px, 0.7fr) auto auto;
}

.admin-block-row {
  grid-template-columns: minmax(0, 1fr) 150px auto;
}

.payout-row strong,
.transaction-row strong,
.admin-payout-row strong,
.admin-report-row strong,
.admin-block-row strong {
  display: block;
}

.payout-row span,
.transaction-row span,
.admin-payout-row span,
.admin-report-row span,
.admin-block-row span {
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--soft);
  background: #111;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.status-pill.is-live {
  border-color: rgba(123, 227, 157, 0.28);
  color: var(--green);
}

.preview-panel {
  position: sticky;
  top: 22px;
  min-width: 0;
}

.preview-toolbar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.preview-toolbar .is-active {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent);
}

.preview-phone {
  --preview-bg: #050505;
  --preview-text: #f7f5ee;
  --preview-accent: #f4f1e8;
  --preview-bg-image: none;
  --preview-card-opacity: 1;
  --preview-card-blur: 0px;
  --preview-button-radius: 14px;
  --preview-bg-dim: 0.44;
  --preview-video-opacity: 0.46;
  position: relative;
  display: grid;
  width: min(100%, 360px);
  margin-inline: auto;
  justify-items: center;
  align-content: center;
  gap: 13px;
  min-height: min(720px, calc(100vh - 80px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 26px;
  padding: 34px 26px;
  color: var(--preview-text);
  background:
    linear-gradient(rgba(0, 0, 0, var(--preview-bg-dim)), rgba(0, 0, 0, var(--preview-bg-dim))),
    var(--preview-bg-image),
    var(--preview-bg);
  background-position: center;
  background-size: cover;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
}

.preview-phone.preview-desktop {
  width: 100%;
  max-width: 100%;
  min-height: min(620px, calc(100vh - 92px));
  border-radius: 18px;
  padding: 70px 18px 92px;
  gap: 12px;
}

.preview-phone.preview-desktop .preview-avatar {
  width: clamp(118px, 18vw, 164px);
  height: clamp(118px, 18vw, 164px);
  border-width: 9px;
}

.preview-phone.preview-desktop h2 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 0.95;
}

.preview-phone.preview-desktop .preview-links {
  width: min(420px, 100%);
}

.preview-phone.preview-desktop.layout-card::before,
.preview-phone.preview-desktop.layout-split::before {
  width: min(420px, calc(100% - 36px));
  inset: auto;
  top: 50%;
  left: 50%;
  min-height: 360px;
  transform: translate(-50%, -50%);
}

.preview-phone.preview-desktop.layout-split {
  justify-items: end;
  padding-right: max(18px, 10%);
}

.preview-phone.preview-desktop.layout-split .preview-avatar,
.preview-phone.preview-desktop.layout-split h2,
.preview-phone.preview-desktop.layout-split p,
.preview-phone.preview-desktop.layout-split .preview-socials,
.preview-phone.preview-desktop.layout-split .preview-links,
.preview-phone.preview-desktop.layout-split .preview-brand {
  justify-self: end;
  width: min(420px, 100%);
}

.preview-phone > :not(.preview-video-bg) {
  position: relative;
  z-index: 1;
}

.preview-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  opacity: var(--preview-video-opacity);
}

.preview-phone.has-bg-video::after,
.preview-phone.has-bg-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, calc(var(--preview-bg-dim) * 0.5)), rgba(0, 0, 0, var(--preview-bg-dim)));
  pointer-events: none;
}

.preview-phone.effect-snow::before,
.preview-phone.effect-rain::before,
.preview-phone.effect-spark::before,
.preview-phone.effect-scan::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.preview-phone.effect-snow::before {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.6px);
  background-position: 0 0, 18px 22px;
  background-size: 38px 38px, 52px 52px;
}

.preview-phone.effect-rain::before {
  background-image: linear-gradient(115deg, transparent 0 44%, rgba(255, 255, 255, 0.28) 45% 47%, transparent 48% 100%);
  background-size: 22px 64px;
}

.preview-phone.effect-spark::before {
  background:
    radial-gradient(circle at 22% 28%, rgba(255, 255, 255, 0.42), transparent 4%),
    radial-gradient(circle at 76% 34%, rgba(255, 255, 255, 0.3), transparent 5%),
    radial-gradient(circle at 54% 72%, rgba(255, 255, 255, 0.22), transparent 4%);
}

.preview-phone.effect-scan::before {
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 8px);
  opacity: 0.28;
}

.preview-phone.theme-paper {
  --preview-bg: #efebe0;
  --preview-text: #111;
  --preview-accent: #1e1e1e;
}

.preview-phone.theme-signal {
  --preview-bg: #07100b;
  --preview-text: #ecfff0;
  --preview-accent: #7be39d;
}

.preview-phone.theme-mono {
  --preview-bg: #0e0e0e;
  --preview-text: #f5f5f0;
  --preview-accent: #a7a7a0;
}

.preview-phone.font-system {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.preview-phone.font-serif {
  font-family: Georgia, "Times New Roman", serif;
}

.preview-phone.font-mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.preview-phone.font-display {
  font-family: BioManrope, Impact, "Arial Black", sans-serif;
}

.preview-phone.layout-card {
  align-content: center;
  margin-inline: auto;
  padding: 38px 28px;
}

.preview-phone.layout-card::before,
.preview-phone.layout-split::before {
  content: "";
  position: absolute;
  inset: 30px;
  z-index: 0;
  border: 1px solid color-mix(in srgb, var(--preview-accent) 18%, transparent);
  border-radius: 24px;
  background: rgba(8, 8, 9, var(--preview-card-opacity));
  backdrop-filter: blur(var(--preview-card-blur));
}

.preview-phone.layout-minimal {
  align-content: start;
  padding-top: 78px;
}

.preview-phone.layout-minimal .preview-avatar {
  width: 82px;
  height: 82px;
  border-width: 4px;
}

.preview-phone.layout-split {
  align-content: stretch;
  justify-items: stretch;
  padding: 34px 24px;
}

.preview-phone.layout-split .preview-avatar,
.preview-phone.layout-split h2,
.preview-phone.layout-split p,
.preview-phone.layout-split .preview-socials,
.preview-phone.layout-split .preview-links,
.preview-phone.layout-split .preview-brand {
  justify-self: start;
  text-align: left;
}

.preview-phone.layout-split .preview-socials {
  justify-content: start;
}

.preview-avatar {
  --avatar-cutout: var(--preview-bg);
  position: relative;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  overflow: hidden;
  border: 8px solid rgba(0, 0, 0, 0.42);
  border-radius: 999px;
  color: #050505;
  background: var(--preview-accent);
  font-size: 38px;
  font-weight: 700;
  box-shadow: 0 0 38px color-mix(in srgb, var(--preview-accent) 42%, transparent);
}

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

.avatar-placeholder {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.avatar-placeholder::before,
.avatar-placeholder::after {
  content: "";
  position: absolute;
  left: 50%;
  background: color-mix(in srgb, var(--avatar-cutout, #050505) 78%, transparent);
  transform: translateX(-50%);
}

.avatar-placeholder::before {
  top: 24%;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 999px;
}

.avatar-placeholder::after {
  bottom: 19%;
  width: 58%;
  height: 31%;
  border-radius: 999px 999px 26px 26px;
}

.preview-phone.avatar-squircle .preview-avatar {
  border-radius: 30%;
}

.preview-phone.avatar-square .preview-avatar {
  border-radius: 20px;
}

.preview-phone h2 {
  margin: 4px 0 0;
  font-size: 30px;
  text-align: center;
  text-shadow: 0 0 18px color-mix(in srgb, var(--preview-accent) 55%, transparent);
}

.preview-phone.glow-off h2,
.preview-phone.glow-off .preview-avatar,
.preview-phone.glow-off .preview-socials span {
  box-shadow: none;
  text-shadow: none;
}

.preview-phone p {
  max-width: 280px;
  margin: 0;
  color: color-mix(in srgb, var(--preview-text) 72%, transparent);
  text-align: center;
  line-height: 1.45;
}

.preview-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  min-height: 36px;
}

.preview-socials span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--preview-bg);
  background: var(--preview-accent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--preview-accent) 55%, transparent);
  font-weight: 700;
}

.preview-socials svg,
.preview-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.preview-socials img,
.preview-links img {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  object-fit: cover;
}

.preview-links {
  display: grid;
  gap: 10px;
  width: min(100%, 300px);
  margin-top: 8px;
}

.preview-links a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid color-mix(in srgb, var(--preview-accent) 24%, transparent);
  border-radius: var(--preview-button-radius);
  padding: 0 14px;
  color: var(--preview-text);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.preview-links a.featured {
  border-color: color-mix(in srgb, var(--preview-accent) 58%, transparent);
  background: color-mix(in srgb, var(--preview-accent) 16%, transparent);
}

.preview-phone.buttons-solid .preview-links a {
  color: var(--preview-bg);
  background: var(--preview-accent);
}

.preview-phone.buttons-outline .preview-links a {
  background: transparent;
}

.preview-phone.buttons-glass .preview-links a {
  backdrop-filter: blur(16px);
}

.preview-links span {
  display: grid;
  place-items: center;
  text-align: center;
}

.preview-links strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-brand {
  margin-top: 12px;
  color: color-mix(in srgb, var(--preview-text) 42%, transparent);
  font-size: 12px;
  font-weight: 700;
}

.preview-audio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--preview-accent) 24%, transparent);
  border-radius: 999px;
  padding: 0 12px;
  color: color-mix(in srgb, var(--preview-text) 78%, transparent);
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 700;
}

.preview-audio i {
  display: block;
  width: 3px;
  border-radius: 999px;
  background: var(--preview-accent);
  animation: audioBar 860ms ease-in-out infinite alternate;
}

.preview-audio i:nth-child(2) {
  height: 12px;
}

.preview-audio i:nth-child(3) {
  height: 18px;
  animation-delay: 120ms;
}

.preview-audio i:nth-child(4) {
  height: 9px;
  animation-delay: 240ms;
}

@keyframes audioBar {
  to {
    transform: scaleY(0.45);
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: start center;
  padding-top: 7vh;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.auth-card {
  display: grid;
  justify-items: center;
  width: min(512px, calc(100vw - 32px));
  padding: 18px 0;
  text-align: center;
}

.share-modal-card {
  width: min(480px, calc(100vw - 32px));
}

.share-modal-card .qr-box,
.share-modal-card .embed-preview-card,
.share-modal-card .share-actions,
.share-modal-card .share-socials {
  width: 100%;
}

.auth-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 18px 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 0;
  font-weight: 700;
}

.auth-mark img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.auth-card h2 {
  margin: 0;
  color: #f5f4ef;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.15;
  letter-spacing: 0;
}

.auth-card p {
  max-width: 390px;
  margin: 12px 0 8px;
  color: #a5a5a9;
  font-size: 14px;
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 514px;
  margin-top: 12px;
  text-align: left;
}

.auth-input-label {
  display: block;
  color: #a7a7ac;
  font-size: 13px;
  font-weight: 700;
}

.auth-form input {
  min-height: 50px;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    #151516;
  color: #f5f4ef;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 34px rgba(0, 0, 0, 0.18);
}

.auth-form input::placeholder {
  color: #77787e;
}

.auth-form input:focus {
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-form .primary-button,
.auth-form .ghost-button {
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: #f5f4ef;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    #141415;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-form .primary-button:hover,
.auth-form .ghost-button:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    #19191a;
}

.auth-close {
  margin-top: 18px;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.form-error {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  transform: translateY(18px);
  opacity: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111;
  padding: 12px 14px;
  color: var(--text);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  transition: 180ms ease;
  pointer-events: none;
}

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

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .bio-app {
    grid-template-columns: minmax(0, 1fr);
  }

  .bio-sidebar {
    position: sticky;
    z-index: 20;
    min-width: 0;
    height: auto;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .account-card {
    margin-top: 14px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding-inline: 14px;
  }

  .topbar,
  .section-head,
  .plan-row {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .top-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }

  .form-grid,
  .analytics-grid,
  .earnings-grid,
  .settings-grid,
  .breakdown-grid,
  .share-grid,
  .social-builder,
  .social-builder-other,
  .upload-form,
  .block-admin,
  .link-edit-card,
  .payout-row,
  .transaction-row,
  .admin-payout-row,
  .admin-report-row,
  .admin-block-row {
    grid-template-columns: 1fr;
  }

  .link-edit-card > * {
    grid-column: 1 / -1 !important;
  }

  label.wide {
    grid-column: auto;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar,
  .resource-links::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: 104px;
  }

  .resource-links {
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding: 10px 0;
  }

  .resource-links a {
    flex: 0 0 auto;
  }
}
