:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #14161a;
  --muted: #6d7480;
  --line: #dce1e7;
  --vk: #0077ff;
  --green: #22a06b;
  --rose: #d9577a;
  --amber: #d8841f;
  --shadow: 0 18px 48px rgba(31, 41, 55, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.hero {
  min-height: 88vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(320px, 1.12fr);
  gap: 34px;
  align-items: center;
  padding: 32px clamp(18px, 5vw, 72px) 42px;
  background: #101820;
  color: #fff;
}

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

.eyebrow {
  margin: 0 0 18px;
  color: #96d2ff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 560px;
  color: #d9e1ea;
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 30px;
}

.primary-action,
.generate-button {
  border: 0;
  border-radius: 8px;
  background: var(--vk);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(0, 119, 255, 0.28);
}

.primary-action {
  padding: 15px 20px;
}

.price-chip {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 0 16px;
  color: #f4f8fc;
  font-weight: 700;
}

.note {
  margin-top: 14px;
  border-radius: 8px;
  background: #f2f7ff;
  padding: 12px;
  color: #40546f;
  font-size: 14px;
  line-height: 1.45;
}

.hero-image {
  width: 100%;
  min-height: 360px;
  max-height: 620px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(320px, 1.15fr) minmax(280px, 1fr);
  gap: 18px;
  padding: 24px clamp(14px, 4vw, 46px) 44px;
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.step {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  background: #e7f1ff;
  color: var(--vk);
  font-weight: 900;
}

.panel h2 {
  margin-bottom: 4px;
  font-size: 22px;
}

.panel p,
.control-group label,
.control-row label {
  color: var(--muted);
}

.panel p {
  margin-bottom: 0;
  line-height: 1.42;
}

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

.member-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #edf4ff;
  color: var(--vk);
  font-weight: 900;
}

.member-card strong {
  display: block;
  font-size: 15px;
}

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

.add-member {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
  margin-top: 12px;
}

.add-member input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 12px;
}

.add-member button,
.counter button {
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  font-weight: 800;
}

.control-group {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

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

.option-button,
.location-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.option-button {
  min-height: 44px;
  padding: 10px;
  text-align: center;
  font-weight: 700;
}

.option-button.active,
.location-card.active {
  border-color: var(--vk);
  outline: 3px solid rgba(0, 119, 255, 0.14);
}

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

.location-card {
  min-height: 104px;
  padding: 14px;
}

.location-card strong {
  display: block;
  margin-bottom: 8px;
}

.location-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.location-card[data-tone="new-year"] {
  border-top: 5px solid var(--rose);
}

.location-card[data-tone="beach"] {
  border-top: 5px solid var(--green);
}

.location-card[data-tone="city"] {
  border-top: 5px solid var(--vk);
}

.location-card[data-tone="studio"] {
  border-top: 5px solid var(--amber);
}

.location-card[data-tone="autumn"] {
  border-top: 5px solid #8c6a3f;
}

.location-card[data-tone="party"] {
  border-top: 5px solid #8b5cf6;
}

.tariff-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.tariff-card > div {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.tariff-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.tariff-card strong {
  display: block;
  font-size: 18px;
}

.control-row,
.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.counter {
  display: grid;
  grid-template-columns: 38px 46px 38px;
  align-items: center;
  gap: 8px;
}

.counter strong {
  text-align: center;
  font-size: 22px;
}

.summary {
  margin-top: 18px;
}

.quality-note {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  border-radius: 8px;
  background: #eef8f3;
  padding: 12px;
  color: #174b36;
  font-size: 14px;
  line-height: 1.4;
}

.quality-note strong {
  font-size: 15px;
}

.consent-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.consent-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--vk);
}

.summary span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.summary strong {
  display: block;
  font-size: 25px;
}

.generate-button {
  min-height: 48px;
  padding: 0 18px;
}

.result-preview {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #111827;
}

.result-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  opacity: 0.48;
}

.result-state {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 12px;
  color: var(--ink);
  font-weight: 800;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.status-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #c8d0da;
}

.status-item.done {
  color: #174b36;
  border-color: #bce4cf;
  background: #f3fbf7;
}

.status-item.done .status-dot {
  background: var(--green);
}

.result-thumb {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  background: #e9eef5;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.result-thumb.ready {
  background: #dff5eb;
  color: #146c48;
}

.download-button {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  border: 1px solid #146c48;
  border-radius: 8px;
  background: #146c48;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

@media (max-width: 980px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .hero-image {
    min-height: 260px;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 22px 14px 28px;
  }

  h1 {
    font-size: 40px;
  }

  .lead {
    font-size: 17px;
  }

  .workspace {
    padding: 14px 10px 28px;
  }

  .panel {
    padding: 16px;
  }

  .segmented,
  .location-grid,
  .tariff-card {
    grid-template-columns: 1fr;
  }

  .summary,
  .control-row {
    align-items: stretch;
    flex-direction: column;
  }

  .generate-button {
    width: 100%;
  }
}
