:root {
  --afis-green: #5c9a22;
  --afis-green-dark: #3f6e16;
  --afis-green-soft: #8dce2a;
  --bg: #e8f2d8;
  --bg-top: #f4f8ec;
  --surface: #ffffff;
  --text: #1c2a12;
  --text-muted: #6a7860;
  --line: rgba(28, 42, 18, 0.08);
  --radius: 1.25rem;
  --shadow: 0 10px 28px rgba(63, 110, 22, 0.12);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(120% 80% at 50% -10%, var(--bg-top), var(--bg) 55%);
}

.page {
  width: min(26.5rem, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(0.75rem + var(--safe-top)) 1.1rem calc(1.5rem + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-top: 0.15rem;
}

.brand img {
  width: 5.6rem;
  height: auto;
  display: block;
  flex-shrink: 0;
}

.brand__title {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--afis-green);
}

.bin-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.bin-card.is-empty {
  display: none;
}

.bin-card__body {
  padding: 1.15rem 1.15rem 1.05rem;
}

.bin-card__kicker {
  margin: 0 0 0.35rem;
  color: var(--afis-green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bin-card__place {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.bin-card__address {
  margin: 0;
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 600;
}

.bin-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #f3f6ee;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.meta-chip i {
  font-size: 0.78rem;
  color: var(--afis-green);
}

.meta-chip strong {
  color: #4a5842;
  font-weight: 700;
}

.cta-block {
  display: none;
}

main {
  display: flex;
  flex-direction: column;
}

.cta-block.is-visible {
  display: block;
  margin-top: 1.85rem;
}

.cta {
  width: 100%;
  min-height: 3.4rem;
  border: 0;
  border-radius: 1rem;
  background: linear-gradient(180deg, var(--afis-green-soft) 0%, var(--afis-green) 100%);
  color: #14300a;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(92, 154, 34, 0.28);
  -webkit-tap-highlight-color: transparent;
}

.cta i {
  font-size: 1.15rem;
}

.cta:active {
  transform: translateY(1px);
  filter: brightness(0.96);
}

.cta:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.cta-help {
  margin: 0.7rem 0.2rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 600;
}

.order-status {
  display: none;
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
}

.order-status.is-ok {
  display: block;
  background: #e7f6d8;
  color: #2d5a12;
}

.order-status.is-err {
  display: block;
  background: #fdecec;
  color: #8a1f1f;
}

.app-download {
  margin-top: auto;
  padding-top: 0.4rem;
  text-align: center;
}

.app-download p {
  margin: 0 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.store-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
}

.store-row a {
  display: block;
  width: 8.4rem;
  line-height: 0;
}

.store-row img {
  width: 100%;
  height: auto;
  display: block;
}

.debug {
  display: none;
}

@media (min-width: 480px) {
  .page {
    padding-top: 1.4rem;
  }

  .bin-card__place {
    font-size: 1.45rem;
  }
}
