/* ============================================================
   WinAstro Mobile UI kit — screen styles (links ../../styles.css
   for tokens + fonts). iOS = HIG; Android = Material 3. Brand
   stays constant: ink, champagne gold, terracotta, trust teal.
   ============================================================ */

.m-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--text-strong);
  background: var(--wa-paper);
  position: relative;
}
.m-scroll { flex: 1; overflow: auto; }
.m-scroll::-webkit-scrollbar { width: 0; height: 0; }
.m-serif { font-family: var(--font-heading); }
.m-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wa-gold); margin: 0; }
.m-muted { color: var(--text-muted); }
.m-glyph { font-family: var(--font-display); }
.ios-safetop { padding-top: 54px; }

/* ---- Brand ink header (Home) ---- */
.m-brandhead {
  background:
    radial-gradient(circle at 12% 0%, rgba(200,169,106,0.22), transparent 42%),
    linear-gradient(180deg, #101511, #18211d);
  color: var(--wa-ivory);
  padding: 14px 20px 22px;
}
.m-brandhead .row { display: flex; align-items: center; justify-content: space-between; }
.m-seal {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
  background: rgba(255,250,240,0.1); border: 1px solid rgba(255,250,240,0.22);
}
.m-seal svg { width: 26px; height: 26px; }
.m-word { font-family: var(--font-display); font-size: 19px; line-height: 1; }
.m-word b { font-weight: 800; color: var(--wa-ivory); }
.m-word i { font-style: normal; color: var(--wa-gold); }
.m-iconbtn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,250,240,0.1); border: 1px solid rgba(255,250,240,0.16); color: var(--wa-ivory);
}
.m-greet { margin: 18px 0 0; font-family: var(--font-heading); font-size: 26px; line-height: 1.1; }
.m-greet small { display: block; font-family: var(--font-body); font-size: 13px; font-weight: 700; color: rgba(255,250,240,0.66); margin-bottom: 6px; letter-spacing: 0.02em; }
/* Headings on the dark brand header must stay ivory (base.css makes h1–h4 ink) */
.m-brandhead h1, .m-brandhead h2, .m-brandhead h3, .m-greet { color: var(--wa-ivory); }

/* ---- Generic section ---- */
.m-section { padding: 18px 16px 0; }
.m-section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 10px; }
.m-section-title h3 { font-family: var(--font-heading); font-size: 18px; margin: 0; }
.m-section-title a { font-size: 13px; font-weight: 700; color: var(--wa-teal); text-decoration: none; }

/* ---- Icons (Lucide line set, sized via font/stroke) ---- */
.ic { width: 22px; height: 22px; display: inline-block; vertical-align: middle; flex: none; }
.ic-sm { width: 18px; height: 18px; }
.ic-lg { width: 26px; height: 26px; }

/* ---- Zodiac medallion ---- */
.m-medallion {
  display: grid; place-items: center; border-radius: 50%; color: #fffaf0; flex: none;
  font-family: var(--font-display);
  border: 1px solid color-mix(in srgb, var(--mz, #c8a96a) 56%, #fffaf0);
  background:
    radial-gradient(circle at 34% 28%, rgba(255,250,240,0.42), transparent 30%),
    linear-gradient(145deg, color-mix(in srgb, var(--mz, #c8a96a) 84%, #101511), #101511);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--mz, #c8a96a) 28%, transparent);
}
.m-avatar { display: grid; place-items: center; border-radius: 50%; background: var(--wa-ink); color: var(--wa-ivory); font-weight: 800; flex: none; }

/* ---- Chips & badges ---- */
.m-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(15,118,110,0.11); color: var(--wa-teal); white-space: nowrap; }
.m-chip--gold { background: rgba(200,169,106,0.18); color: #8a5b00; }
.m-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.m-badge--ok { background: rgba(15,118,110,0.12); color: var(--wa-teal); }
.m-badge--busy { background: rgba(224,183,94,0.22); color: #8a5b00; }
.m-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ============================================================
   iOS — Human Interface Guidelines
   ============================================================ */
.ios-largetitle { font-family: var(--font-heading); font-size: 32px; font-weight: 700; letter-spacing: 0.2px; margin: 4px 0 0; padding: 0 16px; }
.ios-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 12px 6px; min-height: 44px;
}
.ios-nav .title { font-size: 17px; font-weight: 700; font-family: var(--font-body); }
.ios-nav .btn { color: var(--wa-terracotta); font-size: 17px; font-weight: 500; display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; }
.ios-group { background: #fff; border-radius: 16px; margin: 0 16px 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(16,21,17,0.04); }
.ios-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 11px 16px; position: relative; }
.ios-row + .ios-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: rgba(60,60,67,0.13); }
.ios-row .lead { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex: none; color: #fff; }
.ios-row .body { flex: 1; min-width: 0; }
.ios-row .body .t { font-size: 16px; }
.ios-row .body .s { font-size: 13px; color: var(--text-muted); }
.ios-row .val { color: var(--text-muted); font-size: 15px; }
.ios-card { background: #fff; border-radius: 18px; margin: 0 16px 14px; padding: 16px; box-shadow: 0 1px 2px rgba(16,21,17,0.05); }

.ios-field { background: #fff; border-radius: 12px; padding: 10px 14px; display: grid; gap: 2px; }
.ios-field label { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.ios-field input, .ios-field textarea { border: 0; outline: 0; font: inherit; font-size: 16px; color: var(--text-strong); background: transparent; width: 100%; resize: none; }

.ios-seg { display: flex; gap: 2px; padding: 2px; background: rgba(118,118,128,0.12); border-radius: 9px; }
.ios-seg button { flex: 1; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-strong); padding: 7px 4px; border-radius: 7px; }
.ios-seg button[aria-selected="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.12); font-weight: 700; }

.ios-btn { width: 100%; height: 50px; border: 0; border-radius: 14px; font: inherit; font-size: 17px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ios-btn--primary { background: linear-gradient(135deg, var(--wa-terracotta), var(--wa-terracotta-2)); color: #fff; box-shadow: 0 10px 22px rgba(195,83,47,0.26); }
.ios-btn--tinted { background: rgba(15,118,110,0.12); color: var(--wa-teal); }

.ios-tabbar {
  display: flex; padding: 8px 8px 24px; gap: 2px;
  background: rgba(248,245,237,0.86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 0.5px solid rgba(60,60,67,0.18);
}
.ios-tab { flex: 1; display: grid; justify-items: center; gap: 3px; padding: 4px 0 2px; color: #8a9089; font-size: 10px; font-weight: 600; background: none; border: 0; }
.ios-tab[aria-selected="true"] { color: var(--wa-terracotta); }

/* sticky bottom CTA bar */
.ios-bottombar {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px 26px;
  background: rgba(248,245,237,0.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 0.5px solid rgba(60,60,67,0.18);
}

/* ============================================================
   Android — Material 3
   ============================================================ */
.m3-appbar { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 4px; min-height: 56px; background: transparent; }
.m3-appbar .iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--text-strong); }
.m3-appbar .title { flex: 1; font-size: 20px; font-weight: 600; }
.m3-largetitle { padding: 6px 24px 18px; font-family: var(--font-heading); font-size: 28px; font-weight: 600; }

.m3-card { background: #fff; border-radius: 18px; margin: 0 16px 14px; padding: 16px; border: 1px solid rgba(16,21,17,0.06); }
.m3-card--tonal { background: #ece5d6; border: 0; }
.m3-card--elev { box-shadow: 0 2px 6px rgba(16,21,17,0.10); border: 0; }

.m3-field { background: #ece5d6; border-radius: 12px 12px 0 0; border-bottom: 2px solid var(--wa-teal); padding: 8px 14px 6px; display: grid; gap: 2px; }
.m3-field label { font-size: 12px; font-weight: 600; color: var(--wa-teal); }
.m3-field input, .m3-field textarea { border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text-strong); width: 100%; resize: none; }

.m3-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--wa-line); background: transparent; font-size: 13px; font-weight: 600; color: var(--text-strong); }
.m3-chip--on { background: rgba(15,118,110,0.14); border-color: transparent; color: var(--wa-teal); }

.m3-btn { height: 44px; padding: 0 24px; border: 0; border-radius: 100px; font: inherit; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.m3-btn--filled { background: var(--wa-terracotta); color: #fff; }
.m3-btn--tonal { background: rgba(15,118,110,0.14); color: var(--wa-teal); }
.m3-btn--text { background: transparent; color: var(--wa-terracotta); padding: 0 12px; }
.m3-fab { position: absolute; right: 18px; bottom: 96px; height: 56px; padding: 0 20px; border: 0; border-radius: 18px; background: linear-gradient(135deg, var(--wa-terracotta), var(--wa-terracotta-2)); color: #fff; font: inherit; font-size: 15px; font-weight: 800; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 8px 20px rgba(195,83,47,0.32); z-index: 5; }

.m3-navbar { display: flex; padding: 10px 6px; background: #ece5d6; }
.m3-navitem { flex: 1; display: grid; justify-items: center; gap: 4px; border: 0; background: none; color: var(--text-muted); font-size: 11px; font-weight: 600; }
.m3-navitem .pill { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; }
.m3-navitem[aria-selected="true"] { color: var(--text-strong); }
.m3-navitem[aria-selected="true"] .pill { background: rgba(15,118,110,0.18); color: var(--wa-teal); }

/* shared small bits */
.m-statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-stat { border: 1px solid var(--wa-line); border-radius: 12px; padding: 8px 10px; font-size: 12px; color: var(--text-muted); }
.m-stat b { display: block; color: var(--text-strong); font-size: 16px; font-weight: 900; }
.m-steps { display: flex; align-items: center; gap: 6px; }
.m-steps .s { width: 7px; height: 7px; border-radius: 50%; background: var(--wa-line); }
.m-steps .s.on { width: 22px; border-radius: 999px; background: var(--wa-terracotta); }
.m-steps .s.done { background: var(--wa-teal); }
.m-tagrow { display: flex; flex-wrap: wrap; gap: 6px; }
