@import url('/pwa.css');

/* Storefront parity: the Mini App uses the same visual language as charme.ua. */
:root {
  --forest: #315d49;
  --forest-2: #315d49;
  --ivory: #ffffff;
  --paper: #ffffff;
  --ink: #171615;
  --muted: #746f6a;
  --gold: #746f6a;
  --line: #e7e3de;
  --soft: #fbfaf8;
  --danger: #a8322d;
}

html, body { background: #f6f3ef; }
body { color: var(--ink); font-family: Manrope, Arial, sans-serif; }
.app-shell, .boot, .auth-shell, .qr-screen { background: #fff; }
.app-content { padding-right: 20px; padding-left: 20px; }

.wordmark {
  color: var(--ink);
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  letter-spacing: .19em;
}
.wordmark small { color: var(--muted); font-family: Manrope, sans-serif; }
.greeting, .section-heading, .tier, .balance-value, .offer h3,
.size-value, .qr-title, .member-code, .countdown, .auth-hero h1,
.auth-card h2, .real-qr-copy strong {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
}
.greeting { margin-top: 30px; font-size: 36px; }
.eyebrow { color: var(--muted); }

.member-card {
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #171615, #315d49);
  box-shadow: 0 18px 45px rgba(23, 22, 21, .2);
}
.tier-mark { color: #fff; border-color: rgba(255,255,255,.45); }
.member-card .eyebrow, .balance-label, .balance-unit,
.tier-progress-head { color: rgba(255,255,255,.7); }
.progress-value { background: #fff; }

.quick-action, .offer, .auth-card, .referral-card, .field input,
.field textarea, .primary-button, .telegram-button, .message,
.qr-frame, .qr-cta, .qr-cta.real-qr-cta, .real-qr-visual,
.toast, .small-cta { border-radius: 0; }
.quick-action, .offer, .auth-card, .referral-card { background: #fff; }
.primary-button {
  min-height: 50px;
  padding: 13px 22px;
  color: #fff;
  background: #171615;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
  transition: background .2s ease;
}
.primary-button:hover { background: #33302d; }
.field { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.field input, .field textarea { min-height: 50px; color: var(--ink); font-size: 16px; text-transform: none; }
.field > small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.45; letter-spacing: 0; text-transform: none; }
.measurement-guide { margin: 16px 0; border: 1px solid #d7e3da; background: #f3f7f4; }
.measurement-guide summary { min-height: 68px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 20px; gap: 11px; align-items: center; padding: 12px 14px; color: var(--forest); cursor: pointer; list-style: none; }
.measurement-guide summary::-webkit-details-marker { display: none; }
.measurement-guide summary > svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.measurement-guide summary > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }
.measurement-guide summary strong { color: var(--ink); font-size: 13px; }
.measurement-guide summary small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.measurement-guide summary > svg:last-child { transition: transform .2s ease; }
.measurement-guide[open] summary > svg:last-child { transform: rotate(180deg); }
.measurement-guide-content { padding: 0 14px 15px; border-top: 1px solid #d7e3da; }
.measurement-guide-content > p { margin: 13px 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.measurement-guide-content > p strong { color: var(--ink); }
.measurement-guide-content ol { margin: 0; padding: 0; list-style: none; }
.measurement-guide-content li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 11px 0; border-top: 1px solid #d7e3da; }
.measurement-guide-content li > span { color: var(--forest); font-size: 10px; font-weight: 700; }
.measurement-guide-content li strong { color: var(--ink); font-size: 12px; }
.measurement-guide-content li p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.measurement-guide-content .measurement-note { margin-bottom: 0; padding: 10px; color: var(--ink); background: #fff; }
.profile-link-notice {
  display: grid;
  gap: 7px;
  padding: 16px 0 17px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.profile-link-notice strong { font: 500 20px/1.2 'Playfair Display', Georgia, serif; }
.profile-link-notice span { color: var(--muted); font-size: 11px; line-height: 1.6; }

.bottom-nav { border-color: var(--line); background: rgba(255,255,255,.97); }
.nav-item { color: var(--muted); }
.nav-item.active { color: #315d49; }
.nav-item.active::before { background: #315d49; }
.icon-button { color: var(--ink); }
.list-icon { border-radius: 0; color: #315d49; background: #edf3ee; }
.positive { color: #315d49; }
.small-cta { color: var(--ink); border-color: var(--ink); }
.offer-art { color: var(--ink); background: #f6f3ef; }
.switch:has(input:checked) { background: #315d49; }
.toast { background: #171615; }
.telegram-button { color: var(--ink); border-color: var(--ink); background: #fff; }

/* The original QR SVG had no explicit size and Safari rendered it as a large fake-looking block. */
.qr-cta svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qr-cta.real-qr-cta {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 18px;
  margin-top: 16px;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  color: var(--forest);
  background: var(--paper);
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
}
.qr-cta.real-qr-cta:active { transform: scale(.995); }
.real-qr-visual {
  width: 126px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e4e0d6;
  border-radius: 8px;
  background: #fff;
}
.real-qr-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
}
.real-qr-visual > svg {
  width: 52px;
  height: 52px;
  color: var(--forest);
  stroke-width: 1.25;
}
.real-qr-copy { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.real-qr-copy strong { font: 600 21px/1.05 Cormorant Garamond, Georgia, serif; }
.real-qr-copy small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.real-qr-copy > span { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.real-qr-loader {
  width: 34px;
  height: 34px;
  border: 3px solid #dfe5e1;
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: qr-spin .8s linear infinite;
}
.qr-frame img { image-rendering: pixelated; }

@keyframes qr-spin { to { transform: rotate(360deg); } }

@media (max-width: 380px) {
  .qr-cta.real-qr-cta { grid-template-columns: 106px minmax(0, 1fr); gap: 12px; }
  .real-qr-visual { width: 106px; }
  .real-qr-copy strong { font-size: 18px; }
}
