:root {
  --cream: #f4e8d7;
  --cream-soft: rgba(244, 232, 215, 0.78);
  --glass: rgba(244, 232, 215, 0.18);
  --glass-strong: rgba(244, 232, 215, 0.32);
  --white-glass: rgba(255, 255, 255, 0.18);
  --red: #ab0000;
  --blue: #091d46;
  --black: #0d0d0d;
  --wine: #210707;
  --brown: #3b1913;
  --shadow: 0 24px 50px rgba(13, 13, 13, 0.3);
  --inner-glow:
    inset 0 1px 0 rgba(244, 232, 215, 0.46),
    inset 0 -18px 42px rgba(171, 0, 0, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.24);
  font-family: Inter, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  color: white;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 70% 12%, rgba(244, 232, 215, 0.88), transparent 18%),
    radial-gradient(circle at 88% 30%, rgba(171, 0, 0, 0.68), transparent 24%),
    radial-gradient(circle at 18% 32%, rgba(9, 29, 70, 0.78), transparent 30%),
    radial-gradient(circle at 72% 88%, rgba(13, 13, 13, 0.84), transparent 34%),
    linear-gradient(145deg, #0d0d0d 0%, #091d46 38%, #ab0000 68%, #f4e8d7 115%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 52% 20%, rgba(244, 232, 215, 0.38), transparent 16%),
    radial-gradient(ellipse at 58% 30%, rgba(13, 13, 13, 0.42), transparent 22%),
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 7px);
  mix-blend-mode: soft-light;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 12%, transparent 88%, rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at 50% 4%, rgba(244, 232, 215, 0.22), transparent 12%);
  filter: blur(0.2px);
}

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

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 18px 104px;
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(18px);
}

.app-shell::after {
  content: "";
  position: absolute;
  top: 72px;
  right: -44px;
  z-index: -1;
  width: 260px;
  height: 360px;
  border-radius: 999px;
  background: linear-gradient(160deg, rgba(255, 229, 174, 0.42), rgba(255, 104, 36, 0.08));
  background: linear-gradient(160deg, rgba(244, 232, 215, 0.36), rgba(171, 0, 0, 0.1));
  filter: blur(18px);
  transform: rotate(-14deg);
}

.status-row,
.brand-row,
.screen-head,
.section-head,
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.api-status {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(13, 13, 13, 0.2);
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: var(--inner-glow);
  backdrop-filter: blur(18px);
}

.api-status.is-online {
  background: rgba(244, 232, 215, 0.9);
  color: var(--wine);
}

.api-status.is-warning {
  background: rgba(171, 0, 0, 0.74);
  color: white;
}

.api-status.is-offline {
  background: rgba(13, 13, 13, 0.48);
  color: rgba(244, 232, 215, 0.82);
}

.status-row {
  padding: 2px 4px 22px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 800;
}

.brand-row p,
.eyebrow {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 3px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 36px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

h3 {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.035em;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 8px 7px 18px;
  background:
    linear-gradient(135deg, rgba(244, 232, 215, 0.34), rgba(255, 255, 255, 0.08) 44%, rgba(171, 0, 0, 0.18)),
    rgba(255, 255, 255, 0.15);
  color: white;
  box-shadow: var(--inner-glow), 0 14px 30px rgba(96, 27, 9, 0.25);
  backdrop-filter: blur(24px) saturate(1.35);
}

.profile-pill span {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-pill b {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--red), var(--black));
  color: white;
}

.screen {
  display: none;
  padding-top: 28px;
}

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

.glass-card,
.glass-field,
.project-card,
.preset-card,
.circle-button,
.round-action {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(244, 232, 215, 0.34), rgba(255, 255, 255, 0.08) 42%, rgba(171, 0, 0, 0.16)),
    radial-gradient(circle at 22% 0%, rgba(244, 232, 215, 0.26), transparent 34%),
    rgba(9, 29, 70, 0.2);
  box-shadow: var(--shadow), var(--inner-glow);
  backdrop-filter: blur(28px) saturate(1.45);
  -webkit-backdrop-filter: blur(28px) saturate(1.45);
}

.hero-card {
  display: grid;
  gap: 28px;
  min-height: 230px;
  border-radius: 34px;
  padding: 24px 22px 18px;
  position: relative;
  overflow: hidden;
}

.glass-card::before,
.project-card::before,
.preset-card::before,
.glass-field::before,
.circle-button::before,
.round-action::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.5), transparent 24%),
    linear-gradient(330deg, rgba(255, 255, 255, 0.12), transparent 34%);
  opacity: 0.72;
  mask-image: linear-gradient(#000, transparent 68%);
}

.glass-card,
.project-card,
.preset-card,
.glass-field,
.circle-button,
.round-action {
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -42px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, rgba(244, 232, 215, 0.86), transparent 16%),
    radial-gradient(circle at 60% 58%, rgba(171, 0, 0, 0.44), transparent 44%);
  filter: blur(3px);
}

.hero-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 42px;
  top: 14px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent);
  filter: blur(10px);
  opacity: 0.9;
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-card h2 {
  max-width: 310px;
  margin-top: 12px;
}

.soft-copy {
  max-width: 310px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
  line-height: 1.45;
}

.round-action,
.circle-button {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: white;
  font-size: 30px;
}

.primary-action,
.send-button,
.text-action {
  border: 0;
  color: white;
}

.primary-action {
  min-height: 58px;
  border-radius: 999px;
  padding: 0 24px;
  background:
    linear-gradient(135deg, #ffffff, var(--cream) 58%, #ffffff);
  color: var(--wine);
  font-weight: 800;
  box-shadow:
    0 16px 34px rgba(75, 23, 15, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -10px 18px rgba(171, 0, 0, 0.08);
}

.section-block {
  margin-top: 32px;
}

.section-head {
  margin-bottom: 16px;
}

.text-action {
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
}

.video-list {
  display: grid;
  gap: 12px;
}

.project-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 14px;
  min-height: 116px;
  width: 100%;
  border-radius: 28px;
  padding: 10px;
  color: white;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.project-card:hover,
.preset-card:hover,
.upload-tile:hover,
.send-button:hover {
  transform: translateY(-1px);
}

.project-card strong,
.preset-card b,
.glass-field strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}

.project-card small,
.upload-tile small,
.glass-field span,
.prompt-box span,
.preset-card span,
.insight-card p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.project-card i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.5), transparent 26%),
    rgba(255, 255, 255, 0.16);
  font-style: normal;
  font-size: 24px;
  box-shadow: var(--inner-glow);
}

.thumb {
  position: relative;
  display: block;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 24%, rgba(244, 232, 215, 0.84), transparent 22%),
    radial-gradient(circle at 65% 48%, rgba(171, 0, 0, 0.74), transparent 34%),
    linear-gradient(145deg, #091d46, #0d0d0d);
}

.thumb-two {
  background:
    radial-gradient(circle at 70% 30%, rgba(244, 232, 215, 0.82), transparent 25%),
    linear-gradient(145deg, #0d0d0d, #ab0000);
}

.thumb-three {
  background:
    radial-gradient(circle at 45% 45%, rgba(244, 232, 215, 0.76), transparent 24%),
    linear-gradient(145deg, #091d46, #ab0000);
}

.thumb b {
  position: absolute;
  left: 10px;
  bottom: 9px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(13, 13, 13, 0.58);
  color: white;
  font-size: 12px;
}

.screen-head {
  min-height: 62px;
}

.screen-head h2 {
  font-size: 32px;
}

.circle-button {
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.44), transparent 28%),
    rgba(244, 232, 215, 0.14);
  font-size: 26px;
}

.upload-hero {
  padding: 34px 0 26px;
}

.upload-hero h2 {
  max-width: 280px;
  margin-top: 14px;
}

.media-strip {
  display: grid;
  grid-template-columns: 112px 1fr 1fr;
  gap: 8px;
  min-height: 146px;
  border-radius: 32px;
  padding: 10px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 26px 56px rgba(13, 13, 13, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -22px 44px rgba(171, 0, 0, 0.13);
}

.media-strip::before {
  content: "";
  position: absolute;
  inset: -40px auto auto 32%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(244, 232, 215, 0.18);
  filter: blur(18px);
}

.media-strip::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 10px;
  width: 62%;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent);
  filter: blur(8px);
  pointer-events: none;
}

.upload-tile {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.13);
  color: white;
  text-align: center;
  overflow: hidden;
  z-index: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -14px 28px rgba(171, 0, 0, 0.1);
}

.upload-tile::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 12px;
  right: 28px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  filter: blur(9px);
  pointer-events: none;
}

.upload-tile input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.upload-tile span {
  font-size: 30px;
}

.upload-tile strong {
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-tile small {
  max-width: 86%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-upload {
  background: rgba(255, 255, 255, 0.2);
}

.prompt-box {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  border-radius: 28px;
  padding: 18px;
  box-shadow:
    0 22px 44px rgba(13, 13, 13, 0.22),
    var(--inner-glow);
}

textarea,
input,
select {
  width: 100%;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
}

textarea {
  min-height: 94px;
  resize: vertical;
  line-height: 1.4;
}

textarea::placeholder,
input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

select {
  min-height: 28px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.glass-field {
  display: grid;
  gap: 8px;
  min-height: 86px;
  border-radius: 24px;
  padding: 16px;
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0 6px;
}

.chip-row label {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.14);
  color: white;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.send-button {
  width: 100%;
  min-height: 60px;
  margin-top: 16px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, #ffffff, var(--cream) 52%, #ffffff);
  color: var(--wine);
  font-size: 17px;
  font-weight: 900;
  box-shadow:
    0 18px 36px rgba(13, 13, 13, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -12px 24px rgba(171, 0, 0, 0.14);
  position: relative;
  overflow: hidden;
}

.send-button::before {
  content: "";
  position: absolute;
  inset: 2px 24px auto 24px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  filter: blur(10px);
  pointer-events: none;
}

.send-button:disabled {
  opacity: 0.62;
}

.progress-track {
  display: none;
  height: 9px;
  margin-top: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.progress-track.is-visible {
  display: block;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: white;
  transition: width 180ms ease;
}

.output-box {
  margin: 14px 0 0;
  min-height: 150px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(244, 232, 215, 0.12), rgba(9, 29, 70, 0.28)),
    rgba(13, 13, 13, 0.34);
  padding: 14px;
  color: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: var(--inner-glow);
}

.output-box:empty {
  display: none;
}

.output-box.compact {
  min-height: 80px;
}

.result-video {
  display: none;
  width: 100%;
  max-height: 68vh;
  margin-top: 14px;
  border-radius: 28px;
  background: var(--black);
  box-shadow: var(--shadow);
}

.result-video.is-visible {
  display: block;
}

.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.preset-card {
  display: grid;
  align-content: space-between;
  gap: 32px;
  min-height: 170px;
  border-radius: 30px;
  padding: 18px;
  color: white;
  text-align: left;
}

.preset-card.is-selected {
  background: rgba(255, 255, 255, 0.28);
}

.controls-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  border-radius: 28px;
  padding: 18px;
}

.controls-panel label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
}

.strategy-layout {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.score-card {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  border-radius: 34px;
  padding: 22px;
}

.score-card strong {
  display: block;
  margin-top: 8px;
  font-size: 76px;
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.score-card span {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.42;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.stat-pill {
  min-height: 104px;
}

.insight-list,
.plan-stack,
.queue-list {
  display: grid;
  gap: 12px;
}

.insight-card {
  display: grid;
  gap: 12px;
  border-radius: 30px;
  padding: 20px;
}

.insight-card b {
  font-size: 24px;
  line-height: 1.05;
}

.insight-card span {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.42;
}

.plan-card {
  display: grid;
  gap: 10px;
  border-radius: 30px;
  padding: 20px;
}

.plan-card span {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-card b,
.queue-status b {
  font-size: 24px;
  line-height: 1.05;
}

.plan-card p,
.queue-status span,
.queue-item small {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.42;
}

.queue-status {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  border-radius: 34px;
  padding: 22px;
}

.queue-progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.queue-progress i {
  display: block;
  width: 62%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffffff, #ffd7b9);
}

.queue-list {
  margin-top: 14px;
}

.queue-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  border-radius: 28px;
  padding: 14px;
}

.queue-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.08);
}

.queue-dot.active {
  background: #ffffff;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.72), 0 0 0 5px rgba(255, 255, 255, 0.1);
}

.queue-dot.done {
  background: var(--cream);
}

.queue-item button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--wine);
  font-weight: 800;
}

.tabbar {
  position: fixed;
  left: max(18px, calc(50% - 206px));
  bottom: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  width: min(286px, calc(100% - 104px));
  min-height: 72px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(244, 232, 215, 0.46), rgba(255, 255, 255, 0.14) 34%, rgba(171, 0, 0, 0.18) 72%),
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.5), transparent 28%),
    rgba(255, 255, 255, 0.18);
  box-shadow:
    0 22px 52px rgba(64, 16, 6, 0.34),
    0 5px 18px rgba(255, 255, 255, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.64),
    inset 0 -18px 36px rgba(13, 13, 13, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(36px) saturate(1.9) contrast(1.04);
  -webkit-backdrop-filter: blur(36px) saturate(1.9) contrast(1.04);
}

.tabbar::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 38px;
  top: 7px;
  height: 30px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.08));
  filter: blur(10px);
  opacity: 0.9;
  pointer-events: none;
}

.tabbar::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.38), transparent 30%),
    radial-gradient(circle at 82% 78%, rgba(171, 0, 0, 0.22), transparent 28%);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.tab {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.tab span {
  line-height: 1;
}

.tab small {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.78;
}

.tab:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.tab.is-active {
  background:
    radial-gradient(circle at 36% 18%, rgba(255, 255, 255, 0.94), transparent 25%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 232, 215, 0.9));
  color: var(--wine);
  box-shadow:
    0 11px 22px rgba(74, 21, 8, 0.24),
    0 2px 6px rgba(255, 255, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -10px 18px rgba(171, 0, 0, 0.1);
  transform: translateY(-2px);
}

.tab.is-active::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 12px;
  right: 18px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  filter: blur(6px);
  pointer-events: none;
}

.fab-button {
  position: fixed;
  right: max(18px, calc(50% - 206px));
  bottom: 18px;
  z-index: 21;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.92), transparent 23%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 232, 215, 0.88));
  color: var(--wine);
  font-size: 38px;
  line-height: 1;
  box-shadow:
    0 22px 48px rgba(13, 13, 13, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -14px 24px rgba(171, 0, 0, 0.12);
  backdrop-filter: blur(30px) saturate(1.6);
}

.fab-button::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 17px;
  right: 22px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  filter: blur(7px);
}

.fab-button:hover {
  transform: translateY(-2px);
}

@media (max-width: 380px) {
  .tabbar {
    left: 12px;
    width: calc(100% - 104px);
  }

  .fab-button {
    right: 12px;
  }
}

@media (min-width: 760px) {
  .app-shell {
    margin-top: 28px;
    margin-bottom: 28px;
    min-height: calc(100vh - 56px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 46px;
    box-shadow: 0 36px 90px rgba(55, 15, 6, 0.38);
  }
}

@media (max-width: 380px) {
  .app-shell {
    padding-inline: 12px;
  }

  h2 {
    font-size: 32px;
  }

  .media-strip {
    grid-template-columns: 1fr;
  }

  .upload-tile {
    min-height: 96px;
  }
}

/* ---------- аналитик и контент-план ---------- */

.is-hidden {
  display: none !important;
}

.chat-log {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.chat-msg {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 20px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: var(--inner-glow);
  backdrop-filter: blur(18px);
}

.chat-msg.from-user {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: linear-gradient(145deg, rgba(171, 0, 0, 0.72), rgba(59, 25, 19, 0.72));
}

.chat-msg.from-analyst {
  justify-self: start;
  border-bottom-left-radius: 6px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(244, 232, 215, 0.14), rgba(9, 29, 70, 0.34)),
    rgba(13, 13, 13, 0.38);
}

.chat-msg.is-pending {
  opacity: 0.7;
  font-style: italic;
}

.chat-msg .chat-remember {
  display: block;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--cream-soft);
  font-size: 13px;
}

.chat-msg .chat-action {
  margin-top: 10px;
  width: 100%;
  min-height: 40px;
  font-size: 14px;
}

.chat-empty {
  color: var(--cream-soft);
  line-height: 1.45;
}

.chat-insights:empty {
  display: none;
}

.chat-insights {
  white-space: pre-wrap;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px dashed var(--line);
  color: var(--cream-soft);
  font-size: 13px;
  line-height: 1.45;
}

.chat-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 110px;
  padding: 14px;
  border-radius: 24px;
}

.chat-form textarea {
  min-height: 52px;
}

.chat-note {
  color: var(--cream-soft);
  font-size: 13px;
  line-height: 1.4;
}

.chat-note:empty {
  display: none;
}

#linkForm .send-button {
  margin-top: 0;
}

#socialStats:empty {
  display: none;
}

.plan-diagnosis {
  margin-top: 16px;
  padding: 16px;
  border-radius: 24px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.plan-day {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 22px;
  display: grid;
  gap: 6px;
  line-height: 1.4;
}

.plan-day header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--cream-soft);
  font-size: 13px;
}

.plan-day .plan-hook {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.plan-day small {
  color: var(--cream-soft);
}

#planBox {
  margin-bottom: 110px;
}

/* Низ страницы светлый — без тёмной подложки белый текст теряется. */
.chat-insights,
.chat-form,
#linkForm {
  background: rgba(13, 13, 13, 0.62);
  color: rgba(255, 255, 255, 0.86);
}

/* ---------- личный кабинет ---------- */

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 28px;
  background: rgba(13, 13, 13, 0.5);
}

.profile-avatar,
.profile-pill b {
  overflow: hidden;
}

.profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--red), var(--wine));
  font-size: 28px;
  font-weight: 700;
  box-shadow: var(--inner-glow);
}

.profile-avatar img,
.profile-pill b img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-id {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.profile-name {
  font-size: 22px;
  font-weight: 700;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
}

.profile-id small {
  color: var(--cream-soft);
}

.profile-block {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(13, 13, 13, 0.55);
}

.profile-block .text-action {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cream);
}

.profile-portrait {
  line-height: 1.5;
  white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.9);
}

.profile-section {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.profile-section .section-head {
  margin: 0;
}

.profile-answer {
  display: grid;
  gap: 2px;
  line-height: 1.4;
}

.profile-answer small {
  color: var(--cream-soft);
  font-size: 12px;
}

.profile-answer .is-empty {
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}

.profile-insight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.profile-insight span {
  flex: 1;
}

.insight-remove {
  flex: 0 0 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--cream-soft);
}

#profile,
#onboarding {
  padding-bottom: 120px;
}

/* ---------- анкета ---------- */

.ob-dots {
  display: flex;
  gap: 8px;
  margin: 8px 0 14px;
}

.ob-dots i {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.ob-dots i.is-done {
  background: var(--cream-soft);
}

.ob-dots i.is-active {
  background: var(--red);
}

.ob-question {
  background: rgba(13, 13, 13, 0.55);
}

.ob-question span {
  line-height: 1.35;
  font-weight: 600;
}

.ob-optional {
  font-style: normal;
  font-weight: 400;
  color: var(--cream-soft);
  font-size: 13px;
}

.ob-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.ob-nav .send-button {
  flex: 1;
  margin-top: 0;
}

.ob-nav .text-action {
  border: 0;
  background: none;
  color: var(--cream);
}

#obIntro {
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- тарифы ---------- */

.plans-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-bottom: 120px;
}

.plan-offer {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 26px;
  background: rgba(13, 13, 13, 0.55);
}

.plan-offer.is-current {
  outline: 2px solid var(--red);
}

.plan-offer header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 19px;
}

.plan-cups {
  font-size: 20px;
  letter-spacing: 2px;
}

.plan-price {
  font-size: 22px;
}

.plan-tagline {
  color: var(--cream-soft);
  line-height: 1.4;
}

.plan-offer ul {
  margin: 4px 0 6px;
  padding-left: 20px;
  line-height: 1.5;
}

.plan-offer .send-button {
  margin-top: 4px;
}

.paywall {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(13, 13, 13, 0.62);
  line-height: 1.4;
}

.paywall span {
  color: var(--cream-soft);
}

.paywall .send-button {
  margin-top: 6px;
}

.account-title {
  font-size: 18px;
}

.usage-row {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.usage-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--cream-soft);
}

.usage-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.usage-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cream), var(--red));
}

/* ---------- несколько соцсетей ---------- */

.platform-block {
  margin-top: 14px;
}

.platform-block .eyebrow {
  margin: 0 0 8px;
}

#socialStats {
  display: block;
}

.connect-buttons {
  display: grid;
  gap: 8px;
}

.connect-button {
  margin-top: 0;
}

.subtitles-toggle strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subtitles-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--red);
}

/* ---------- «Написать нам» ---------- */

.feedback-pill {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(13, 13, 13, 0.35);
  color: white;
  font-size: 19px;
  backdrop-filter: blur(18px);
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}

.sheet-card {
  display: grid;
  gap: 12px;
  width: min(460px, 100%);
  padding: 18px;
  border-radius: 28px;
  background: rgba(13, 13, 13, 0.92);
}

.sheet-card h3 {
  margin: 0;
}

.sheet-card textarea {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.feedback-kinds {
  display: grid;
  gap: 8px;
}

.feedback-kinds label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feedback-kinds input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}
