/* Layout concept: a linocut print run. Ink on paper, hard offset "press" shadows, one red for the Sacred Heart. Phone first, bottom tab bar. */
/* Layout concept: a bright parish newsletter. White paper, soft rounded cards, Marian blue with a touch of gold; the logo's ink drawing does the character work. Always light. */
:root {
  --paper: #ffffff;
  --paper-2: #f3f6fb;
  --ink: #1e2a3b;
  --ink-2: #5b6779;
  --rule: #dfe5ee;
  --line: #c9d3e1;
  --red: #2f5d9b;          /* primary accent: Marian blue */
  --red-ink: #ffffff;
  --gold: #c8962e;
  --heart: #b8322a;        /* used only for Prayer & a Pint markers */
  --green: #2c7a4b;
  --shadow: rgba(30, 42, 59, 0.08);
  --logo-filter: none;
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-num: "Nunito Sans", system-ui, sans-serif;
  --r: 12px;
  --tabbar-h: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.5 var(--f-body);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
body.locked { overflow: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
img { max-width: 100%; }
.inkimg { filter: var(--logo-filter); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.selectable { user-select: all; }
.grow { flex: 1; }

/* top bar */
.demo-bar { background: var(--paper-2); color: var(--ink-2); text-align: center; font-size: 0.8rem; padding-block: 6px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--paper);
  display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(200, 150, 46, 0.35);
  padding-block: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.brand img { width: 44px; height: 44px; flex: none; object-fit: contain; }
.brand span { display: flex; flex-direction: column; min-width: 0; }
.brand strong { font-family: var(--f-display); font-weight: 600; font-size: 1.3rem; line-height: 1.05; letter-spacing: 0.005em; white-space: nowrap; }
.brand small { margin-top: 3px; font-size: 0.62rem; font-weight: 700; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.18em; color: #a87b1f; white-space: nowrap; }
.team-btn { white-space: nowrap; flex: none; }
@media (max-width: 430px) {
  .brand { gap: 9px; }
  .brand img { width: 40px; height: 40px; }
  .brand strong { font-size: 1.2rem; }
  .brand small { font-size: 0.55rem; letter-spacing: 0.14em; }
  .team-btn { padding-inline: 12px; font-size: 0.85rem; }
}
@media (max-width: 365px) {
  .brand strong { font-size: 1.1rem; }
  .brand small { font-size: 0.5rem; letter-spacing: 0.13em; }
}
.topnav { display: none; gap: 4px; margin-left: auto; }
.topnav a { text-decoration: none; padding: 6px 12px; border-radius: var(--r); font-weight: 500; position: relative; }
.topnav a.on { background: var(--paper-2); color: var(--red); }
.team-btn, .who { margin-left: auto; }
.who { font-weight: 600; font-size: 0.9rem; }
@media (min-width: 760px) {
  .topnav { display: flex; }
  .team-btn, .who { margin-left: 0; }
  .tabbar { display: none !important; }
  body { padding-bottom: 0; }
}

/* bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--paper); border-top: 1px solid var(--rule);
  display: flex; justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; text-decoration: none; font-size: 0.72rem; font-weight: 500; color: var(--ink-2); position: relative; min-height: var(--tabbar-h); justify-content: center; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on svg { stroke: var(--red); }
.tabbar svg, .topnav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.count { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--heart); color: #ffffff; font-size: 0.68rem; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; font-style: normal; }
.topnav .count { position: static; display: inline-grid; margin-left: 6px; }

/* pages */
main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.page { max-width: 880px; margin: 0 auto; padding-block: 24px 40px; display: flex; flex-direction: column; gap: 20px; }
.page.narrow { max-width: 520px; }
.page-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.9rem, 6vw, 2.4rem); line-height: 1.1; }
.section-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lede { font-size: 1.05rem; max-width: 60ch; color: var(--ink-2); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; color: var(--gold); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px;
  background: var(--red); color: var(--red-ink); border: 1px solid var(--red); border-radius: 999px;
  font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: 0 2px 6px rgba(47, 93, 155, 0.25);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.ghost { background: var(--paper); color: var(--red); border-color: var(--line); box-shadow: 0 1px 3px var(--shadow); }
.btn.ghost:active { box-shadow: none; }
.btn.small { min-height: 38px; padding: 0 12px; font-size: 0.9rem; }
.btn.danger { background: var(--red); border-color: var(--red); color: var(--red-ink); box-shadow: 0 1px 3px var(--shadow); }
.btn.danger-text { color: var(--red); }
.btn:disabled { opacity: 0.6; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; color: var(--red); text-underline-offset: 3px; cursor: pointer; font-weight: 500; }
.icon-btn { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--r); font-size: 1.3rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.chip { border: 1px solid var(--line); background: var(--paper-2); border-radius: 999px; padding: 4px 10px; font-size: 0.85rem; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 0.75rem; border: 1px solid var(--line); color: var(--ink-2); border-radius: 999px; padding: 2px 8px; }

/* home */
.hero { display: grid; gap: 20px; align-items: center; padding-top: 8px; }
.hero .badge { width: min(230px, 62vw); justify-self: center; }
.hero h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.1rem, 8vw, 3.2rem); line-height: 1.05; margin-block: 8px 12px; }
.hero-text { display: flex; flex-direction: column; gap: 4px; }
.hero .row { margin-top: 16px; flex-wrap: wrap; }
@media (min-width: 760px) { .hero { grid-template-columns: 300px 1fr; gap: 40px; } .hero .badge { width: 100%; } }
.next { display: flex; flex-direction: column; gap: 10px; }

/* event cards */
.event-card {
  display: flex; gap: 14px; align-items: stretch; text-align: left; width: 100%;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; cursor: pointer;
  box-shadow: 0 2px 10px var(--shadow); transition: transform .08s, box-shadow .08s;
}
.event-card:active { transform: translateY(1px); box-shadow: 0 1px 4px var(--shadow); }
.date-stamp { flex: none; width: 58px; border: 0; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 0; background: var(--paper-2); }
.ds-mon { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; color: var(--red); }
.ds-day { font-family: var(--f-display); font-weight: 600; font-size: 1.7rem; line-height: 1.05; color: var(--ink); }
.ds-wd { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.ec-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ec-cat { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; color: var(--ink-2); }
.ec-title { font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.ec-meta { color: var(--ink-2); font-size: 0.9rem; }
.ec-repeat { font-size: 0.82rem; color: var(--red); font-weight: 600; }
.event-card.big { padding: 16px; box-shadow: 0 4px 16px rgba(47, 93, 155, 0.15); }
.event-card.big .date-stamp { width: 72px; }
.event-card.big .ds-day { font-size: 2.2rem; }
.event-card.big .ec-title { font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; }
.event-card.big { border-top: 4px solid var(--gold); }
.empty { color: var(--ink-2); }
.empty-box { border: 2px dashed var(--rule); border-radius: var(--r); padding: 28px 20px; text-align: center; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.empty-box strong { color: var(--ink); }

/* calendar */
.cal { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: 0 2px 10px var(--shadow); background: var(--paper); }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-nav h2 { font-family: var(--f-display); font-weight: 600; font-size: 1.4rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--ink-2); padding-bottom: 4px; }
.cal-day { aspect-ratio: 1; max-width: 100%; border: 1.5px solid transparent; background: none; border-radius: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-variant-numeric: tabular-nums; font-weight: 500; padding: 0; }
.cal-day.past { color: var(--ink-2); }
.cal-day.has { background: var(--paper-2); }
.cal-day.today span { background: var(--red); color: var(--red-ink); border-radius: 999px; width: 28px; height: 28px; display: grid; place-items: center; }
.cal-day.picked { border-color: var(--red); }
.dots { display: flex; gap: 3px; height: 6px; }
.dots b { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.dots b.pint { background: var(--gold); }
.today-link { margin-top: 10px; }

/* sheet */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(30, 42, 59, 0.35); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--paper); width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; animation: up .18s ease-out;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 760px) { .scrim { align-items: center; } .sheet { border-radius: 10px; border-bottom: 1px solid var(--rule); box-shadow: 0 10px 40px rgba(30, 42, 59, 0.2); } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } .btn, .event-card { transition: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.sheet-head h2 { font-family: var(--f-display); font-weight: 600; font-size: 1.4rem; line-height: 1.15; min-width: 0; }
.sheet-head .icon-btn { width: 38px; height: 38px; font-size: 1rem; flex: none; }
.sheet-body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--rule); }
.poster { width: 100%; border: 1px solid var(--line); border-radius: 10px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.facts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; color: var(--ink-2); padding-top: 3px; }
.facts dd { margin: 0; }
.desc { white-space: pre-wrap; }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.card { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--paper); box-shadow: 0 2px 10px var(--shadow); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.hint { font-size: 0.85rem; color: var(--ink-2); }
.error { color: var(--red); font-weight: 600; }
input:not([type=checkbox]):not([type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); font-size: 16px;
}
textarea { resize: vertical; }
input[type=file] { font-size: 0.9rem; max-width: 100%; }
select.mini { width: auto; min-height: 36px; padding: 4px 8px; font-size: 0.9rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.check { display: flex; align-items: center; gap: 8px; min-height: 46px; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }
.skips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.skips .label { width: 100%; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg button { min-height: 44px; border: 0; background: var(--paper); font-weight: 600; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on.in { background: var(--green); color: #ffffff; }
.seg button.on.out { background: var(--red); color: var(--red-ink); }
.notice { border: 1px solid var(--line); border-left-width: 4px; border-left-color: var(--gold); border-radius: var(--r); padding: 12px 14px; background: var(--paper-2); }
.login-mark { width: 84px; }

/* posters */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper-2); padding: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; text-align: left; box-shadow: 0 1px 3px var(--shadow); }
.tile img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; border-bottom: 1px solid var(--rule); }
.file-icon { aspect-ratio: 3/4; display: grid; place-items: center; font-family: var(--f-num); font-weight: 700; font-size: 1.2rem; border-bottom: 1px solid var(--rule); }
.tile-name { padding: 8px; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* money */
.balance-card { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: 0 4px 16px rgba(47, 93, 155, 0.15); display: flex; flex-direction: column; gap: 4px; background: var(--paper); }
.balance { font-size: clamp(2.2rem, 10vw, 3rem); font-weight: 600; line-height: 1.1; }
.balance.neg { color: var(--red); }
.inout { display: flex; gap: 24px; margin-top: 10px; flex-wrap: wrap; }
.inout > span { display: flex; flex-direction: column; }
.num.in { color: var(--green); }
.num.out { color: var(--ink); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 11rem) 1fr auto; gap: 10px; align-items: center; font-size: 0.9rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; background: var(--paper-2); border-radius: 999px !important; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--red); border-radius: 999px; }
.ledger-month h3 { font-size: 0.85rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ledger li { border-bottom: 1px solid var(--rule); }
.ledger button { width: 100%; display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; background: none; border: 0; text-align: left; cursor: pointer; }
.lg-main { display: flex; flex-direction: column; min-width: 0; }
.lg-desc { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.lg-meta { font-size: 0.82rem; color: var(--ink-2); }
.lg-amt { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.lg-bal { font-size: 0.78rem; color: var(--ink-2); }

/* inbox / team */
.msg { display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 3px var(--shadow); }
.msg.done { opacity: 0.6; box-shadow: none; }
.msg header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.msg-body { white-space: pre-wrap; }
.people { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.people li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; background: var(--paper-2); flex: none; }

/* bits */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--ink); color: #ffffff; padding: 10px 16px; border-radius: var(--r); font-weight: 600; box-shadow: 0 2px 6px rgba(47, 93, 155, 0.25); max-width: calc(100vw - 32px); }
@media (min-width: 760px) { .toast { bottom: 24px; } }
.error-bar { background: var(--red); color: var(--red-ink); padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); font-weight: 600; }
.foot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-block: 24px 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 0.85rem; text-align: center; }
.foot img { width: 36px; }
.card form.row input { flex: 1; min-width: 0; }
.form > .btn.small { align-self: flex-start; }

.fab { position: fixed; z-index: 25; right: max(16px, calc(env(safe-area-inset-right, 0px) + 16px)); bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--red); color: var(--red-ink); font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 0 6px 18px rgba(47, 93, 155, 0.35); }
.fab span { font-size: 1.5rem; line-height: 1; }
@media (min-width: 760px) { .fab { bottom: 24px; } }
.templates { display: flex; flex-direction: column; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.templates .chip { background: var(--paper-2); color: var(--red); font-weight: 600; padding: 6px 12px; }

/* Minutes */
.min-card { display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%; cursor: pointer; font: inherit; color: inherit; }
.min-date { flex: none; width: 56px; display: flex; flex-direction: column; align-items: center; background: var(--paper-2); border-radius: var(--r); padding: 8px 0; line-height: 1.1; }
.min-date .m { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--red); }
.min-date .d { font-family: var(--f-display); font-size: 1.6rem; font-weight: 600; }
.min-date .y { font-size: 0.72rem; color: var(--ink-2); }
.min-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.min-snip { color: var(--ink-2); font-size: 0.9rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#min-search { width: 100%; }
@media (max-width: 380px) { .tabbar a { font-size: 0.66rem; } }

.person { display: flex; flex-direction: column; min-width: 0; }
.person .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 340px) {
  .brand img { width: 34px; height: 34px; }
  .brand strong { font-size: 1rem; }
  .brand small { font-size: 0.46rem; letter-spacing: 0.12em; }
}

/* Mail */
.mail-tabs { margin-top: 4px; }
.mail-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.mail-list li { border-bottom: 1px solid var(--rule); }
.mail-row { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: none; border: 0; padding: 12px 4px; cursor: pointer; font: inherit; color: inherit; }
.mail-row:hover { background: var(--paper-2); }
.mr-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.mr-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-count { font-size: 0.75rem; color: var(--ink-2); }
.mr-when { flex: none; font-size: 0.8rem; color: var(--ink-2); }
.mr-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-snip { color: var(--ink-2); font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row.unread .mr-who, .mail-row.unread .mr-subj { font-weight: 700; color: var(--ink); }
.mail-row.unread .mr-when { color: var(--red); font-weight: 700; }
.mail-row.unread { box-shadow: inset 3px 0 0 var(--red); padding-left: 10px; }
.tag { display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #a87b1f; border: 1px solid rgba(200, 150, 46, 0.5); border-radius: 999px; padding: 0 6px; vertical-align: 1px; }
.thread { display: flex; flex-direction: column; gap: 14px; }
.mail-msg { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mail-msg.out { background: var(--paper-2); }
.mail-msg header { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mail-msg header .small { overflow-wrap: anywhere; }
.mail-text { overflow-wrap: anywhere; }
.mail-html iframe { width: 100%; min-height: 40px; border: 0; background: #fff; display: block; }
.mail-tools { gap: 16px; margin-top: 6px; }
.mm-head { display: flex !important; flex-direction: row !important; gap: 10px; align-items: flex-start; }
.mm-who { display: flex; flex-direction: column; min-width: 0; }
.mm-who .small { overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.file-chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 12px; font-size: 0.85rem; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip b { font-size: 0.68rem; color: var(--red); margin-right: 4px; }
.seg.mail-tabs { grid-template-columns: repeat(3, 1fr); }
.seg.mail-tabs button + button { border-left: 1px solid var(--line); }

/* Password show/hide eye */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 52px !important; }
.pw-eye { position: absolute; top: 50%; right: 2px; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; border-radius: 8px; cursor: pointer; color: var(--ink); }
.pw-eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pw-eye[aria-pressed="true"] { color: var(--red); }
