/* ============================================================
   FINDEMICH · MOBILE SHELL
   iPhone frame + status bar + app bar + bottom tab bar + sheet.
   Loaded AFTER ../styles.css. Reuses all design-system tokens
   and component classes; only adds mobile chrome + layout.
   ============================================================ */

/* ── Stage ────────────────────────────────────────────────── */
.m-stage *, .m-stage *::before, .m-stage *::after { box-sizing: border-box; }

.m-stage {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 50% 0%, #1b2435 0%, #0c111b 55%, #070a11 100%);
  font-family: var(--font-sans);
}

/* ── Device ───────────────────────────────────────────────── */
.device {
  position: relative;
  width: 390px;
  height: min(844px, calc(100vh - 48px));
  background: #05070c;
  border-radius: 56px;
  padding: 13px;
  box-shadow:
    0 0 0 2px #2a2f3a,
    0 0 0 11px #0e1117,
    0 0 0 12px #2c313c,
    0 40px 80px -20px rgba(0,0,0,0.7);
  flex-shrink: 0;
}
.device-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 44px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Dynamic island ───────────────────────────────────────── */
.island {
  position: absolute;
  top: 11px; left: 50%; transform: translateX(-50%);
  width: 118px; height: 33px;
  background: #05070c;
  border-radius: var(--r-pill);
  z-index: 40;
}

/* ── Status bar ───────────────────────────────────────────── */
.statusbar {
  flex-shrink: 0;
  height: 52px;
  padding: 14px 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elev);
  color: var(--ink);
  font-family: var(--font-sans);
  position: relative;
  z-index: 30;
}
.statusbar.on-tint { background: var(--bg); }
.statusbar .time {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.statusbar .sb-right { display: flex; align-items: center; gap: 6px; }
.statusbar .sb-right svg { display: block; }

/* ── App bar ──────────────────────────────────────────────── */
.appbar {
  flex-shrink: 0;
  min-height: 52px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}
.appbar.flush { border-bottom: none; }
.appbar .brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ink);
}
.appbar .brand-mark { color: var(--primary); display: flex; }
.appbar .brand-name { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.appbar .brand-name span { color: var(--primary); }
.appbar .title {
  display: block;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink);
  white-space: nowrap;
}
.appbar .sub {
  display: block;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-faint); margin-top: 1px;
}
.appbar .spacer { flex: 1; }

/* round icon action in bars */
.bar-btn {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent;
  color: var(--ink-mid); cursor: pointer; position: relative; flex-shrink: 0;
  text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.bar-btn:hover, .bar-btn:active { background: var(--bg-soft); color: var(--ink); }
.bar-btn.bordered { border-color: var(--line); background: var(--bg-elev); }
.bar-btn .count {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
  border-radius: var(--r-pill); background: var(--primary); color: #fff;
  font-family: var(--font-mono); font-size: 9px; font-weight: 600; line-height: 1;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-elev);
}

/* ── Scroll area ──────────────────────────────────────────── */
.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.screen::-webkit-scrollbar { width: 0; background: transparent; }
.screen { scrollbar-width: none; }

/* generic mobile content padding */
.m-pad { padding: 18px 16px; }
.m-pad-x { padding-left: 16px; padding-right: 16px; }

/* mobile section header */
.m-sec-head { margin: 4px 0 14px; }
.m-sec-head .eyebrow { margin-bottom: 7px; }
.m-sec-head h2 {
  font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
  line-height: 1.25;
}
.m-sec-head p { font-size: 13px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }
.m-sec-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 500; color: var(--primary); text-decoration: none;
}

/* horizontal scroll rail for cards */
.m-rail {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 16px 8px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.m-rail::-webkit-scrollbar { display: none; }
.m-rail { scrollbar-width: none; }
.m-rail > * { scroll-snap-align: start; flex-shrink: 0; }

/* ── Bottom tab bar ───────────────────────────────────────── */
.tabbar {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  padding: 7px 6px 22px;
  position: relative; z-index: 20;
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 4px 0; text-decoration: none; color: var(--ink-faint);
  background: none; border: none; cursor: pointer; font-family: var(--font-sans);
}
.tab svg, .tab i { width: 22px; height: 22px; }
.tab .lbl { font-size: 10.5px; font-weight: 500; letter-spacing: -0.01em; }
.tab.active { color: var(--primary); }
.tab .tab-ico { position: relative; }
.tab .tab-ico .count {
  position: absolute; top: -5px; right: -9px;
  min-width: 15px; height: 15px; padding: 0 4px; box-sizing: border-box;
  border-radius: var(--r-pill); background: var(--primary); color: #fff;
  font-family: var(--font-mono); font-size: 8.5px; font-weight: 600; line-height: 1;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-elev);
}
.tab.active .tab-ico .count { border-color: var(--bg-elev); }

/* home indicator (for flows without a tab bar) */
.home-ind {
  flex-shrink: 0; height: 22px; background: var(--bg-elev);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 8px;
}
.home-ind::after {
  content: ''; width: 132px; height: 5px; border-radius: var(--r-pill); background: var(--ink);
  opacity: 0.85;
}
.home-ind.on-tint { background: var(--bg); }

/* ── Bottom sheet ─────────────────────────────────────────── */
.sheet-scrim {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(15,23,42,0.45);
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.sheet-scrim.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 51;
  background: var(--bg-elev);
  border-radius: 22px 22px 44px 44px;
  transform: translateY(110%); transition: transform .26s cubic-bezier(.32,.72,.25,1);
  max-height: 86%; display: flex; flex-direction: column;
  box-shadow: 0 -10px 40px rgba(5,7,12,0.3);
}
.sheet.open { transform: translateY(0); }
.sheet-grip { display: flex; justify-content: center; padding: 10px 0 4px; }
.sheet-grip::after { content: ''; width: 38px; height: 4px; border-radius: var(--r-pill); background: var(--line-strong); }
.sheet-head {
  padding: 6px 18px 12px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.sheet-head h3 { font-size: 16px; font-weight: 600; color: var(--ink); }
.sheet-body { padding: 14px 18px 18px; overflow-y: auto; min-height: 0; }
.sheet-body::-webkit-scrollbar { display: none; }
/* pinned sheet footer — stays visible without scrolling the body */
.sheet-foot {
  flex-shrink: 0;
  padding: 12px 18px 22px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
}

/* sheet menu rows */
.sheet-link {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 4px; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--line-faint);
}
.sheet-link:last-child { border-bottom: none; }
.sheet-link .ico {
  width: 34px; height: 34px; border-radius: var(--r-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--ink-mid);
}
.sheet-link.primary .ico { background: var(--primary-soft); color: var(--primary); }
.sheet-link .txt strong { display: block; font-size: 14.5px; font-weight: 600; }
.sheet-link .txt small { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 1px; }
.sheet-link .chev { margin-left: auto; color: var(--ink-faint); }

/* segmented language control in sheet */
.seg {
  display: flex; gap: 4px; padding: 4px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.seg button {
  flex: 1; padding: 9px; border: none; border-radius: var(--r-xs); cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  background: transparent; color: var(--ink-soft);
}
.seg button.active { background: var(--bg-elev); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-xs); }

/* ── Mobile sticky CTA bar (profile contact, register nav) ── */
.m-actionbar {
  flex-shrink: 0;
  display: flex; gap: 10px; align-items: center;
  padding: 12px 16px 14px;
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  position: relative; z-index: 20;
}
.m-actionbar .btn { flex: 1; justify-content: center; }

/* full-width stacking helpers */
.m-stack { display: flex; flex-direction: column; gap: 14px; }
.m-stack-sm { display: flex; flex-direction: column; gap: 8px; }

/* ════════════════════════════════════════════════════════════
   MOBILE CONTENT COMPONENTS (shared across pages)
   ════════════════════════════════════════════════════════════ */

/* ── Hero search (stacked) ────────────────────────────────── */
.m-search { display: flex; flex-direction: column; gap: 8px; }
.m-search-cell {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 13px; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.m-search-cell:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.m-search-cell svg { color: var(--ink-faint); flex-shrink: 0; }
.m-search-cell input {
  border: none; outline: none; background: none; width: 100%;
  font: inherit; font-size: 14px; color: var(--ink);
}
.m-search-cell input::placeholder { color: var(--ink-faint); }

/* ── Stat rail card ───────────────────────────────────────── */
.m-stat {
  min-width: 116px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 15px;
}
.m-stat .num {
  font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.m-stat .num .star { color: var(--star); font-size: 16px; }
.m-stat .lbl { font-size: 11.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.3; }

/* ── Category cell (directory grid) ───────────────────────── */
.m-dir-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.m-dircell {
  display: flex; flex-direction: column; gap: 10px;
  padding: 15px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-md); text-decoration: none; color: inherit;
}
.m-dircell:active { border-color: var(--primary-line); background: var(--primary-soft); }
.m-dircell .icon {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.m-dircell .name { font-size: 14.5px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.m-dircell .de { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); margin-top: 2px; }
.m-dircell .count { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.m-dircell .count strong { color: var(--ink); font-weight: 600; }

/* ── Person card (full-width mobile) ──────────────────────── */
.m-person {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 17px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-md); text-decoration: none; color: inherit;
}
.m-person.featured {
  border-color: var(--primary-line);
  background: linear-gradient(180deg, rgba(30,64,175,0.03) 0%, transparent 55%), var(--bg-elev);
  box-shadow: var(--shadow-brand);
}
.m-person.featured::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-deep));
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.m-person .fav {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent;
  color: var(--ink-faint); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.m-person .fav.saved { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.m-person .fav.saved svg { fill: var(--primary); }
.m-person .head { display: flex; align-items: flex-start; gap: 12px; padding-right: 38px; }
.m-person .name {
  font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink);
  line-height: 1.25; display: flex; align-items: center; gap: 5px;
}
.m-person .name .check { color: var(--primary); }
.m-person .role { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.35; }
.m-person .bio { font-size: 13px; line-height: 1.5; color: var(--ink-mid); }
.m-person .meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 12px; border-top: 1px solid var(--line);
}
.m-person .rating { display: flex; align-items: center; gap: 5px; font-size: 12.5px; }
.m-person .rating .n { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.m-person .rating .stars { color: var(--star); font-size: 10.5px; }
.m-person .rating .c { color: var(--ink-faint); font-size: 11.5px; }
.m-person .loc { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-soft); }
.m-person .langs { display: flex; gap: 4px; align-items: center; }
.m-person .sponsor {
  margin-left: auto; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 5px;
}
.m-person .sponsor::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }

/* ── How-it-works step ────────────────────────────────────── */
.m-how {
  display: flex; gap: 14px; padding: 16px; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.m-how .num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--primary);
  width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--r-sm);
  background: var(--primary-soft); display: flex; align-items: center; justify-content: center;
}
.m-how .t { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.m-how .d { font-size: 12.5px; color: var(--ink-mid); margin-top: 4px; line-height: 1.5; }
.m-how .x {
  margin-top: 9px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 6px;
}
.m-how .x svg { width: 13px; height: 13px; color: var(--primary); }

/* ── Mobile footer (condensed) ────────────────────────────── */
.m-footer { background: var(--bg-tint); border-top: 1px solid var(--line); padding: 24px 16px 28px; }
.m-footer .brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.m-footer .brand-mark { color: var(--primary); display: flex; }
.m-footer .brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.m-footer .brand-name span { color: var(--primary); }
.m-footer .desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; margin: 12px 0 14px; }
.m-footer .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.m-footer .links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 16px; }
.m-footer .links a { font-size: 13px; color: var(--ink-mid); text-decoration: none; }
.m-footer .copy { font-size: 11.5px; color: var(--ink-faint); border-top: 1px solid var(--line); padding-top: 14px; line-height: 1.5; }

/* ── Notice / banner (mobile) ─────────────────────────────── */
.m-notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: var(--r-md);
  background: var(--primary-soft); border: 1px solid var(--primary-line);
}
.m-notice .ico {
  width: 32px; height: 32px; border-radius: var(--r-sm); flex-shrink: 0;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
}
.m-notice .t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.m-notice .d { font-size: 12px; color: var(--ink-mid); margin-top: 2px; line-height: 1.45; }

/* ── List row (favorites, inbox, reviews) ─────────────────── */
.m-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-md); text-decoration: none; color: inherit;
}
.m-row .body { flex: 1; min-width: 0; }
.m-row .name { font-size: 14.5px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; display: flex; align-items: center; gap: 5px; }
.m-row .name .check { color: var(--primary); flex-shrink: 0; }
.m-row .role { font-size: 12px; color: var(--ink-soft); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-row .chev { color: var(--ink-faint); flex-shrink: 0; }
