:root {
  --ink: #1a211c;
  --ink-soft: #3d4a42;
  --mist: #e8efe9;
  --paper: #f4f7f4;
  --jade: #1f7a55;
  --jade-deep: #145c3f;
  --copper: #c45c26;
  --line: rgba(26, 33, 28, 0.08);
  --glow: rgba(31, 122, 85, 0.18);
  --radius: 18px;
  --font-display: "Fraunces", "Noto Serif SC", "Songti SC", serif;
  --font-body: "DM Sans", "Noto Sans SC", "PingFang SC", sans-serif;
  --shadow: 0 18px 40px rgba(26, 33, 28, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(31, 122, 85, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(196, 92, 38, 0.12), transparent 50%),
    linear-gradient(180deg, #eef4ef 0%, var(--paper) 38%, #f7f3ee 100%);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* —— Hero —— */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 0 4px;
  overflow: hidden;
}

.hero__atmosphere {
  position: absolute;
  inset: -40% -30% auto;
  height: 160%;
  background:
    linear-gradient(135deg, rgba(31, 122, 85, 0.18), transparent 50%),
    linear-gradient(200deg, rgba(196, 92, 38, 0.12), transparent 45%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231a211c' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2%, 3%, 0) scale(1.04); }
}

.brand {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand__logo {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  background: transparent !important;
  box-shadow: none;
}

.share-tip {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  padding: 0 16px;
  color: var(--ink-soft);
  font: 500 0.82rem/1.45 var(--font-body);
  text-align: center;
  letter-spacing: 0.02em;
  opacity: 0.88;
  animation: rise 0.9s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-self: center;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: #1a4fb8;
  color: #fff;
  font: 600 0.95rem/1 var(--font-body);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
  animation: rise 0.9s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__cta:hover {
  background: #153f96;
  transform: translateY(-2px);
}

.hero__cta span {
  opacity: 0.7;
  font-weight: 400;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Section —— */
.section {
  margin-top: 4px;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section__hint {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.filter {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font: 500 0.86rem/1 var(--font-body);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filter.is-active,
.filter:hover {
  border-color: transparent;
  background: var(--ink);
  color: #f4f7f4;
}

/* —— Brand rows (interaction containers) —— */
.brand-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-row:nth-child(1) { animation-delay: 0.05s; }
.brand-row:nth-child(2) { animation-delay: 0.1s; }
.brand-row:nth-child(3) { animation-delay: 0.15s; }
.brand-row:nth-child(4) { animation-delay: 0.2s; }
.brand-row:nth-child(5) { animation-delay: 0.25s; }

.brand-row:hover {
  transform: translateY(-3px);
  border-color: rgba(31, 122, 85, 0.25);
  box-shadow: 0 22px 48px rgba(26, 33, 28, 0.12);
}

.brand-row__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.brand-row__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-row__name {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
}

.brand-row__desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.brand-row__go {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--jade-deep);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-align: center;
}

/* —— Modal —— */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(18, 24, 20, 0.48);
  backdrop-filter: blur(4px);
  animation: fade 0.25s ease both;
}

.modal__sheet {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 18px 18px 28px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #fbfcfb, #f2f6f3);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.18);
  animation: sheet 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheet {
  from { transform: translateY(40px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

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

.modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.modal__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--mist);
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font: 500 0.86rem/1 var(--font-body);
  cursor: pointer;
  white-space: nowrap;
}

.tab.is-active {
  background: var(--ink);
  border-color: transparent;
  color: #fff;
}

.qr-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.qr-stage img {
  width: min(280px, 100%);
  height: auto;
  border-radius: 8px;
}

.qr-meta {
  width: 100%;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.qr-meta strong {
  color: var(--ink);
}

@media (min-width: 720px) {
  .modal {
    align-items: center;
  }
  .modal__sheet {
    border-radius: 24px;
  }
}
