/* Rewards Wallet trial — plain, solid colors, mobile-first. */
:root {
  --bg: #f6f4ee;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e1d8;
  --accent: #0f766e;
  --accent-dark: #0c5f59;
  --topbar: #0f766e;
  --tabbar: #0f766e;
  --warn-bg: #fef6e7;
  --warn-line: #e8c872;
  --good: #15803d;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: 84px;
}
h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.2rem; margin: 0 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.5rem; }
p { margin: 0 0 0.75rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
/* theme settings */
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--line); font-weight: 600; }
.theme-row:first-of-type { border-top: none; }
input[type="color"] { width: 3rem; height: 2.2rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0.15rem; }
.presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 0.25rem; }
.preset { display: inline-flex; align-items: center; gap: 0.45rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0.35rem 0.85rem 0.35rem 0.4rem; font-size: 0.9rem; cursor: pointer; color: var(--ink); }
.preset .dot { width: 1.4rem; height: 1.4rem; border-radius: 999px; border: 1px solid rgba(0,0,0,0.12); }

/* protection tip inside Which card answers */
.prot-tip { border-left: 3px solid var(--accent); padding: 0.55rem 0.75rem; margin: 0.75rem 0 0; font-size: 0.92rem; background: rgba(128, 128, 128, 0.06); border-radius: 0 10px 10px 0; }
.prot-tip a { color: var(--accent-dark); font-weight: 600; }

/* goal progress bars */
.goalbar { background: rgba(128, 128, 128, 0.18); border-radius: 999px; height: 0.7rem; overflow: hidden; margin: 0.4rem 0; }
.goalbar > div { background: var(--accent); height: 100%; border-radius: 999px; }
.trows { margin-top: 0.4rem; }

.ver { text-align: center; color: var(--muted); font-size: 0.75rem; padding: 0.5rem; }
.err { color: #b91c1c; min-height: 1.2em; }

/* top bar + tab bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--topbar);
  color: #fff;
  padding: 0.7rem 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.topbar .brand { font-weight: 700; font-size: 1.05rem; flex: 1; }
.chip-holder {
  background: rgba(255,255,255,0.22);
  border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.85rem;
}
.topbar button.ghost {
  background: transparent; border: 1px solid rgba(255,255,255,0.7);
  color: #fff; border-radius: 8px; padding: 0.3rem 0.7rem; font-size: 0.9rem;
}
nav.tabbar {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  background: var(--tabbar);
  border: none;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
  justify-content: safe center;
  scrollbar-width: none;
}
nav.tabbar::-webkit-scrollbar { display: none; }
nav.tabbar a {
  flex: 0 0 auto; text-align: center; padding: 0.8rem 0.9rem;
  color: rgba(255, 255, 255, 0.72); text-decoration: none; font-size: 0.9rem; font-weight: 600;
  white-space: nowrap;
}
nav.tabbar a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

/* panels */
main { padding: 1rem 1rem 0; max-width: 640px; margin: 0 auto; }
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem;
}
.panel.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.banner-list { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.banner-list li { margin-bottom: 0.5rem; }

/* forms + buttons */
label { display: block; margin: 0.75rem 0; font-weight: 600; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"] {
  width: 100%; padding: 0.7rem; margin-top: 0.3rem;
  border: 1px solid var(--line); border-radius: 10px; font-size: 1rem;
  background: #fff; color: var(--ink);
}
input[type="number"] { width: 7rem; display: inline-block; }
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  border: none; border-radius: 10px; padding: 0.7rem 1.2rem;
  font-size: 1rem; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn.small { font-size: 0.9rem; padding: 0.5rem 0.9rem; }
.linklike { background: none; border: none; color: var(--accent-dark); text-decoration: underline; cursor: pointer; font-size: 1em; padding: 0; }
.calbtn { font-size: 0.85rem; white-space: nowrap; }
.back { color: var(--accent-dark); text-decoration: none; font-weight: 600; }

/* gate */
#gate[hidden], #app[hidden] { display: none !important; }
#gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.gate-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; max-width: 420px; width: 100%;
}

/* which card */
.qrow { display: flex; gap: 0.5rem; }
.qrow input { flex: 1; margin-top: 0; }
.samples { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }
.chip {
  background: #eef2f1; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.8rem; font-size: 0.85rem; cursor: pointer; color: var(--ink);
}
a.chip { text-decoration: none; display: inline-block; }
.answer { border-top: 1px solid var(--line); margin-top: 0.75rem; padding-top: 0.75rem; }
.use { font-size: 1.15rem; font-weight: 800; color: var(--accent-dark); margin-bottom: 0.4rem; }
.why { margin-bottom: 0.5rem; }
.alts-label { font-weight: 700; margin: 0.75rem 0 0.25rem; font-size: 0.95rem; }
ul.alts { margin: 0; padding-left: 1.2rem; }
ul.alts li { margin-bottom: 0.4rem; font-size: 0.95rem; }

/* benefits */
.benefit { border-top: 1px solid var(--line); padding: 0.8rem 0; }
.benefit:first-of-type { border-top: none; }
.benefit-top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: flex-start; }
.benefit-meta { color: var(--muted); font-size: 0.9rem; margin: 0.2rem 0; }
.enroll {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  background: #eef2f1; color: var(--accent-dark);
  border-radius: 6px; padding: 0.15rem 0.5rem; margin: 0.25rem 0;
}
.remaining { font-weight: 700; margin: 0.3rem 0; color: var(--accent-dark); }
.seg { display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; }
.seg button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 0.4rem 0.9rem; font-size: 0.88rem; cursor: pointer; color: var(--ink);
}
.seg button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.st { font-size: 0.78rem; font-weight: 700; border-radius: 999px; padding: 0.15rem 0.6rem; white-space: nowrap; }
.st-available { background: #e6f4ea; color: var(--good); }
.st-partial { background: #fef3c7; color: #92400e; }
.st-used { background: #f3f4f6; color: var(--muted); }
.st-soon { outline: 2px solid var(--warn-line); }
.usedamt { font-weight: 600; font-size: 0.95rem; }

/* calendar */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { text-align: center; font-size: 0.72rem; color: var(--muted); font-weight: 700; padding: 0.2rem 0; }
.cal-day {
  font: inherit; color: inherit; min-height: 46px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  padding: 0.2rem 0.1rem; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
}
.cal-day.empty { background: transparent; border: none; cursor: default; }
.cal-num { font-size: 0.85rem; font-weight: 600; width: 1.5rem; height: 1.5rem; display: inline-flex; align-items: center; justify-content: center; }
.cal-day.today .cal-num { background: var(--accent); color: #fff; border-radius: 50%; }
.cal-day.sel { outline: 2px solid var(--accent-dark); }
.cal-dots { display: flex; gap: 2px; margin-top: 2px; flex-wrap: wrap; justify-content: center; }
.cal-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.cal-more { font-size: 0.62rem; color: var(--muted); line-height: 8px; }

/* cards */
.brandtag {
  display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em;
  border-radius: 6px; padding: 0.15rem 0.45rem; color: #fff;
  vertical-align: middle; margin-right: 0.45rem;
}
.brandtag.amex { background: #2e77bc; }
.brandtag.visa { background: #1a1f71; }
.cardlist { display: flex; flex-direction: column; gap: 0.4rem; }
a.cardrow {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--ink); background: #fff;
}
.fee { font-weight: 700; color: var(--accent-dark); white-space: nowrap; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin: 0.75rem 0 0; }
dl.facts dt { font-weight: 700; color: var(--muted); font-size: 0.9rem; }
dl.facts dd { margin: 0; }
.flag { font-size: 0.82rem; color: #92400e; background: #fef3c7; border-radius: 6px; padding: 0.1rem 0.5rem; }
ul.clean { margin: 0.25rem 0 0.75rem; padding-left: 1.2rem; }
ul.clean li { margin-bottom: 0.45rem; }
#renew { width: auto; }
