:root {
  --page-bg: #f3f5f7;
  --panel-bg: #ffffff;
  --line: #e3e7ec;
  --line-strong: #bfc5ce;
  --text: #20252d;
  --muted: #6d7a8d;
  --accent: #d24b4b;
  --accent-strong: #bd3939;
  --shadow: 0 18px 45px rgba(30, 39, 52, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fbf9 0%, var(--page-bg) 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.app-shell {
  width: min(980px, calc(100% - 24px));
  margin: 0 auto;
  padding: 48px 0 36px;
}

.consultation-module {
  overflow: hidden;
  padding: 32px;
  border: 1px solid rgba(205, 215, 224, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 58px rgba(30, 39, 52, 0.14);
}

.campaign-flyer {
  width: min(640px, 100%);
  margin: 0 auto 28px;
  overflow: hidden;
  border: 1px solid #d7dde5;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(28, 39, 55, 0.1);
}

.flyer-image {
  display: block;
  width: 100%;
  height: auto;
}

.search-panel {
  text-align: center;
}

h1 {
  margin: 0 0 28px;
  color: #2b2d31;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0;
}

.search-form {
  display: grid;
  justify-items: center;
  gap: 28px;
}

.search-box {
  display: grid;
  grid-template-columns: 80px 1fr;
  width: min(705px, 100%);
  height: 70px;
  border: 1px solid #cfd4db;
  border-radius: 7px;
  overflow: hidden;
  background: var(--panel-bg);
  box-shadow: inset 0 1px 2px rgba(20, 30, 44, 0.05);
}

.search-icon {
  display: grid;
  place-items: center;
  border-right: 1px solid #cfd4db;
  background: #f0f1f3;
}

svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.search-icon svg {
  color: #383c42;
}

input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 28px;
  color: #2c333d;
  font-size: 1.55rem;
  font-weight: 400;
  text-align: center;
}

input::placeholder {
  color: #a1a5ad;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 210px;
  min-height: 68px;
  border: 0;
  border-radius: 5px;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(82, 20, 20, 0.12);
  transition: background 140ms ease, transform 140ms ease;
}

button:hover {
  background: var(--accent-strong);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

button svg {
  width: 28px;
  height: 28px;
}

.status {
  min-height: 24px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.status.error {
  color: var(--accent-strong);
  font-weight: 700;
}

.pwa-status {
  min-height: 20px;
  margin: 4px 0 0;
  color: #2f7d63;
  font-size: 0.82rem;
  font-weight: 700;
}

.result-card {
  margin: 28px auto 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-bg);
  box-shadow: none;
}

.share-actions {
  display: flex;
  justify-content: flex-end;
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 20;
  padding: 0;
  background: transparent;
}

.share-button {
  width: 54px;
  min-width: 54px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  font-size: 0;
  box-shadow: none;
}

.share-button:hover {
  background: #1fb85a;
}

.share-button svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 620px) {
  .share-actions {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .share-button {
    width: 50px;
    min-width: 50px;
    height: 50px;
    min-height: 50px;
  }
}

.result-row {
  display: grid;
  grid-template-columns: minmax(145px, 34%) 1fr;
  min-height: 40px;
  border-bottom: 1px solid var(--line);
}

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

.result-label,
.result-value {
  display: flex;
  align-items: center;
  padding: 10px 22px;
  min-width: 0;
}

.result-label {
  color: #68768a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.result-value {
  justify-content: flex-end;
  color: #001126;
  font-size: 0.96rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: right;
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 16px, 760px);
    padding-top: 12px;
    padding-bottom: 18px;
  }

  .consultation-module {
    padding: 12px;
    border-radius: 18px;
  }

  .campaign-flyer {
    margin-bottom: 22px;
    border-radius: 10px;
  }

  h1 {
    margin-bottom: 22px;
  }

  .search-box {
    grid-template-columns: 58px 1fr;
    height: 58px;
  }

  input {
    padding: 0 16px;
    font-size: 1.12rem;
  }

  button {
    min-width: 174px;
    min-height: 56px;
    font-size: 1.12rem;
  }

  .result-row {
    grid-template-columns: minmax(118px, 39%) 1fr;
  }

  .result-label,
  .result-value {
    padding: 9px 12px;
  }
}
