:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --text: #241f1a;
  --muted: #6b6058;
  --accent: #7a4a1e;
  --accent-dark: #5c3714;
  --hero-bg: #2c231a;
  --hero-fg: #f7f1e8;
  --card-border: #ece4d6;
  --card-bg: #ffffff;
  --highlight-bg: #fdf6e8;
  --highlight-border: #f0d9a8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #ece7dd;
  color: var(--text);
}

.serif {
  font-family: "Lora", Georgia, "Times New Roman", serif;
}

a {
  color: var(--accent);
}

/* App shell */

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--card-border);
  background: var(--bg);
}

.app-topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.app-topbar__logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.app-topbar__name {
  font-weight: 700;
  font-size: 14px;
}

.app-topbar__admin {
  flex-shrink: 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-topbar__admin:hover {
  color: var(--accent);
}

.app-topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.app-topbar__account-text {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.app-topbar__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.app-content {
  padding-bottom: 96px;
}

.app-inner {
  padding: 0 20px;
}

/* Hero */

.hero {
  background: var(--hero-bg);
  color: var(--hero-fg);
  padding: 32px 20px 36px;
  text-align: center;
}

.hero__logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.25;
}

.hero__subtitle {
  font-size: 12.5px;
  color: #d8c9b3;
  margin: 0 auto 18px;
  line-height: 1.55;
}

.hero__cta {
  display: block;
  background: var(--hero-fg);
  color: var(--hero-bg);
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  text-decoration: none;
}

/* Sections */

section {
  margin: 28px 0;
}

.section-label {
  text-align: center;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a3835c;
  font-weight: 700;
  margin: 0 0 16px;
}

/* Ways to connect */

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

.connect-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.connect-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.connect-item__title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 3px;
}

.connect-item__desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* Learn callout */

.learn-callout {
  background: #f3ead9;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.learn-callout__tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.learn-callout__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.learn-callout__desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

.learn-callout__cta {
  display: block;
  background: var(--hero-bg);
  color: var(--hero-fg);
  font-weight: 700;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  text-align: center;
  text-decoration: none;
}

/* Devotional cards */

.card {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
}

.card--highlight {
  border-color: var(--highlight-border);
  background: var(--highlight-bg);
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: #8a8a8a;
  margin-bottom: 14px;
}

.badge {
  background: var(--hero-bg);
  color: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 11px;
  font-weight: 600;
}

.card__title {
  font-weight: 700;
  font-size: 15.5px;
  margin: 0 0 10px;
}

.card__insight {
  margin: 0 0 14px;
  line-height: 1.55;
  font-size: 13.5px;
}

.card__reference {
  font-weight: 700;
  margin: 0 0 6px;
  font-size: 13px;
}

.card__verse {
  font-style: italic;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.55;
  font-size: 13.5px;
}

.card__closing {
  font-style: italic;
  color: #6b6b6b;
  margin: 0;
  font-size: 13px;
}

.card__lang-label {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: #b0b0b0;
  margin: 0 0 10px;
}

hr {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 1.25rem 0;
}

/* Archive search */

#archive-search {
  width: 100%;
  padding: 10.4px 16px;
  font-size: 15.2px;
  border: 1px solid #d8d5cd;
  border-radius: 9.6px;
  margin-bottom: 20px;
  font-family: inherit;
}

#archive-search:focus {
  outline: 2px solid #e8c975;
}

.empty {
  color: #9a9a9a;
  font-size: 13px;
}

/* Footer */

.app-footer {
  background: var(--hero-bg);
  color: #d8c9b3;
  padding: 22px;
  text-align: center;
  border-radius: 16px;
  margin: 8px 0 4px;
  font-size: 13px;
}

.app-footer a {
  color: var(--hero-fg);
  font-weight: 700;
  font-size: 12.5px;
  display: block;
  margin-top: 8px;
  text-decoration: none;
}

/* Bottom tab bar */

.app-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 78px;
  background: #fff;
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: stretch;
  padding-bottom: 14px;
  z-index: 20;
}

.app-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #a79c8c;
  text-decoration: none;
  font-size: 10px;
}

.app-tab--active {
  color: var(--hero-bg);
  font-weight: 700;
}

/* Generic page header (non-home pages) */

.page-header {
  padding: 28px 20px 8px;
  text-align: center;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
}

.page-header__subtitle {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin: 0 0 8px;
  line-height: 1.5;
}

.back-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  margin: 20px 0 0;
  color: var(--accent);
  text-decoration: none;
}

/* Learn: topic list */

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

.topic-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 14px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
}

.topic-card__title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.topic-card__summary {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.topic-card__count {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  background: #f3ead9;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Learn: modules */

.module-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.module {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
}

.module[open] {
  border-color: var(--highlight-border);
}

.module__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.module__summary::-webkit-details-marker {
  display: none;
}

.module__num {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--hero-bg);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.module__title {
  flex: 1;
  font-weight: 700;
  font-size: 13.5px;
}

.module__check {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--card-border);
  cursor: pointer;
  width: 24px;
  text-align: center;
}

.module__check--done {
  color: #2c4a2c;
}

.module__body {
  padding: 0 16px 18px;
}

.module__key-ref {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.module__points {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.module__points li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 14px;
  border-left: 2px solid var(--card-border);
}

.module__point-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
}

.module__point-ref {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}

.module__point-verse {
  font-size: 12px;
  font-style: italic;
  color: var(--accent-dark);
  line-height: 1.5;
}

.module__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module__complete-btn {
  width: 100%;
  background: var(--hero-bg);
  color: var(--hero-fg);
  font-weight: 700;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-size: 12.5px;
  cursor: pointer;
}

.module__complete-btn--done {
  background: #2c4a2c;
}

.module__ask-link {
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 8px;
}

/* Prayer buddy map + list */

#buddy-map {
  width: 100%;
  height: 260px;
}

.buddy-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7a4a1e;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #7a4a1e;
}

.request-banner {
  background: #eef6ee;
  border: 1px solid #b9dcb9;
  color: #2c4a2c;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 12.5px;
  margin: 16px 0 0;
  line-height: 1.5;
}

.buddy-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.buddy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 14px;
  padding: 14px 16px;
}

.buddy-card__name {
  font-weight: 700;
  font-size: 13.5px;
}

.buddy-card__suburb {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.buddy-card__request {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.buddy-card__request:hover {
  background: var(--accent);
  color: #fff;
}

/* Donate */

.donate-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}

.donate-option {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 12px;
  padding: 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}

.donate-option--selected {
  border-color: var(--accent);
  background: var(--highlight-bg);
  color: var(--accent);
}

.donate-option--custom {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: text;
}

.donate-option--custom span {
  font-weight: 700;
  color: var(--muted);
}

.donate-option--custom input {
  border: none;
  outline: none;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  font-family: inherit;
  background: transparent;
  color: var(--text);
}

.donate-submit {
  width: 100%;
  background: var(--hero-bg);
  color: var(--hero-fg);
  font-weight: 700;
  padding: 14px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

.donate-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.donate-note {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.5;
}

/* Simple forms (admin contact, prayer warrior signup) */

.simple-form {
  display: flex;
  flex-direction: column;
}

.simple-form__label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  margin: 14px 0 6px;
}

.simple-form__label:first-child {
  margin-top: 0;
}

.simple-form__input,
.simple-form__textarea {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text);
}

.simple-form__textarea {
  resize: vertical;
}

.simple-form__input:focus,
.simple-form__textarea:focus {
  outline: 2px solid var(--highlight-border);
}

/* Prayer Warrior role + consent */

.role-box {
  border: 1px solid var(--highlight-border);
  background: var(--highlight-bg);
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0 20px;
}

.role-box__title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
}

.role-box__text {
  font-size: 12.5px;
  line-height: 1.55;
  color: #4a4038;
  margin: 0;
}

.role-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.5;
  cursor: pointer;
}

.role-consent input {
  margin-top: 2px;
  flex-shrink: 0;
}

/* WhatsApp prayer request button */

.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 13.5px;
  text-decoration: none;
  box-sizing: border-box;
  margin-top: 16px;
}

.whatsapp-btn:hover {
  background: #1fb958;
}

/* Search type toggle (prayer buddy / prayer warrior) */

.search-type-toggle {
  display: flex;
  gap: 4px;
  margin: 16px 0 4px;
  background: #f4ede1;
  border-radius: 12px;
  padding: 4px;
}

.search-type-toggle__btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
  padding: 10px 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}

.search-type-toggle__btn:hover {
  color: var(--hero-bg);
}

.search-type-toggle__btn--active,
.search-type-toggle__btn--active:hover {
  background: var(--hero-bg);
  color: #fff;
}

/* Small inline badge next to a name (e.g. "Also a Prayer Warrior") */

.name-badge {
  display: inline-block;
  background: var(--hero-bg);
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 6px;
}

/* Search bar (prayer buddy / prayer warrior) */

.search-bar {
  width: 100%;
  padding: 10.4px 16px;
  font-size: 15.2px;
  border: 1px solid #d8d5cd;
  border-radius: 9.6px;
  margin: 16px 0 4px;
  font-family: inherit;
}

.search-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin: 20px 0;
  line-height: 1.5;
}

.match-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.match-card {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 14px;
  padding: 14px 16px;
}

.match-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.buddy-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.buddy-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.match-card__name {
  font-weight: 700;
  font-size: 13.5px;
}

.match-card__suburb {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.match-card__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.match-card__btn {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: none;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.match-card__btn:hover {
  background: var(--accent);
  color: #fff;
}

.match-card__btn--block {
  border-color: #b5453a;
  color: #b5453a;
}

.match-card__btn--block:hover {
  background: #b5453a;
  color: #fff;
}

.match-card__request-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-card__request-form textarea,
.match-card__request-form .match-card__name-input {
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-family: inherit;
}

.match-card__request-form textarea {
  resize: vertical;
}

.form-error {
  color: #b5453a;
  font-size: 11.5px;
  margin-top: -4px;
}

.match-card__request-form button {
  align-self: flex-end;
  border: none;
  background: var(--hero-bg);
  color: var(--hero-fg);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.match-card__sent {
  margin-top: 10px;
  font-size: 12px;
  color: #2c4a2c;
  font-weight: 600;
}

.streak-badge {
  display: inline-block;
  background: #fdf1de;
  color: #92400e;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* Bible reading plan */

.rp-progress {
  margin: 8px 0 24px;
}

.rp-progress__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--card-border);
  overflow: hidden;
}

.rp-progress__fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s ease;
}

.rp-progress__label {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

.rp-day-card {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
}

.rp-day-card__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 20px;
}

.rp-day-card__nav a {
  text-decoration: none;
}

.rp-day-card__daylabel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

.rp-passages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rp-passage {
  background: var(--highlight-bg);
  border: 1px solid var(--highlight-border);
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}

#rp-mark-btn.rp-mark-btn--done {
  background: #2c4a2c;
}

/* Bible quiz */

.quiz-levels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.quiz-level-btn {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 14px;
  padding: 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.quiz-level-btn:hover {
  border-color: var(--accent);
}

.quiz-level-btn__progress {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: none;
}

.quiz-progress {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  text-align: center;
}

.quiz-card {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
}

.quiz-scrambled {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-align: center;
  margin-bottom: 12px;
  color: var(--hero-bg);
}

.quiz-hint {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 16px;
  font-style: italic;
}

.quiz-question {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
  text-align: center;
}

.quiz-verse {
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
  margin-bottom: 20px;
  font-style: italic;
  color: #4a4038;
}

.quiz-blank {
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
  font-style: normal;
  border-bottom: 2px solid var(--accent);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option-btn {
  border: 1px solid var(--card-border);
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.quiz-option-btn:disabled {
  cursor: default;
}

.quiz-option-btn--correct {
  border-color: #2c4a2c;
  background: #eef6ee;
  color: #2c4a2c;
}

.quiz-option-btn--wrong {
  border-color: #b5453a;
  background: #fbecea;
  color: #b5453a;
}

.quiz-built {
  min-height: 44px;
  border: 1px dashed var(--card-border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
}

.quiz-word-btn {
  border: 1px solid var(--card-border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin: 0 6px 6px 0;
  display: inline-block;
}

#quiz-word-bank {
  display: block;
}

.quiz-match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quiz-match-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-match-btn {
  border: 1px solid var(--card-border);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  min-height: 44px;
}

.quiz-match-btn--selected {
  border-color: var(--accent);
  background: var(--highlight-bg);
}

.quiz-match-btn--done {
  border-color: #2c4a2c;
  background: #eef6ee;
  color: #2c4a2c;
  opacity: 0.7;
}

.quiz-match-btn--wrong {
  border-color: #b5453a;
  background: #fbecea;
}

.quiz-feedback {
  margin-top: 16px;
  text-align: center;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px;
  border-radius: 10px;
}

.quiz-feedback--correct {
  background: #eef6ee;
  color: #2c4a2c;
}

.quiz-feedback--wrong {
  background: #fbecea;
  color: #b5453a;
}

.quiz-finish {
  text-align: center;
  padding: 40px 20px;
}

.quiz-finish__score {
  font-size: 36px;
  font-weight: 700;
  color: var(--hero-bg);
}

.quiz-finish__label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* My Journey (profile) */

.journey-card {
  border: 1px solid var(--highlight-border);
  background: var(--highlight-bg);
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
}

.journey-card__title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
  text-align: center;
}

.journey-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.journey-stat {
  text-align: center;
}

.journey-stat__num {
  font-weight: 700;
  font-size: 18px;
}

.journey-stat__label {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
}

.journey-card__links {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--highlight-border);
  padding-top: 14px;
}

.journey-card__links a {
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

/* Profile */

.profile-picture-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 20px 0 28px;
}

.profile-picture {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card-border);
}

/* Safety modal */

.safety-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.safety-modal-overlay[hidden] {
  display: none;
}

.safety-modal {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.safety-modal__icon {
  font-size: 34px;
  margin-bottom: 12px;
}

.safety-modal__title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
}

.safety-modal__text {
  font-size: 13px;
  line-height: 1.6;
  color: #4a4038;
  margin: 0 0 16px;
}

.safety-modal__checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--highlight-bg);
  border: 1px solid var(--highlight-border);
  border-radius: 10px;
}

.safety-modal__checks .role-consent {
  margin-top: 0;
  font-weight: 600;
}

/* Dual-send buttons (buddy / buddy + warrior) with hover tooltips */

.send-mode-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.send-mode-btn {
  position: relative;
  flex: 1;
  min-width: 120px;
  border: none;
  background: var(--hero-bg);
  color: var(--hero-fg);
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.send-mode-btn--both {
  background: var(--accent);
}

[data-tooltip] {
  cursor: help;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f1a14;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 8px;
  width: 190px;
  white-space: normal;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  z-index: 20;
  pointer-events: none;
}

[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1f1a14;
  margin-bottom: -4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  z-index: 20;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before,
[data-tooltip]:focus::after,
[data-tooltip]:focus::before {
  opacity: 1;
  visibility: visible;
}

/* Archive calendar */

.cal {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px;
}

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

.cal__month {
  font-weight: 700;
  font-size: 14px;
}

.cal__nav {
  border: 1px solid var(--card-border);
  background: #fff;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text);
}

.cal__nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cal__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal__cell {
  aspect-ratio: 1;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal__cell--empty {
  cursor: default;
}

.cal__cell--none {
  background: transparent;
  color: #c9c3b6;
  cursor: default;
}

.cal__cell--has {
  background: var(--highlight-bg);
  border: 1px solid var(--highlight-border);
  color: var(--accent);
}

.cal__cell--has:hover {
  background: var(--accent);
  color: #fff;
}

.cal__cell--today {
  box-shadow: 0 0 0 2px var(--hero-bg) inset;
}

.cal__legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 14px;
  font-size: 10.5px;
  color: var(--muted);
}

.cal__legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.cal__dot--has {
  background: var(--highlight-bg);
  border: 1px solid var(--highlight-border);
}

.cal__dot--none {
  background: #e5e3dd;
}

/* Coming soon */

.coming-soon {
  border: 1px dashed var(--card-border);
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  margin-top: 16px;
}

.coming-soon__title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
}

.coming-soon__desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* Desktop: present the app shell as a centered phone-width card */

@media (min-width: 560px) {
  .app-shell {
    margin-top: 32px;
    margin-bottom: 32px;
    min-height: auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  }
}
