@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-cyrillic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+2116, U+00AB, U+00BB,
    U+2013, U+2014, U+2026;
}

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122;
}

:root {
  --bg: #0b0f0c;
  --bg-2: #101610;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.055);
  --line: rgba(236, 246, 231, 0.1);
  --line-strong: rgba(236, 246, 231, 0.16);
  --text: #f2f7ee;
  --muted: #a5b2a1;
  --muted-2: #7d8b7b;
  --acid: #d7ff4f;
  --acid-soft: rgba(215, 255, 79, 0.12);
  --cyan: #7de8e5;
  --danger: #ff8f8f;
  --warn: #ffc977;
  --radius: 24px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --font: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--acid);
  color: #0b0f0c;
}

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

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.page-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.page-glow-a {
  width: 520px;
  height: 520px;
  top: -220px;
  left: -180px;
  background: radial-gradient(circle, rgba(215, 255, 79, 0.16), transparent 68%);
}

.page-glow-b {
  width: 620px;
  height: 620px;
  top: 180px;
  right: -320px;
  background: radial-gradient(circle, rgba(125, 232, 229, 0.1), transparent 70%);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -0.035em;
  font-size: 16px;
}

.logo-mark {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--acid), var(--cyan));
  box-shadow: 0 0 0 1px rgba(215, 255, 79, 0.18),
    0 10px 28px rgba(215, 255, 79, 0.16);
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 3px;
  background: #0b0f0c;
  transform: rotate(45deg);
}

.logo-mark.small {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.logo-mark.small::after {
  inset: 7px;
  border-radius: 2px;
}

.logo-text em {
  font-style: normal;
  color: var(--acid);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-link {
  color: var(--muted);
  font-size: 13px;
  transition: color 0.2s ease;
}

.topbar-link:hover {
  color: var(--text);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
}

.badge[data-tone="ok"] {
  color: var(--acid);
  border-color: rgba(215, 255, 79, 0.22);
  background: rgba(215, 255, 79, 0.07);
}

.badge[data-tone="ok"]::before {
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(215, 255, 79, 0.12);
}

.badge[data-tone="warn"] {
  color: var(--warn);
  border-color: rgba(255, 201, 119, 0.24);
  background: rgba(255, 201, 119, 0.07);
}

.badge[data-tone="warn"]::before {
  background: var(--warn);
}

.badge[data-tone="error"] {
  color: var(--danger);
  border-color: rgba(255, 143, 143, 0.24);
  background: rgba(255, 143, 143, 0.07);
}

.badge[data-tone="error"]::before {
  background: var(--danger);
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
  padding: 64px 0 40px;
}

.hero-copy {
  animation: fade-up 0.7s ease both;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--acid);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(215, 255, 79, 0.12);
}

.hero h1 {
  margin: 18px 0 20px;
  max-width: 760px;
  font-size: clamp(44px, 6vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.07em;
  font-weight: 780;
}

.hero h1 span {
  color: var(--acid);
}

.hero-lead {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted-2);
  font-size: 12px;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-points li span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
}

.hero-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 470px;
  animation: fade-up 0.8s 0.08s ease both;
}

.preview-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: #111712;
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(1.2deg);
}

.preview-topline {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.preview-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.preview-dot:first-child {
  background: rgba(255, 143, 143, 0.7);
}

.preview-dot:nth-child(2) {
  background: rgba(255, 201, 119, 0.7);
}

.preview-dot:nth-child(3) {
  background: rgba(215, 255, 79, 0.65);
}

.preview-url {
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.preview-body {
  padding: 22px;
  background: radial-gradient(circle at 70% 0%, rgba(215, 255, 79, 0.08), transparent 50%),
    #0d130e;
}

.preview-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.preview-brand {
  width: 74px;
  height: 9px;
  border-radius: 999px;
  background: rgba(242, 247, 238, 0.7);
}

.preview-pill {
  width: 54px;
  height: 22px;
  border-radius: 999px;
  background: var(--acid);
  opacity: 0.85;
}

.preview-hero {
  padding: 8px 0 28px;
}

.preview-kicker {
  display: block;
  width: 92px;
  height: 7px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: rgba(215, 255, 79, 0.6);
}

.preview-title {
  display: block;
  width: 92%;
  height: 22px;
  margin-bottom: 8px;
  border-radius: 6px;
  background: rgba(242, 247, 238, 0.9);
}

.preview-title.short {
  width: 66%;
  background: rgba(215, 255, 79, 0.9);
}

.preview-text {
  display: block;
  width: 78%;
  height: 7px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(165, 178, 161, 0.35);
}

.preview-text.shorter {
  width: 58%;
  margin-top: 8px;
}

.preview-cta {
  display: block;
  width: 118px;
  height: 34px;
  margin-top: 22px;
  border-radius: 999px;
  background: var(--acid);
}

.preview-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.preview-cards span {
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.preview-float {
  position: absolute;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(16, 22, 16, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  animation: float 7s ease-in-out infinite;
}

.preview-float strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  letter-spacing: -0.03em;
}

.preview-float span {
  color: var(--muted-2);
  font-size: 10px;
}

.preview-float-a {
  top: 11%;
  right: -8px;
}

.preview-float-b {
  bottom: 10%;
  left: -10px;
  animation-delay: -3s;
}

.section {
  position: relative;
  z-index: 1;
  padding: 64px 0;
}

.section-head {
  max-width: 660px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 10px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 780;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.composer {
  max-width: 900px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 18px;
}

.field:last-of-type {
  margin-bottom: 0;
}

.field-reset {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field label,
.field legend {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

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

.counter {
  color: var(--muted-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

textarea,
input[type="text"],
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(7, 11, 8, 0.62);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
  min-height: 170px;
  padding: 15px 16px;
  resize: vertical;
  line-height: 1.65;
}

input[type="text"],
select {
  height: 48px;
  padding: 0 14px;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

textarea::placeholder,
input::placeholder {
  color: rgba(165, 178, 161, 0.42);
}

textarea:focus,
input[type="text"]:focus,
select:focus {
  border-color: rgba(215, 255, 79, 0.55);
  box-shadow: 0 0 0 4px rgba(215, 255, 79, 0.08);
  background: rgba(7, 11, 8, 0.82);
}

.hint {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.chip {
  position: relative;
  display: inline-flex;
}

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

.chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chip span:hover {
  border-color: rgba(215, 255, 79, 0.3);
  color: var(--text);
}

.chip input:checked + span {
  border-color: var(--acid);
  background: var(--acid);
  color: #0b0f0c;
  box-shadow: 0 8px 24px rgba(215, 255, 79, 0.16);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 20px 0 18px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
  cursor: pointer;
}

.consent input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: var(--acid);
  cursor: pointer;
}

.consent a {
  color: var(--acid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 780;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--acid);
  color: #0b0f0c;
  box-shadow: 0 14px 34px rgba(215, 255, 79, 0.14);
}

.btn-primary:hover {
  background: #e3ff7d;
  box-shadow: 0 18px 42px rgba(215, 255, 79, 0.2);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.065);
}

.btn-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn-quiet:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.btn-submit {
  width: 100%;
  min-height: 54px;
  font-size: 15px;
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.btn-submit:hover .btn-arrow {
  transform: translateX(3px);
}

.form-note {
  margin: 12px 0 0;
  color: var(--muted-2);
  font-size: 10.5px;
  text-align: center;
}

.status {
  min-height: 20px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  transition: color 0.2s ease;
}

.status[data-tone="error"] {
  color: var(--danger);
}

.status[data-tone="success"] {
  color: var(--acid);
}

.status[data-tone="warn"] {
  color: var(--warn);
}

.result {
  scroll-margin-top: 24px;
}

.result-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.result-head h2 {
  margin: 8px 0 6px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.result-meta {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
}

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

.preview-frame {
  height: min(78vh, 760px);
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.preview-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.preview-note {
  margin: 12px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.6;
}

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

.step {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 22px;
  border-radius: 11px;
  background: var(--acid-soft);
  color: var(--acid);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 100;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #1a120e;
  color: var(--warn);
  font-size: 13px;
  text-align: center;
}

.muted {
  color: var(--muted-2);
  font-weight: 500;
  letter-spacing: 0;
}

/* Юридические страницы */
.legal-page {
  position: relative;
  z-index: 1;
  padding: 48px 0 80px;
}

.legal-card {
  max-width: 840px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 46px);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.legal-card h1 {
  margin: 12px 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.legal-meta {
  margin: 0 0 28px;
  color: var(--muted-2);
  font-size: 11px;
}

.legal-card h2 {
  margin: 30px 0 10px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.legal-card ul {
  margin: 8px 0 14px;
  padding-left: 20px;
}

.legal-card a {
  color: var(--acid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-card strong {
  color: var(--text);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  color: var(--acid);
  font-size: 12px;
  font-weight: 700;
}

.legal-note {
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 201, 119, 0.22);
  border-radius: 14px;
  background: rgba(255, 201, 119, 0.055);
  color: var(--warn);
  font-size: 11.5px;
  line-height: 1.65;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 40px 0 20px;
  }

  .hero-preview {
    min-height: 360px;
    order: 2;
  }

  .preview-shell {
    transform: none;
    max-width: 390px;
  }

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

@media (max-width: 680px) {
  .container {
    width: calc(100% - 32px);
  }

  .topbar {
    padding: 18px 0;
  }

  .topbar-link {
    display: none;
  }

  .hero h1 {
    font-size: clamp(40px, 11vw, 56px);
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

  .preview-float {
    display: none;
  }

  .preview-shell {
    max-width: 100%;
  }

  .result-actions {
    width: 100%;
  }

  .result-actions .btn {
    flex: 1 1 auto;
  }

  .preview-frame {
    min-height: 380px;
    height: 70vh;
    border-radius: 18px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── App shell / mini-app layout ─────────────────────────────────────── */
.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 20px 112px;
  box-sizing: border-box;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0 12px;
  border-bottom: 1px solid transparent;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.app-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-main {
  padding-top: 8px;
}

.screen {
  animation: screen-in 0.3s ease both;
}

.avatar-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  overflow: hidden;
  cursor: pointer;
}

.avatar-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.avatar-initials {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.03em;
  color: var(--acid);
}

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

.home-head {
  padding: 18px 0 22px;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  padding: 6px 9px;
  border: 1px solid rgba(215, 255, 79, 0.16);
  border-radius: 999px;
  background: rgba(215, 255, 79, 0.055);
  color: var(--acid);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 3px rgba(215, 255, 79, 0.12);
}

.eyebrow {
  margin: 0;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.home-title {
  margin: 10px 0 12px;
  max-width: 560px;
  font-size: clamp(35px, 7vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 780;
}

.home-title span {
  color: var(--acid);
}

.home-lead {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

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

.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 214px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 25px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.action-card:hover {
  transform: translateY(-2px);
}

.action-card:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.action-primary {
  background: var(--acid);
  color: #0b0f0c;
  border-color: transparent;
  box-shadow: 0 22px 60px rgba(215, 255, 79, 0.13);
}

.action-dark {
  background:
    radial-gradient(circle at 85% 0%, rgba(125, 232, 229, 0.12), transparent 46%),
    #121812;
  color: var(--text);
}

.action-dark::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(125, 232, 229, 0.12);
  border-radius: 50%;
}

.action-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.action-badge {
  padding: 5px 8px;
  border: 1px solid rgba(11, 15, 12, 0.14);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

.action-dark .action-badge {
  border-color: var(--line-strong);
  color: var(--muted);
}

.action-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #0b0f0c;
  color: var(--acid);
  font-size: 15px;
  font-weight: 700;
}

.action-dark .action-arrow {
  background: var(--surface-2);
  color: var(--text);
}

.action-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.action-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  border-radius: 11px;
  background: rgba(11, 15, 12, 0.1);
  color: #0b0f0c;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}

.action-dark .action-icon {
  background: var(--surface-2);
  color: var(--cyan);
}

.folder-icon::before {
  content: "";
  width: 17px;
  height: 13px;
  border: 1.6px solid currentColor;
  border-radius: 3px;
  box-shadow: inset 0 4px 0 -1px currentColor;
}

.action-title {
  font-size: clamp(18px, 3.6vw, 21px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 780;
}

.action-text {
  color: rgba(11, 15, 12, 0.5);
  font-size: 9.5px;
  font-weight: 600;
}

.action-dark .action-text {
  color: var(--muted-2);
}

.app-section {
  margin-top: 30px;
}

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

.section-line h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 750;
}

.section-line a,
.section-hint {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.section-line a:hover {
  color: var(--acid);
}

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

.project-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px 9px 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.project-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.project-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border-radius: 13px;
  border: 1px solid var(--line);
  overflow: hidden;
  font-size: 17px;
  font-weight: 850;
}

.thumb-minimal { background: linear-gradient(135deg, #edf3df, #b9d39a); color: #244019; }
.thumb-premium { background: linear-gradient(135deg, #3b3120, #c7a866); color: #17130b; }
.thumb-tech { background: linear-gradient(135deg, #0b2230, #67e8f9); color: #041016; }
.thumb-warm { background: linear-gradient(135deg, #ffe6c7, #ea8a45); color: #3a1c09; }

.project-item-body {
  min-width: 0;
  flex: 1;
}

.project-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.project-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 9px;
}

.project-item-arrow {
  color: var(--muted-2);
  font-size: 14px;
}

.project-empty-mini {
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
}

.style-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.style-row::-webkit-scrollbar {
  display: none;
}

.style-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 0 0 132px;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.style-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.style-card:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.style-swatch {
  width: 100%;
  height: 54px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.swatch-minimal { background: linear-gradient(135deg, #f5f2e8, #b9d39a 60%, #2f5d1f); }
.swatch-premium { background: linear-gradient(135deg, #17130c, #6d5a35 55%, #d8b979); }
.swatch-tech { background: linear-gradient(135deg, #08111d, #14506a 55%, #67e8f9); }
.swatch-warm { background: linear-gradient(135deg, #fff3df, #fdba74 55%, #c2410c); }

.style-card strong {
  padding-left: 2px;
  font-size: 11px;
  font-weight: 750;
}

.style-card small {
  padding-left: 2px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.mini-steps {
  display: grid;
  gap: 8px;
}

.mini-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.mini-step > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--acid-soft);
  color: var(--acid);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.mini-step strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
}

.mini-step p {
  margin: 2px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.55;
}

/* ── Page header / forms ────────────────────────────────────────────── */
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 0 22px;
}

.page-head-copy {
  min-width: 0;
}

.page-head h1 {
  margin: 7px 0 7px;
  font-size: clamp(29px, 6vw, 38px);
  line-height: 1;
  letter-spacing: -0.055em;
  font-weight: 780;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.back-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  margin-top: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.back-btn:hover {
  background: var(--surface-2);
  border-color: var(--acid);
}

.composer {
  max-width: none;
  padding: 18px;
  border-radius: 24px;
}

.composer .field:last-of-type {
  margin-bottom: 18px;
}

.section-chips .chip span {
  min-height: 34px;
  padding: 0 10px;
  font-size: 10px;
}

.btn-submit {
  min-height: 50px;
  font-size: 14px;
}

.result {
  margin-top: 26px;
  scroll-margin-top: 80px;
}

.project-actions {
  margin-bottom: 12px;
}

.detail-list {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
}

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

.detail-row span {
  color: var(--muted-2);
}

.detail-row strong {
  max-width: 65%;
  color: var(--text);
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

/* ── Projects ───────────────────────────────────────────────────────── */
.projects-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.search-wrap {
  position: relative;
  min-width: 0;
  flex: 1;
}

.search-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  font: inherit;
  font-size: 11px;
}

.search-wrap input:focus {
  border-color: rgba(215, 255, 79, 0.5);
  box-shadow: 0 0 0 3px rgba(215, 255, 79, 0.07);
}

.search-wrap input::placeholder {
  color: var(--muted-2);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 12px;
  height: 12px;
  border: 1.6px solid var(--muted-2);
  border-radius: 50%;
  transform: translateY(-60%);
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 5px;
  height: 1.6px;
  border-radius: 999px;
  background: var(--muted-2);
  transform: rotate(45deg);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.project-card:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.project-card .project-thumb {
  width: 100%;
  height: 92px;
  border-radius: 12px;
  font-size: 26px;
}

.project-card-body {
  padding: 9px 4px 4px;
}

.project-card-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 700;
}

.project-card-meta {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.project-card-delete {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(7, 11, 8, 0.65);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1;
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.project-card-delete:hover {
  color: var(--danger);
  border-color: rgba(255, 143, 143, 0.4);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 42px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--surface);
  color: var(--acid);
  font-size: 22px;
}

.empty-state strong {
  font-size: 16px;
  letter-spacing: -0.025em;
}

.empty-state p {
  max-width: 260px;
  margin: 6px 0 16px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.6;
}

/* ── Profile / settings ─────────────────────────────────────────────── */
.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(215, 255, 79, 0.08), transparent 42%),
    var(--surface);
}

.profile-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(215, 255, 79, 0.22);
  border-radius: 19px;
  background: linear-gradient(135deg, #343d22, #11180d);
  color: var(--acid);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

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

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

.profile-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 780;
  letter-spacing: -0.03em;
}

.profile-handle {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
}

.profile-id {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.stat strong {
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 780;
}

.stat span {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.plan-card {
  margin-top: 10px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--acid), #b9e83d);
  color: #0b0f0c;
  box-shadow: 0 22px 50px rgba(215, 255, 79, 0.1);
}

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

.plan-card .badge {
  border-color: rgba(11, 15, 12, 0.16);
  background: rgba(11, 15, 12, 0.08);
  color: #0b0f0c;
}

.plan-price {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.plan-card h2 {
  margin: 15px 0 4px;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.055em;
}

.plan-card p {
  margin: 0;
  max-width: 360px;
  color: rgba(11, 15, 12, 0.58);
  font-size: 10px;
  line-height: 1.55;
}

.plan-bar {
  height: 4px;
  margin: 16px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(11, 15, 12, 0.14);
}

.plan-bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #0b0f0c;
}

.plan-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 9px;
  font-weight: 650;
}

.plan-bottom .btn {
  min-height: 34px;
  padding: 0 12px;
  border-color: rgba(11, 15, 12, 0.16);
  background: rgba(11, 15, 12, 0.08);
  color: #0b0f0c;
  font-size: 9px;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.quick-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.quick-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 5px;
  border-radius: 9px;
  background: var(--acid-soft);
  color: var(--acid);
  font-size: 16px;
  font-weight: 600;
}

.gear-icon::before {
  content: "⚙";
  font-size: 16px;
  line-height: 1;
}

.doc-icon::before {
  content: "▤";
  font-size: 14px;
  line-height: 1;
}

.quick-card strong {
  font-size: 11px;
  font-weight: 700;
}

.quick-card small {
  color: var(--muted-2);
  font-size: 8.5px;
}

.list-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.list-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.list-row.static {
  cursor: default;
}

.list-row.static:hover {
  background: transparent;
}

.list-row strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-align: right;
}

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

.switch {
  appearance: none;
  position: relative;
  width: 40px;
  height: 23px;
  flex: 0 0 auto;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s ease, background 0.2s ease;
}

.switch:checked {
  border-color: var(--acid);
  background: var(--acid);
}

.switch:checked::after {
  background: #0b0f0c;
  transform: translateX(17px);
}

.switch:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.app-note {
  margin: 18px 2px 0;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.65;
}

.app-version {
  margin: 28px 0 0;
  color: rgba(165, 178, 161, 0.35);
  font-size: 8.5px;
  text-align: center;
}

.danger-text {
  color: var(--danger) !important;
}

.btn-danger {
  background: var(--danger);
  color: #1a0b0b;
}

/* ── Bottom navigation ──────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  max-width: 720px;
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(11, 15, 12, 0.96);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
  box-sizing: border-box;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  border-radius: 14px;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 650;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-item:hover {
  color: var(--text);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 25px;
  border-radius: 9px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
}

.nav-item.is-active {
  color: var(--acid);
}

.nav-item.is-active .nav-icon {
  background: var(--acid-soft);
}

/* ── Modal / toast ──────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: end center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(390px, 100%);
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: #111711;
  box-shadow: var(--shadow);
  animation: fade-up 0.2s ease both;
}

.modal-card h2 {
  margin: 0 0 7px;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.modal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.modal-actions .btn {
  flex: 1;
  min-height: 42px;
  font-size: 11px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 100;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(17, 23, 17, 0.96);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 10.5px;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
  animation: fade-up 0.2s ease both;
}

.toast[data-tone="success"] {
  border-color: rgba(215, 255, 79, 0.3);
  color: var(--acid);
}

.toast[data-tone="error"] {
  border-color: rgba(255, 143, 143, 0.3);
  color: var(--danger);
}

@media (min-width: 760px) {
  .app-shell {
    padding-left: 24px;
    padding-right: 24px;
  }

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

@media (max-width: 380px) {
  .app-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .action-card {
    min-height: 180px;
  }

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

  .project-card .project-thumb {
    height: 120px;
  }

  .app-topbar .badge {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen,
  .modal-card,
  .toast {
    animation: none !important;
  }
}

.modal-open {
  overflow: hidden;
}

.project-item-title {
  display: block;
}

/* Prevent long project titles from widening the mobile layout viewport */
.app-main,
.screen,
.app-section,
.project-list {
  min-width: 0;
}

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

.project-item,
.project-item-body {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.project-item-title,
.project-item-meta {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

#projectTitle {
  font-size: clamp(22px, 5.2vw, 32px);
  line-height: 1.06;
}

.project-actions .btn-quiet {
  flex: 0 0 auto;
  margin-left: auto;
}

@media (max-width: 380px) {
  .home-actions {
    grid-template-columns: 1fr;
  }

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

@keyframes screen-in {
  from {
    transform: translateY(10px);
  }
  to {
    transform: translateY(0);
  }
}

/* Typography + touch-target polish */
body {
  hyphens: auto;
}

.home-title,
.page-head h1,
.section-line h2,
.home-actions .action-title {
  hyphens: none;
  text-wrap: balance;
}

.counter,
.stat strong,
.plan-price,
.project-item-meta,
.project-card-meta {
  font-variant-numeric: tabular-nums;
}

.avatar-btn,
.back-btn {
  width: 44px;
  height: 44px;
}

.chip span {
  min-height: 44px;
}

.section-chips .chip span {
  min-height: 42px;
}

.search-wrap input {
  height: 44px;
}

.btn-sm {
  min-height: 42px;
}

/* Readable microcopy and accessible hit areas */
.action-badge,
.badge,
.kicker,
.action-text,
.project-item-meta,
.section-line a,
.section-hint,
.style-card small,
.stat span,
.plan-card p,
.plan-bottom,
.quick-card small,
.project-card-meta,
.profile-id,
.nav-item,
.app-version,
.app-note,
.mini-step p {
  font-size: 11px;
}

.logo,
.section-line a {
  min-height: 44px;
}

.section-line a {
  display: inline-flex;
  align-items: center;
}

.btn-sm,
.section-chips .chip span {
  min-height: 44px;
}

.search-wrap input {
  font-size: 12px;
}

.list-row {
  font-size: 12px;
}

.quick-card strong {
  font-size: 12px;
}

.project-item-title,
.project-card-title {
  font-size: 12.5px;
}

@media (max-width: 380px) {
  .badge,
  .kicker,
  .action-badge,
  .nav-item {
    font-size: 10px;
  }
}

.form-note,
.profile-handle,
.list-row strong {
  font-size: 11px;
}

/* ── Voice input ────────────────────────────────────────────────────── */
.field-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.voice-btn svg {
  width: 16px;
  height: 16px;
}

.voice-btn:hover {
  color: var(--acid);
  border-color: rgba(215, 255, 79, 0.35);
}

.voice-btn.is-listening {
  color: #0b0f0c;
  border-color: var(--acid);
  background: var(--acid);
  animation: voice-pulse 1.4s ease-in-out infinite;
}

.voice-btn.is-unavailable {
  opacity: 0.45;
}

.voice-live {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(215, 255, 79, 0.18);
  border-radius: 10px;
  background: rgba(215, 255, 79, 0.055);
  color: var(--acid);
  font-size: 11px;
  line-height: 1.5;
}

.voice-help {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-2);
  font-size: 10.5px;
}

.voice-help summary {
  padding: 9px 11px;
  color: var(--muted);
  font-weight: 650;
  cursor: pointer;
}

.voice-help-body {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 11px 11px;
}

.voice-help-body span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-2);
  font-size: 9.5px;
}

@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(215, 255, 79, 0.28); }
  50% { box-shadow: 0 0 0 7px rgba(215, 255, 79, 0); }
}

/* ── Block editor ───────────────────────────────────────────────────── */
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.editor-selects {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-selects label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 650;
}

.editor-selects select {
  height: 34px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 10.5px;
}

.editor-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.editor-status {
  width: 100%;
  min-height: 14px;
  color: var(--muted-2);
  font-size: 10px;
}

.editor-status[data-tone="success"] { color: var(--acid); }
.editor-status[data-tone="error"] { color: var(--danger); }

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  align-items: start;
}

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

.editor-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.editor-card.is-hidden {
  opacity: 0.55;
  border-style: dashed;
}

.editor-card.is-dragging {
  opacity: 0.45;
}

.editor-card.is-drag-over {
  border-color: var(--acid);
  box-shadow: 0 0 0 2px rgba(215, 255, 79, 0.12);
}

.editor-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 7px 9px;
}

.editor-drag {
  color: var(--muted-2);
  font-size: 17px;
  line-height: 1;
  cursor: grab;
  user-select: none;
}

.editor-card-title {
  min-width: 0;
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.editor-card-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.editor-icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.editor-icon-btn:hover {
  color: var(--acid);
  border-color: rgba(215, 255, 79, 0.3);
}

.editor-switch {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

.editor-switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--acid);
  cursor: pointer;
}

.editor-body {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
}

.editor-field {
  display: grid;
  gap: 5px;
}

.editor-field > span {
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 650;
}

.editor-field input,
.editor-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(7, 11, 8, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  outline: none;
}

.editor-field input {
  height: 36px;
  padding: 0 9px;
}

.editor-field textarea {
  min-height: 58px;
  padding: 8px 9px;
  resize: vertical;
  line-height: 1.55;
}

.editor-field input:focus,
.editor-field textarea:focus {
  border-color: rgba(215, 255, 79, 0.45);
  box-shadow: 0 0 0 3px rgba(215, 255, 79, 0.06);
}

.editor-item {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.editor-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.editor-remove {
  padding: 3px 7px;
  border: 1px solid rgba(255, 143, 143, 0.18);
  border-radius: 999px;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.editor-add {
  min-height: 36px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.editor-add:hover {
  color: var(--acid);
  border-color: rgba(215, 255, 79, 0.3);
}

.editor-preview-col {
  position: sticky;
  top: 82px;
}

.editor-preview {
  height: min(72vh, 680px);
  min-height: 420px;
}

@media (max-width: 900px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .editor-preview-col {
    position: static;
  }

  .editor-preview {
    height: 55vh;
    min-height: 360px;
  }
}

@media (max-width: 480px) {
  .editor-toolbar {
    padding: 10px;
  }

  .editor-actions {
    width: 100%;
    margin-left: 0;
  }

  .editor-actions .btn {
    flex: 1;
  }

  .voice-help-body span {
    font-size: 9px;
  }
}

#editorTitle {
  font-size: clamp(21px, 4.8vw, 30px);
  line-height: 1.08;
}

/* ── Billing ───────────────────────────────────────────────────────── */
.card-icon::before {
  content: "▣";
  font-size: 15px;
  line-height: 1;
}

.billing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(215, 255, 79, 0.11), transparent 52%),
    var(--surface);
}

.billing-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.billing-balance h2 {
  margin: 2px 0 0;
  font-size: clamp(28px, 7.4vw, 44px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.billing-balance h2 span {
  color: var(--acid);
}

.billing-balance p {
  margin: 2px 0 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.billing-plan {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
}

.billing-plan[data-tone="ok"] {
  border-color: rgba(215, 255, 79, 0.25);
  color: var(--acid);
}

.billing-plan[data-tone="warn"] {
  border-color: rgba(255, 196, 92, 0.25);
  color: #ffc45c;
}

.billing-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-content: end;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.billing-totals div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.16);
}

.billing-totals span {
  color: var(--muted-2);
  font-size: 9px;
}

.billing-totals strong {
  font-size: 15px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

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

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.price-card.is-popular {
  border-color: rgba(215, 255, 79, 0.4);
  background: rgba(215, 255, 79, 0.055);
}

.price-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--acid);
  color: #10140a;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.price-card h3 {
  margin: 0;
  padding-right: 34px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.price-value {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.055em;
}

.price-per {
  color: var(--acid);
  font-size: 9px;
  font-weight: 650;
}

.price-note {
  flex: 1;
  margin: 3px 0 7px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.45;
}

.price-button {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  opacity: 0.55;
  font-size: 9.5px;
}

.billing-note {
  margin: 9px 0 0;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.6;
}

.billing-note a {
  color: var(--acid);
  text-decoration: none;
}

.billing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

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

.billing-row-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.billing-row-info strong {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-row-info span {
  color: var(--muted-2);
  font-size: 9px;
}

.billing-amount {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.billing-amount.is-plus {
  color: var(--acid);
}

.billing-empty {
  padding: 18px 12px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.billing-demo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
}

.billing-demo strong {
  font-size: 11px;
}

.billing-demo p {
  max-width: 440px;
  margin: 3px 0 0;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .billing-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .billing-totals {
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .price-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 10px;
    padding: 12px;
  }

  .price-card h3 {
    padding-right: 0;
  }

  .price-badge {
    position: static;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin-bottom: 2px;
  }

  .price-value {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
    font-size: 22px;
  }

  .price-per {
    grid-column: 1;
  }

  .price-note {
    grid-column: 1 / -1;
    margin: 3px 0 7px;
  }

  .price-button {
    grid-column: 1 / -1;
  }

  .billing-demo {
    align-items: flex-start;
    flex-direction: column;
  }

  .billing-demo .btn {
    width: 100%;
  }
}

/* Billing readability and touch targets */
.billing-balance p,
.billing-plan,
.billing-totals span,
.price-badge,
.price-per,
.price-note,
.price-button,
.billing-note,
.billing-row-info strong,
.billing-row-info span,
.billing-empty,
.billing-demo p {
  font-size: 11px;
}

.price-button {
  min-height: 44px;
}

.billing-note a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
}

.billing-note a {
  min-width: 44px;
  justify-content: center;
}
