:root {
  --coral: #ff6b6b;
  --plum: #2d1b3d;
  --berry: #b43a6f;
  --paper: #f7f3f2;
  --gray: #6b7280;
  --ink: #1f1528;
  --white: #ffffff;
  --line: rgba(45, 27, 61, 0.11);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.app {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 28px;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
}

.brand p,
.screen-head p,
.hero-copy p,
.section-title p {
  margin: 0;
  color: var(--gray);
  font-size: 13px;
  font-weight: 650;
}

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

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

h2 {
  margin-bottom: 0;
  font-size: 31px;
  line-height: 1.04;
  font-weight: 830;
}

h3 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.08;
  font-weight: 780;
}

.screen {
  animation: in 0.18s ease both;
}

@keyframes in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.muted-screen {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.muted-screen p {
  color: var(--gray);
  line-height: 1.45;
}

.hero-copy {
  padding: 14px 0 24px;
}

.hero-copy p {
  margin-bottom: 9px;
  color: var(--berry);
}

.action-main,
.action-tile,
.button-primary,
.button-secondary,
.nav-back {
  border: 0;
  border-radius: 8px;
}

.action-main {
  display: flex;
  width: 100%;
  min-height: 118px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 18px;
  background: var(--plum);
  color: var(--white);
  text-align: left;
  box-shadow: 0 18px 42px rgba(45, 27, 61, 0.18);
}

.action-main b {
  display: block;
  margin-bottom: 5px;
  font-size: 23px;
  line-height: 1;
}

.action-main small,
.action-tile small {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.25;
}

.action-main i {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  font-style: normal;
  font-size: 20px;
}

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

.action-tile {
  min-height: 126px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.action-tile b {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.action-tile small {
  color: var(--gray);
}

.screen-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.nav-back {
  display: inline-flex;
  width: auto;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 14px;
  background: var(--white);
  color: var(--plum);
  font-size: 14px;
  font-weight: 760;
}

.progress {
  height: 3px;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(45, 27, 61, 0.09);
}

.progress i {
  display: block;
  width: 25%;
  height: 100%;
  background: var(--coral);
  transition: width 0.2s ease;
}

.section-title {
  margin-bottom: 18px;
}

.section-title p {
  margin-top: 8px;
  line-height: 1.38;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(31, 21, 40, 0.72);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
  box-shadow: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(180, 58, 111, 0.62);
}

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

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

.media-summary {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 96px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 10px;
}

.media-summary-cover {
  width: 76px;
  height: 76px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(45, 27, 61, 0.07);
}

.media-summary-cover img,
.media-summary-cover video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-summary b {
  display: block;
  margin-bottom: 5px;
  font-size: 17px;
}

.media-summary span {
  display: block;
  color: var(--gray);
  line-height: 1.3;
}

.media-card,
.upload-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(45, 27, 61, 0.07);
}

.media-card img,
.media-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  border-radius: 99px;
  background: var(--white);
  color: var(--berry);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
}

.media-controls {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
}

.media-controls button {
  min-height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(31, 21, 40, 0.76);
  color: var(--white);
}

.upload-tile {
  display: grid;
  min-height: 130px;
  place-items: center;
  border: 1px dashed rgba(180, 58, 111, 0.5);
  color: var(--berry);
  font-weight: 780;
}

.upload-tile input {
  display: none;
}

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

.chip {
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  padding: 0 14px;
}

.chip.active {
  border-color: var(--plum);
  background: var(--plum);
  color: var(--white);
}

.checkline {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  color: var(--ink);
  line-height: 1.36;
}

.checkline input {
  min-height: 22px;
  padding: 0;
}

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

.button-primary,
.button-secondary {
  min-height: 52px;
  padding: 0 16px;
  font-weight: 780;
}

.button-primary {
  background: var(--plum);
  color: var(--white);
}

.button-secondary {
  background: var(--white);
  color: var(--ink);
}

.button-primary.wide,
.button-secondary.wide {
  width: 100%;
}

.button-primary.compact,
.button-secondary.compact {
  min-height: 42px;
  padding: 0 14px;
}

.button-primary:disabled,
.button-secondary:disabled {
  opacity: 0.58;
}

.error {
  margin: 16px 0 0;
  border-radius: 8px;
  background: rgba(255, 107, 107, 0.13);
  color: #8a233e;
  padding: 12px;
  font-weight: 700;
}

.profile-card {
  overflow: hidden;
  border-radius: 8px;
  background: var(--white);
  margin-bottom: 12px;
}

.profile-card img,
.profile-card video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.profile-info {
  padding: 16px;
}

.profile-info p {
  margin-bottom: 10px;
  color: var(--gray);
  line-height: 1.4;
}

.interest-line {
  color: var(--berry);
  font-weight: 700;
}

.empty-state,
.settings-list {
  display: grid;
  gap: 12px;
}

.empty-state,
.settings-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 18px;
}

.empty-state b,
.settings-list b {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.empty-state span,
.settings-list span {
  color: var(--gray);
  line-height: 1.38;
}

.hidden,
.trap {
  display: none !important;
}

.sheet.hidden {
  display: none !important;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 21, 40, 0.34);
}

.sheet-panel {
  position: relative;
  max-height: min(82vh, 680px);
  overflow: auto;
  border-radius: 8px 8px 0 0;
  background: var(--paper);
  padding: 18px;
  box-shadow: 0 -24px 60px rgba(31, 21, 40, 0.18);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.sheet-head p {
  margin: 0 0 3px;
  color: var(--gray);
  font-size: 13px;
  font-weight: 650;
}

.sheet-head h2 {
  font-size: 25px;
}

.sheet-note {
  margin: 10px 0 0;
  color: var(--gray);
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 380px) {
  h2 {
    font-size: 28px;
  }

  .grid2,
  .action-grid {
    grid-template-columns: 1fr;
  }
}
