:root {
  --bg: #fff6df;
  --bg-soft: #fffdf6;
  --card: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --line: #efe4c4;
  --accent: #ffb400;
  --accent-ink: #3a2a00;
  --cta: #16a34a;
  --cta-ink: #ffffff;
  --shadow: 0 10px 28px rgba(90, 62, 0, 0.08);
  --radius: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "SF Pro Display", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, #fff 42%, #fff 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) 16px calc(28px + var(--safe-bottom));
}

.layout {
  display: flex;
  flex-direction: column;
}

.content {
  min-width: 0;
}

.header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  object-fit: cover;
  background: #000;
  box-shadow: 0 8px 18px rgba(255, 180, 0, 0.35);
  flex-shrink: 0;
}

.header h1 {
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.amount-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
  margin-bottom: 14px;
}

.amount-card .label {
  font-size: 13px;
  color: var(--muted);
}

.amount-value {
  margin: 6px 0 12px;
  font-size: 32px;
  font-weight: 760;
  letter-spacing: -0.04em;
}

input[type="range"] {
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #ffe08a);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.chips {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.chip,
.sort-btn {
  border: 0;
  background: #fff4cc;
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.chip.active,
.sort-btn.active {
  background: var(--accent);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 12px;
}

.count {
  font-size: 13px;
  color: var(--muted);
}

.sorts {
  display: flex;
  gap: 6px;
}

.sort-btn {
  background: #f3f4f6;
  color: #374151;
  padding: 7px 10px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  display: block;
  width: 100%;
  background: var(--card);
  border: 1px solid #f3ead0;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  color: inherit;
}

.card:active {
  transform: scale(0.992);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

.brand h2 {
  font-size: 17px;
  line-height: 1.15;
}

.badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: #15803d;
  background: #dcfce7;
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 650;
}

.approval {
  text-align: right;
}

.approval b {
  display: block;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.approval span {
  font-size: 11px;
  color: var(--muted);
}

.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin: 14px 0 12px;
}

.meta div {
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 9px 10px;
}

.meta small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 2px;
}

.meta strong {
  font-size: 14px;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--cta);
  color: var(--cta-ink);
  font-size: 16px;
  font-weight: 750;
  line-height: 48px;
  text-align: center;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 28px 10px;
}

@media (min-width: 960px) {
  .app {
    max-width: 1180px;
    padding: 28px 32px 48px;
  }

  .header {
    margin-bottom: 24px;
  }

  .header h1 {
    font-size: 28px;
  }

  .layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  .filters {
    position: sticky;
    top: 20px;
  }

  .amount-card {
    margin-bottom: 12px;
  }

  .chips {
    flex-wrap: wrap;
    overflow: visible;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    margin: 0;
  }

  .sorts {
    flex-direction: column;
    width: 100%;
  }

  .sort-btn {
    width: 100%;
    text-align: center;
    padding: 10px 12px;
  }

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

  .card {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .card .meta {
    flex: 1;
  }
}

@media (min-width: 1280px) {
  .app {
    max-width: 1320px;
  }

  .list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.legal {
  margin-top: 18px;
  font-size: 11px;
  line-height: 1.45;
  color: #9ca3af;
}

.credit {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px 0 2px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.credit:active {
  opacity: 0.7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b160c;
    --bg-soft: #2a2416;
    --card: #241f14;
    --ink: #fff8e8;
    --muted: #c4b89a;
    --line: #3a3220;
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  }

  body {
    background: linear-gradient(180deg, #2a210f 0%, #16130d 40%, #16130d 100%);
  }

  .chip,
  .sort-btn {
    background: #3a3118;
    color: #ffe08a;
  }

  .sort-btn {
    background: #2f2a20;
    color: #efe4c4;
  }

  .chip.active,
  .sort-btn.active {
    background: var(--accent);
    color: #3a2a00;
  }

  .card {
    border-color: #3a3220;
  }
}
