/* THE HOME DESIGN — black & white, phone first.
   Layout: phone = page + bottom tab bar; computer (>= 900px) = sidebar on the right. */

:root {
  --ink: #0b0b0c;          /* near-black: buttons, cards, text */
  --ink-2: #1c1c1f;
  --text: #18181b;
  --muted: #71717a;
  --line: #e7e7ea;
  --bg: #f4f4f5;
  --card: #ffffff;
  --green: #15803d;
  --green-bg: #e9f7ee;
  --red: #dc2626;
  --red-bg: #fdecec;
  --amber: #b45309;
  --amber-bg: #fdf3e3;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 16px rgb(0 0 0 / 0.04);
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: 'Tajawal', 'Segoe UI', Tahoma, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
small { font-size: 0.8em; }
.ic { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- start-up / messages ---------- */
.boot, .center-msg {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 24px;
}
.center-msg h2 { margin-bottom: 8px; }

.loading { display: grid; place-items: center; padding: 80px 0; }
.loading span {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--ink);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 14px;
  font-weight: 700; font-size: 16px;
  transition: transform 0.08s ease, opacity 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-outline { background: var(--card); border: 1px solid var(--line); color: var(--text); }
.btn-block { width: 100%; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; color: var(--text);
}
.icon-btn:hover { background: var(--bg); }
.icon-btn.on-dark { color: #fff; }
.icon-btn.on-dark:hover { background: rgb(255 255 255 / 0.1); }

/* ---------- login ---------- */
.login {
  min-height: 100vh;
  background: var(--ink);
  display: flex; flex-direction: column; align-items: center;
  padding: calc(48px + var(--safe-t)) 16px calc(24px + var(--safe-b));
}
.login-top img { width: 150px; margin: 8px auto 32px; }
.login-card {
  width: 100%; max-width: 420px;
  background: var(--card); border-radius: 24px;
  padding: 28px 22px;
  display: flex; flex-direction: column; gap: 16px;
}
.login-card h1 { font-size: 24px; font-weight: 800; }
.login-card .muted { margin-top: -10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 14px; color: var(--muted); font-weight: 500; }
.field input {
  height: 52px; border: 1px solid var(--line); border-radius: 14px;
  padding: 0 14px; background: #fafafa; font-size: 16px;
}
.field input:focus { outline: none; border-color: var(--ink); background: #fff; }
.form-error { color: var(--red); font-size: 14px; min-height: 20px; margin: -4px 0; }
.login-foot { color: #8a8a93; font-size: 12px; margin-top: auto; padding-top: 24px; letter-spacing: 0.3px; }

/* ---------- app frame ---------- */
.shell { min-height: 100vh; }
.main { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); }

.sidebar { display: none; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgb(255 255 255 / 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; color: #9a9aa3; font-weight: 500;
}
.tabbar a.active { color: var(--ink); font-weight: 700; }

/* ---------- page headers ---------- */
.hero {
  background: var(--ink); color: #fff;
  padding: calc(18px + var(--safe-t)) 16px 64px;
}
.hero-row { display: flex; justify-content: space-between; align-items: center; }
.hero-logo { width: 64px; }
.hero-hello { margin-top: 18px; color: #d4d4d8; font-size: 18px; }
.hero-title { font-size: 30px; font-weight: 800; }

.page-head {
  padding: calc(20px + var(--safe-t)) 16px 4px;
}
.page-head h1 {
  display: flex; align-items: center; gap: 10px;
  font-size: 26px; font-weight: 800;
}

.content {
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  max-width: 980px;
}
.hero + .content { margin-top: -52px; }

/* ---------- cards ---------- */
.summary-card, .profit-card {
  border-radius: var(--radius);
  color: #fff;
  padding: 20px;
  min-height: 150px;
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow);
}
.summary-card {
  background:
    linear-gradient(to left, rgb(11 11 12 / 0.92) 25%, rgb(11 11 12 / 0.35)),
    url('/assets/interiors.jpg') center / cover;
}
.summary-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; margin-bottom: auto; }
.summary-label { color: #d4d4d8; font-size: 14px; }
.summary-value { font-size: 40px; font-weight: 800; line-height: 1.1; }
.summary-value small { font-size: 16px; font-weight: 500; }
.summary-value.neg { color: #fca5a5; }

.profit-card {
  background: var(--ink);
  flex-direction: row; align-items: center; justify-content: space-between;
  min-height: 120px;
}
.bars-art { display: flex; align-items: flex-end; gap: 6px; height: 64px; }
.bars-art i { width: 10px; border-radius: 3px; background: #3f3f46; }
.bars-art i:nth-child(1) { height: 35%; }
.bars-art i:nth-child(2) { height: 55%; }
.bars-art i:nth-child(3) { height: 75%; background: #71717a; }
.bars-art i:nth-child(4) { height: 100%; background: #a1a1aa; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.tile-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; }
.tile-ic {
  width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--text);
}
.tile-value { font-size: 24px; font-weight: 800; }
.tile-value small { font-size: 14px; font-weight: 500; margin-inline-start: 2px; }
.money small { font-size: 13px; font-weight: 500; color: var(--muted); }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; text-align: start;
}
.action span { flex: 1; white-space: nowrap; }
@media (max-width: 380px) { .action { font-size: 14px; padding: 14px 10px; gap: 8px; } }
.action > .ic:last-child { color: #a1a1aa; }
.action:active { background: var(--bg); }

.section-head { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; }
.section-head a { color: var(--muted); font-size: 14px; }

.list { display: flex; flex-direction: column; gap: 10px; }
.empty {
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 28px 16px; text-align: center; color: var(--muted);
}

.row-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; display: flex; gap: 12px; align-items: center;
}
.row-thumb { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; }
.row-body { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.row-body strong { font-size: 16px; }

/* status pill */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  white-space: nowrap;
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-red { background: var(--red-bg); color: var(--red); }
.pill-gray { background: #f1f1f3; color: #52525b; }
.pill-dark { background: var(--ink); color: #fff; }

/* progress bar */
.bar-line { display: flex; align-items: center; gap: 10px; width: 100%; }
.bar-pct { font-weight: 800; font-size: 14px; min-width: 38px; }
.bar { flex: 1; height: 6px; border-radius: 999px; background: #e4e4e7; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }

/* ---------- projects page ---------- */
.search {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  color: var(--muted);
}
.search input { flex: 1; border: 0; outline: none; background: none; font-size: 16px; color: var(--text); }

.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chips button {
  height: 44px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  font-weight: 700; color: var(--muted);
}
.chips button.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.p-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.p-cover { height: 150px; background: #ddd center / cover; }
.p-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.p-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.p-top h3 { font-size: 18px; font-weight: 800; }
.p-top .muted { font-size: 14px; }

.sticky-cta {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
}

/* ---------- accounts page ---------- */
.move {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; align-items: center; gap: 12px;
}
.move-ic {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 18px;
}
.move-ic.in { background: var(--green-bg); color: var(--green); }
.move-ic.out { background: var(--red-bg); color: var(--red); }
.move-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.move-body strong { font-size: 15px; }
.move-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.move-end span { font-weight: 800; }
.pos { color: var(--green); }
.neg { color: var(--red); }

/* ---------- more page ---------- */
.me-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; align-items: center; gap: 12px;
}
.me-card > div:last-child { display: flex; flex-direction: column; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-weight: 800;
}
.avatar.lg { width: 52px; height: 52px; font-size: 20px; }
.group-title { color: var(--muted); font-size: 13px; font-weight: 700; margin: 6px 4px -4px; }
.menu { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 15px 14px; text-align: start; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item span { flex: 1; }
.menu-item em { font-style: normal; font-size: 12px; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 999px; }
.menu-item > .ic:last-child { color: #a1a1aa; }
.menu-item:active { background: var(--bg); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 20px);
  transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-size: 14px; z-index: 50; transition: 0.25s ease; max-width: calc(100% - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--red); }

/* ---------- computer: sidebar layout ---------- */
@media (min-width: 900px) {
  .tabbar { display: none; }
  .main { margin-right: 264px; padding-bottom: 32px; }

  .sidebar {
    display: flex; flex-direction: column;
    position: fixed; top: 0; right: 0; bottom: 0; width: 264px;
    background: var(--ink); color: #fff; padding: 22px 16px;
  }
  .side-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-bottom: 22px; }
  .side-brand img { width: 120px; }
  .side-brand span { color: #a1a1aa; font-size: 14px; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; }
  .side-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 12px; color: #c4c4cc; font-weight: 500;
  }
  .side-nav a:hover { background: rgb(255 255 255 / 0.06); color: #fff; }
  .side-nav a.active { background: #fff; color: var(--ink); font-weight: 700; }

  .side-user {
    margin-top: auto; display: flex; align-items: center; gap: 10px;
    padding: 12px; border-radius: 14px; background: rgb(255 255 255 / 0.06);
  }
  .side-user .avatar { background: #fff; color: var(--ink); }
  .side-user .who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
  .side-user .who small { color: #a1a1aa; }
  .side-user .icon-btn { color: #c4c4cc; }
  .side-user .icon-btn:hover { background: rgb(255 255 255 / 0.1); color: #fff; }

  .hero { border-radius: 0 0 0 0; padding: 28px 32px 72px; }
  .page-head { padding: 28px 32px 4px; }
  .content { padding: 20px 32px; }
  .hero + .content { margin-top: -56px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .actions { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .sticky-cta { position: static; width: auto; align-self: flex-start; box-shadow: none; }
  .toast { bottom: 28px; }
}

/* ---------- forms & panels (employees page and later pages) ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.back .ic { transform: scaleX(-1); }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; display: flex; flex-direction: column; gap: 14px;
}
.panel h2 { font-size: 18px; font-weight: 800; }
.panel[hidden], [hidden] { display: none !important; }
.field select, .input-row select {
  height: 52px; border: 1px solid var(--line); border-radius: 14px;
  padding: 0 12px; background: #fafafa; font-size: 16px; width: 100%;
}
.field small { font-size: 13px; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input, .input-row select { flex: 1; min-width: 0; }
.input-row input {
  height: 52px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: #fafafa; font-size: 16px;
}
.btn.small { height: 52px; padding: 0 16px; font-size: 15px; flex-shrink: 0; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.btn-danger { background: var(--red-bg); color: var(--red); }
.ltr { direction: ltr; text-align: right; unicode-bidi: plaintext; }
.grow { flex: 1; min-width: 0; }
.note { background: #fafafa; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--muted); font-size: 14px; }
.login-box {
  margin: 0; white-space: pre-wrap; font-family: var(--font); font-size: 15px; line-height: 1.8;
  background: #fafafa; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
}

.staff-row {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; display: flex; align-items: center; gap: 12px;
}
.staff-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.staff-body small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.group-head { display: flex; justify-content: space-between; align-items: center; }
.link-btn { color: var(--muted); font-size: 13px; text-decoration: underline; margin-top: 6px; }

.perm-row { padding: 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.perm-row:last-child { border-bottom: 0; }
.perm-label { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.changed { font-style: normal; font-size: 11px; font-weight: 700; color: var(--amber); background: var(--amber-bg); padding: 2px 8px; border-radius: 999px; }
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; min-height: 40px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 4px 6px; line-height: 1.3;
}
.seg button.on { background: var(--ink); color: #fff; font-weight: 700; }

@media (min-width: 900px) {
  .content > .btn-block:first-child { width: auto; align-self: flex-start; }
  .perm-row { flex-direction: row; align-items: center; justify-content: space-between; }
  .perm-label { flex: 0 0 240px; }
  .seg { flex: 1; max-width: 520px; }
}

/* ---------- project page ---------- */
.p-card { display: block; }
.pj-hero {
  position: relative; min-height: 220px; border-radius: var(--radius); overflow: hidden;
  background: #333 center / cover; color: #fff; display: flex; align-items: flex-end; padding: 16px;
}
.pj-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0.05) 70%); }
.pj-hero > * { position: relative; }
.pj-hero .pill { position: absolute; top: 14px; left: 14px; }
.pj-hero-in small { color: #d4d4d8; font-size: 13px; letter-spacing: 0.5px; }
.pj-hero-in h1 { font-size: 26px; font-weight: 800; line-height: 1.25; }
.pj-hero-in p { color: #e4e4e7; font-size: 15px; }
.bar-line.big .bar { height: 10px; }
.bar-line.big .bar-pct { font-size: 20px; min-width: 56px; }
.edit-progress { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
input[type="range"] { width: 100%; accent-color: var(--ink); height: 32px; }
.tile-value.neg .money { color: var(--red); }

label.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.btn-row > .btn, .btn-row > label.btn { flex: 1; }
.btn { text-align: center; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-grid > .empty, .photo-grid > .loading { grid-column: 1 / -1; }
.ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #e4e4e7; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph-tag {
  position: absolute; bottom: 6px; right: 6px; max-width: calc(100% - 12px);
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgb(0 0 0 / 0.65); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ph-tag.tone-amber { background: var(--amber); }

.up-strip { display: flex; gap: 6px; overflow-x: auto; }
.up-strip img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.tag-row button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 14px;
}
.tag-row button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.lightbox {
  position: fixed; inset: 0; z-index: 50; background: #000; color: #fff;
  display: flex; flex-direction: column; padding-top: var(--safe-t);
}
.lightbox > img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: 14px; }
.lb-top .icon-btn { font-size: 18px; width: 44px; height: 44px; }
.lb-info { padding: 12px 16px calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 6px; }
.lb-info > div { display: flex; gap: 10px; align-items: center; }
.lb-info small { color: #a1a1aa; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px;
  font-size: 40px; color: #fff; background: rgb(255 255 255 / 0.08); border-radius: 12px;
}
.lb-nav.next { left: 8px; }
.lb-nav.prev { right: 8px; }

.info-row {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.info-row:last-child { border-bottom: 0; }
.info-row > span { color: var(--muted); font-size: 14px; flex: 0 0 110px; }
.info-row > strong { flex: 1; font-weight: 600; }
.info-row > a { color: var(--ink); font-weight: 700; text-decoration: underline; }
.info-row.col { flex-direction: column; align-items: flex-start; }
.info-row.col p { white-space: pre-wrap; }

.sub-box { background: #fafafa; border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field textarea {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fafafa; font-size: 16px; resize: vertical;
}
.field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); background: #fff; }
.field input[type="date"] { min-height: 52px; }

@media (min-width: 900px) {
  .pj-hero { min-height: 280px; }
  .photo-grid { grid-template-columns: repeat(5, 1fr); gap: 10px; }
  .tiles.four { grid-template-columns: repeat(4, 1fr); }
}
.info-row.col > span { flex: none; }
.two > * { min-width: 0; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; }
.danger-text { color: var(--red); border-color: #f5c2c2; }
.hero-hello small { display: block; color: #a1a1aa; font-size: 14px; }

/* Back button: clear of the iPhone status bar / notch, and big enough to tap. */
.main > .content:first-child { padding-top: calc(12px + var(--safe-t)); }
.back {
  align-self: flex-start; min-height: 44px; padding: 8px 14px 8px 16px; margin-bottom: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  color: var(--text); font-size: 15px; font-weight: 600;
}
.back:active { background: var(--bg); }
