@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f6f7f9;
  --surface: rgba(255,255,255,.82);
  --surface-solid: #fff;
  --text: #111318;
  --muted: #6f7580;
  --line: #e7e9ed;
  --accent: #111318;
  --shadow: 0 16px 45px rgba(20,25,35,.07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.95), transparent 35%),
    var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 35px;
}

.hero {
  max-width: 760px;
  margin-bottom: 42px;
}

.badge {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

h1 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: .98;
  letter-spacing: -.055em;
}

h1 span { color: #777d87; }

.hero p {
  max-width: 650px;
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.search-wrap { max-width: 480px; }

#search {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: none;
  background: rgba(255,255,255,.9);
  color: var(--text);
  font: inherit;
  box-shadow: 0 8px 30px rgba(20,25,35,.04);
  transition: .2s ease;
}

#search:focus {
  border-color: #b9bdc5;
  box-shadow: 0 0 0 4px rgba(17,19,24,.05);
}

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

.card {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid rgba(220,223,229,.9);
  border-radius: 22px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #d5d8de;
  box-shadow: 0 22px 55px rgba(20,25,35,.11);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #f0f1f3;
  font-size: 18px;
  font-weight: 700;
}

.category {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.card-body { flex: 1; }

.card h2 {
  margin: 24px 0 8px;
  font-size: 21px;
  letter-spacing: -.025em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.actions {
  display: flex;
  gap: 9px;
  margin-top: 25px;
}

.button {
  min-height: 43px;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: .18s ease;
}

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

.button.primary:hover { opacity: .88; }

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

.button.secondary:hover { background: #f4f5f6; }

.empty, .error {
  padding: 35px;
  border: 1px dashed #d8dbe0;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 55px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #969ba4;
  font-size: 12px;
}

dialog {
  width: min(420px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  box-shadow: 0 30px 100px rgba(0,0,0,.25);
}

dialog::backdrop {
  background: rgba(10,12,16,.48);
  backdrop-filter: blur(5px);
}

.dialog-card {
  position: relative;
  padding: 25px;
  border-radius: 24px;
  background: white;
  text-align: center;
}

.close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f0f1f3;
  color: #444;
  font-size: 22px;
  cursor: pointer;
}

.qr-title {
  margin: 5px 35px 20px;
  font-size: 18px;
  font-weight: 700;
}

.qr-image {
  width: 280px;
  height: 280px;
  margin: 0 auto 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 10px;

  border-radius: 14px;
  background: #fff;
}

.qr-image img,
.qr-image canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 850px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 22px, 520px);
    padding-top: 42px;
  }

  .hero { margin-bottom: 30px; }

  h1 { font-size: 48px; }

  .hero p { font-size: 15px; }

  .grid { grid-template-columns: 1fr; }

  .card { min-height: 245px; }

  footer {
    flex-direction: column;
    gap: 7px;
  }
}
span a {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
}

span a:hover {
    text-decoration: underline;
}

* {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}