:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: rgb(255 255 255 / 0.86);
  --surface-strong: #ffffff;
  --text: #111827;
  --muted: #667085;
  --line: rgb(17 24 39 / 0.1);
  --primary: #111827;
  --primary-hover: #020617;
  --accent: #ff2f6d;
  --accent-2: #18d7ff;
  --success-bg: #ecfdf3;
  --success-text: #027a48;
  --danger-bg: #fff1f3;
  --danger-text: #c01048;
  --shadow: 0 24px 80px rgb(15 23 42 / 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgb(255 47 109 / 0.16), transparent 30rem),
    radial-gradient(circle at 92% 12%, rgb(24 215 255 / 0.2), transparent 26rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 46%, #eef2f7 100%);
  color: var(--text);
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.7;
  pointer-events: none;
}

.ambient-one {
  top: 18vh;
  right: -120px;
  width: 260px;
  height: 260px;
  background: rgb(255 47 109 / 0.14);
}

.ambient-two {
  bottom: 6vh;
  left: -120px;
  width: 280px;
  height: 280px;
  background: rgb(24 215 255 / 0.15);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #101828;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 28px rgb(16 24 40 / 0.18);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.health-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 15px;
  background: rgb(255 255 255 / 0.68);
  color: #344054;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(18px);
}

.page {
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  gap: 40px;
  align-items: center;
  min-height: min(620px, calc(100svh - 100px));
  padding: 32px 0 42px;
}

.hero-copy {
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.desc {
  max-width: 610px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.phone-visual {
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.phone-shell {
  position: relative;
  width: min(310px, 78vw);
  padding: 12px;
  border: 1px solid rgb(255 255 255 / 0.7);
  border-radius: 42px;
  background: linear-gradient(145deg, #111827, #252b3a);
  box-shadow:
    0 40px 110px rgb(17 24 39 / 0.24),
    inset 0 0 0 1px rgb(255 255 255 / 0.08);
  transform: rotate(-4deg);
  animation: floatIn 0.7s ease both;
}

.phone-shell::before {
  position: absolute;
  inset: -24px;
  z-index: -1;
  border-radius: 56px;
  background:
    linear-gradient(135deg, rgb(255 47 109 / 0.34), transparent 42%),
    linear-gradient(315deg, rgb(24 215 255 / 0.34), transparent 45%);
  content: "";
  filter: blur(18px);
}

.phone-screen {
  overflow: hidden;
  min-height: 520px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.08), transparent 26%),
    radial-gradient(circle at 36% 18%, rgb(255 47 109 / 0.52), transparent 22%),
    radial-gradient(circle at 70% 6%, rgb(24 215 255 / 0.42), transparent 20%),
    #090d16;
  padding: 22px;
}

.phone-pill {
  display: block;
  width: 72px;
  height: 7px;
  margin: 0 auto 52px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.22);
}

.video-glow {
  width: 138px;
  height: 138px;
  margin: 0 auto 56px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 0 7%, transparent 8%),
    conic-gradient(from 30deg, var(--accent), var(--accent-2), var(--accent));
  box-shadow: 0 0 56px rgb(255 47 109 / 0.42);
  animation: pulse 2.8s ease-in-out infinite;
}

.video-line {
  width: 68%;
  height: 10px;
  margin-top: 16px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.16);
}

.video-line.long {
  width: 88%;
}

.video-meta {
  display: grid;
  gap: 8px;
  margin-top: 72px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 22px;
  padding: 16px;
  background: rgb(255 255 255 / 0.08);
  color: #ffffff;
}

.video-meta span {
  color: rgb(255 255 255 / 0.62);
  font-size: 13px;
}

.video-meta strong {
  font-size: 21px;
}

.workspace {
  display: block;
  max-width: 860px;
  margin: 0 auto;
}

.panel,
.guide-panel,
.result {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.panel {
  padding: clamp(20px, 4vw, 30px);
}

.guide-panel h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.04em;
}

.section-header p,
.guide-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.form {
  display: grid;
  gap: 12px;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.mode-switch label {
  cursor: pointer;
}

.mode-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-switch span {
  position: relative;
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.72);
  color: #344054;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.mode-switch span::before {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #98a2b3;
  box-shadow: 0 0 0 3px rgb(152 162 179 / 0.18);
  content: "";
}

.mode-switch label[data-status="ok"] span::before {
  background: #12b76a;
  box-shadow: 0 0 0 3px rgb(18 183 106 / 0.16);
}

.mode-switch label[data-status="busy"] span::before {
  background: #f79009;
  box-shadow: 0 0 0 3px rgb(247 144 9 / 0.18);
}

.mode-switch label[data-status="down"] span::before {
  background: #f04438;
  box-shadow: 0 0 0 3px rgb(240 68 56 / 0.16);
}

.mode-switch input:checked + span {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

label {
  font-weight: 800;
}

input[type="number"],
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgb(255 255 255 / 0.72);
  color: var(--text);
  font: inherit;
  line-height: 1.65;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

input[type="number"],
input[type="text"] {
  min-height: 50px;
}

input::placeholder {
  color: #98a2b3;
}

input[type="number"]:focus,
input[type="text"]:focus {
  border-color: rgb(255 47 109 / 0.5);
  background: #ffffff;
  box-shadow: 0 0 0 5px rgb(255 47 109 / 0.12);
}

.input-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 44px;
  gap: 8px;
  align-items: center;
}

.input-shell input {
  min-width: 0;
}

.icon-btn {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  background: #ffffff;
  color: #344054;
  font-size: 19px;
  box-shadow: none;
}

.icon-btn:hover {
  background: #f2f4f7;
  box-shadow: none;
}

.profile-options {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.profile-options small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.proxy-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px 14px;
  background: rgb(255 255 255 / 0.62);
}

.proxy-box summary {
  cursor: pointer;
  font-weight: 900;
}

.proxy-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 13px;
}

.proxy-fields p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.proxy-fields code {
  color: #344054;
}

.proxy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: #ffffff;
  cursor: pointer;
}

.proxy-toggle input {
  width: 16px;
  height: 16px;
}

.actions,
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button,
.link-btn,
.link-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  background: var(--primary);
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

button:hover,
.link-btn:hover,
.link-secondary:hover {
  background: var(--primary-hover);
  box-shadow: 0 16px 34px rgb(17 24 39 / 0.18);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.action-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-right: 7px;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.18);
  font-size: 13px;
  line-height: 1;
}

.secondary .action-icon {
  background: #eef2f7;
}

.secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #344054;
}

.secondary:hover {
  background: #f2f4f7;
}

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

.player-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(15 23 42 / 0.66);
  backdrop-filter: blur(8px);
}

.player-card {
  position: relative;
  width: min(900px, 100%);
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 24px;
  padding: 14px;
  background: #050914;
  box-shadow: 0 30px 90px rgb(0 0 0 / 0.35);
}

.player-card video {
  display: block;
  width: 100%;
  max-height: min(76svh, 760px);
  border-radius: 16px;
  background: #000000;
}

.player-close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 2;
  width: 38px;
  min-height: 38px;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 50%;
  padding: 0;
  background: #ffffff;
  color: #111827;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.24);
}

.guide-panel {
  padding: clamp(22px, 3vw, 30px);
}

.steps {
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
}

.steps span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  background: #101828;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.steps p {
  margin: 5px 0 0;
  color: #344054;
}

.status {
  margin-top: 20px;
  border-radius: 16px;
  padding: 13px 15px;
  font-weight: 800;
}

.status.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.status.error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.result {
  display: grid;
  gap: 18px;
  margin-top: 20px;
  padding: clamp(18px, 4vw, 26px);
  overflow: hidden;
}

.preview {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: start;
}

.preview img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
  background: #f2f4f7;
}

.tag {
  display: inline-flex;
  margin: 0 0 12px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgb(255 47 109 / 0.1);
  color: #c01048;
  font-size: 13px;
  font-weight: 900;
}

.preview h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.result-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.author-card {
  display: inline-grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px 7px 7px;
  background: rgb(255 255 255 / 0.68);
}

.author-card img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: #f2f4f7;
}

.author-card small {
  display: block;
  overflow: hidden;
  max-width: min(560px, 54vw);
  margin-top: 3px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

#author {
  margin: 0;
  color: #1d2939;
  font-weight: 900;
}

.meta-chips,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chips span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: #f2f4f7;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stat-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgb(255 255 255 / 0.66);
}

.stat-item strong,
.stat-item span {
  display: block;
}

.stat-item strong {
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-item span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.info-block {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: rgb(255 255 255 / 0.62);
}

.info-block h3 {
  margin: 0 0 14px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.asset-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.asset-item {
  display: grid;
  gap: 6px;
  border: 1px solid rgb(17 24 39 / 0.08);
  border-radius: 16px;
  padding: 12px;
  background: #ffffff;
}

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

.asset-item a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-item a b {
  display: inline-grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #f2f4f7;
  font-size: 13px;
}

.block-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.block-heading h3 {
  margin-bottom: 5px;
}

.block-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.music-content {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
}

.music-content img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  background: #f2f4f7;
}

.music-content strong,
.music-content p {
  display: block;
  min-width: 0;
}

.music-content strong {
  font-size: 17px;
}

.music-content p {
  margin: 6px 0 0;
  color: var(--muted);
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mini-actions a,
.mini-actions button,
.backup-actions a,
.backup-actions button,
.profile-bulk button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  background: #ffffff;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.profile-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  border: 1px solid rgb(17 24 39 / 0.08);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgb(255 255 255 / 0.72);
}

.profile-bulk label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.profile-bulk input,
.profile-select {
  width: 16px;
  height: 16px;
  accent-color: #111827;
}

.profile-bulk small {
  color: var(--muted);
  font-size: 13px;
}

.backup-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.backup-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgb(17 24 39 / 0.08);
  border-radius: 18px;
  padding: 13px;
  background: #ffffff;
}

.backup-item strong {
  display: block;
  font-size: 15px;
}

.backup-item p {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.profile-list {
  display: grid;
  gap: 12px;
  max-height: 620px;
  overflow: auto;
  padding-right: 2px;
}

.profile-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px 86px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgb(17 24 39 / 0.08);
  border-radius: 18px;
  padding: 12px;
  background: #ffffff;
}

.profile-check {
  display: grid;
  place-items: center;
}

.profile-item > img {
  width: 86px;
  height: 112px;
  border-radius: 14px;
  object-fit: cover;
  background: #f2f4f7;
}

.profile-body {
  min-width: 0;
}

.profile-title-row {
  display: grid;
  gap: 5px;
}

.profile-title-row span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgb(255 47 109 / 0.1);
  color: #c01048;
  font-size: 12px;
  font-weight: 900;
}

.profile-title-row strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-body p {
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-list.compact {
  margin-top: 9px;
}

.tag-list.compact span {
  min-height: 26px;
  font-size: 12px;
}

details {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px;
  background: rgb(255 255 255 / 0.62);
}

summary {
  cursor: pointer;
  font-weight: 900;
}

pre {
  overflow: auto;
  max-width: 100%;
  max-height: 420px;
  margin: 14px 0 0;
  border-radius: 14px;
  padding: 14px;
  background: #101828;
  color: #e4e7ec;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
}

.hidden {
  display: none !important;
}

.download-page {
  display: grid;
  min-height: calc(100svh - 90px);
  place-items: center;
}

.download-card {
  width: min(720px, 100%);
  padding: clamp(26px, 5vw, 42px);
  text-align: center;
}

.download-icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 22px;
  background: #111827;
  color: #ffffff;
  font-size: 28px;
  box-shadow: 0 18px 46px rgb(17 24 39 / 0.18);
}

.download-card h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: -0.04em;
}

.download-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.download-url {
  margin: 24px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgb(255 255 255 / 0.68);
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
  word-break: break-all;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(24px) rotate(-4deg);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotate(-4deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

@media (max-width: 860px) {
  .topbar,
  .page {
    width: min(100vw - 28px, 720px);
  }

  .topbar {
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .health-link {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .page {
    padding-top: 10px;
    padding-bottom: 36px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: auto;
    padding: 28px 0 34px;
  }

  h1 {
    max-width: 560px;
    font-size: clamp(42px, 13vw, 64px);
  }

  .desc {
    font-size: 16px;
    line-height: 1.7;
  }

  .phone-visual {
    justify-content: flex-start;
  }

  .phone-shell {
    width: min(268px, 76vw);
    border-radius: 36px;
  }

  .phone-screen {
    min-height: 390px;
    border-radius: 27px;
  }

  .video-glow {
    width: 110px;
    height: 110px;
    margin-bottom: 42px;
  }

  .video-meta {
    margin-top: 44px;
  }

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

  .preview {
    grid-template-columns: 150px 1fr;
  }

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

@media (max-width: 560px) {
  body {
    background:
      radial-gradient(circle at 20% 0%, rgb(255 47 109 / 0.16), transparent 18rem),
      linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  }

  .topbar,
  .page {
    width: min(100vw - 20px, 560px);
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .brand small {
    display: none;
  }

  .health-link {
    min-height: 36px;
    border-radius: 12px;
  }

  .hero {
    padding-top: 18px;
  }

  h1 {
    font-size: clamp(38px, 15vw, 52px);
    letter-spacing: -0.06em;
  }

  .hero-actions,
  .actions,
  .links {
    display: grid;
    grid-template-columns: 1fr;
  }

  button,
  .link-btn,
  .link-secondary,
  .ghost-link {
    width: 100%;
    min-height: 48px;
  }

  .phone-visual {
    display: none;
  }

  .panel,
  .guide-panel,
  .result {
    border-radius: 22px;
  }

  .input-shell {
    grid-template-columns: minmax(0, 1fr) 48px 48px;
  }

  .input-shell input {
    font-size: 16px;
  }

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

  .preview img {
    max-width: 220px;
  }

  .author-card {
    width: 100%;
    border-radius: 18px;
  }

  .author-card small {
    max-width: 100%;
    white-space: normal;
  }

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

  .music-content {
    grid-template-columns: 52px 1fr;
  }

  .music-content img {
    width: 52px;
    height: 52px;
    border-radius: 15px;
  }

  .backup-item {
    grid-template-columns: 1fr;
  }

  .profile-options {
    grid-template-columns: 1fr;
  }

  .proxy-toggle {
    width: 100%;
  }

  .mode-switch {
    grid-template-columns: 1fr;
  }

  .asset-list {
    grid-template-columns: 1fr;
  }

  .profile-item {
    grid-template-columns: 22px 72px minmax(0, 1fr);
    align-items: start;
  }

  .profile-item > img {
    width: 72px;
    height: 96px;
  }

  .profile-actions {
    grid-column: 1 / -1;
  }

  .backup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mini-actions button,
  .mini-actions a,
  .backup-actions button,
  .backup-actions a {
    width: 100%;
  }

  pre {
    max-height: 320px;
    font-size: 12px;
  }
}
