/* GiftCircle — elderly-friendly design system */
:root {
  --bg: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #5A5A5A;
  --red: #C0392B;
  --red-dark: #A93226;
  --green: #2E7D4F;
  --yellow: #F5C518;
  --line: #E4E4E4;
  --radius: 16px;
  --touch: 64px;
}

* { box-sizing: border-box; }
html { font-size: 20px; }                 /* base 20px everywhere */
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
}

header#topbar {
  display: flex; align-items: center; gap: .5rem;
  padding: .75rem 1rem; border-bottom: 2px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
#pageTitle { flex: 1; font-size: 1.3rem; margin: 0; text-align: center; }
.icon-btn {
  min-height: 48px; min-width: 48px; font-size: 1.1rem;
  background: none; border: none; color: var(--red);
  cursor: pointer; position: relative; font-weight: 700;
}
.badge {
  position: absolute; top: 2px; right: 0;
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: .7rem; padding: 1px 6px; font-weight: 700;
}

main { padding: 1rem; max-width: 560px; margin: 0 auto; }

h2 { font-size: 1.5rem; margin: .5rem 0 1rem; }
p  { font-size: 1rem; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Buttons — every primary action is huge and unmistakable */
.btn {
  display: block; width: 100%; min-height: var(--touch);
  font-size: 1.15rem; font-weight: 700;
  border: none; border-radius: var(--radius); cursor: pointer;
  padding: 1rem; margin: .6rem 0;
}
.btn:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:active { background: var(--red-dark); }
.btn-secondary { background: #fff; color: var(--red); border: 3px solid var(--red); }
.btn-green { background: var(--green); color: #fff; }
.btn-quiet { background: #F4F4F4; color: var(--ink); }

/* Inputs */
label { display: block; font-weight: 700; margin: 1rem 0 .35rem; }
input, textarea, select {
  width: 100%; min-height: var(--touch); font-size: 1.15rem;
  padding: .8rem 1rem; border: 3px solid var(--line);
  border-radius: var(--radius); background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--red); outline: none;
}
.code-input { letter-spacing: .5em; text-align: center; font-size: 1.6rem; }

/* Cards */
.card {
  border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1rem; margin: .75rem 0; background: #fff;
}
.card-btn {
  display: flex; align-items: center; gap: 1rem;
  width: 100%; min-height: 88px; text-align: left;
  font-size: 1.15rem; font-weight: 700; color: var(--ink);
  background: #fff; border: 2px solid var(--line);
  border-radius: var(--radius); padding: 1rem; margin: .6rem 0; cursor: pointer;
}
.card-btn .emoji { font-size: 2rem; }
.card-btn:focus-visible { outline: 4px solid var(--yellow); }
.card-btn .sub { display:block; font-weight: 400; color: var(--muted); font-size: .95rem; }

/* Checkbox rows (participant picker) */
.check-row {
  display: flex; align-items: center; gap: .9rem;
  min-height: var(--touch); padding: .5rem .25rem;
  border-bottom: 1px solid var(--line); font-size: 1.1rem;
}
.check-row input[type=checkbox] {
  width: 32px; height: 32px; min-height: 0; accent-color: var(--green);
}

/* Wishlist items */
.wish { display: flex; align-items: center; gap: .75rem; }
.wish .name { flex: 1; }
.wish.bought .name { text-decoration: line-through; color: var(--muted); }
.tag-bought { background: var(--green); color:#fff; border-radius: 999px;
  padding: .2rem .7rem; font-size: .85rem; font-weight: 700; }

/* Messages */
.bubble { max-width: 85%; padding: .7rem 1rem; border-radius: var(--radius);
  margin: .35rem 0; font-size: 1.05rem; }
.bubble.mine { background: var(--red); color: #fff; margin-left: auto; }
.bubble.theirs { background: #F2F2F2; }

/* Announcements */
.ann { border-left: 6px solid var(--yellow); }

/* Alerts */
.alert { border-radius: var(--radius); padding: 1rem; margin: .75rem 0;
  font-weight: 700; }
.alert-error { background: #FDEDEC; color: var(--red-dark); border: 2px solid var(--red); }
.alert-ok { background: #EAF7F0; color: var(--green); border: 2px solid var(--green); }

/* Step indicator for guided flows */
.steps { text-align: center; color: var(--muted); font-weight: 700; margin-bottom: .5rem; }

/* Big reveal */
.reveal-name {
  font-size: 2.2rem; font-weight: 800; color: var(--red);
  text-align: center; margin: 1.5rem 0; word-break: break-word;
}

@media (min-width: 700px) { html { font-size: 21px; } }
