:root {
  --red: #c41230;
  --red-dark: #8f1025;
  --ink: #151515;
  --muted: #686b70;
  --soft: #f5f5f3;
  --line: #e5e5e2;
  --white: #ffffff;
  --blue: #2f5d8a;
  --green: #27765d;
  --amber: #a96812;
  --nav-height: 72px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eceeed;
  font-synthesis: none;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { min-width: 320px; background: #eceeed; }
button, input, textarea { font: inherit; }
button { padding: 0; border: 0; color: inherit; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
svg { width: 22px; height: 22px; stroke-width: 1.8; }
[hidden] { display: none !important; }

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--white);
}

.app-main { min-height: 100dvh; }
.page {
  display: none;
  min-height: 100dvh;
  padding: 0 0 calc(var(--nav-height) + env(safe-area-inset-bottom) + 20px);
  background: var(--white);
}
.page.active { display: block; }
.detail-page { padding-bottom: 0; background: var(--soft); }

.brand-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(64px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: 136px 1fr 40px;
  align-items: end;
  gap: 10px;
  padding: env(safe-area-inset-top) 18px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
}
.brand-header img { width: 128px; height: 24px; object-fit: contain; object-position: left center; }
.brand-header > span { align-self: center; color: var(--muted); font-size: 12px; text-align: right; }
.icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
}
.icon-button:active { background: var(--soft); }
.notification-button b {
  position: absolute;
  top: 4px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid white;
  border-radius: 9px;
  color: white;
  background: var(--red);
  font-size: 9px;
}

.welcome-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 20px 18px;
  background: linear-gradient(180deg, #fff 0%, #faf9f7 100%);
}
.welcome-band span, .page-header span { color: var(--red); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.welcome-band h1 { margin: 5px 0 4px; font-size: 25px; line-height: 1.2; letter-spacing: 0; }
.welcome-band p { margin: 0; color: var(--muted); font-size: 13px; }
.profile-chip {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #a20f28;
  border-radius: 50%;
  color: white;
  background: var(--red);
  font-size: 14px;
  font-weight: 700;
}

.focus-card {
  margin: 0 18px 14px;
  padding: 17px 17px 14px;
  border: 1px solid #dededb;
  border-left: 4px solid var(--red);
  border-radius: 6px;
  background: white;
  box-shadow: 0 7px 20px rgba(26,26,26,.06);
}
.section-kicker { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-kicker span { color: var(--red); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.section-kicker b { padding: 4px 7px; border-radius: 4px; color: var(--green); background: #eaf4ef; font-size: 10px; }
.focus-card h2 { margin: 12px 0 5px; font-size: 20px; }
.focus-card > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.progress-row { display: grid; grid-template-columns: 1fr 34px; align-items: center; gap: 10px; margin-top: 15px; }
.progress-row > span { height: 5px; overflow: hidden; border-radius: 3px; background: #ececea; }
.progress-row i { display: block; height: 100%; background: var(--red); }
.progress-row strong { font-size: 11px; }
.focus-card footer { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.focus-card footer svg { width: 17px; }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 18px 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.summary-strip button { min-width: 0; padding: 14px 5px 13px; }
.summary-strip button + button { border-left: 1px solid var(--line); }
.summary-strip strong { display: block; font-size: 17px; }
.summary-strip span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }

.content-section { padding: 18px; }
.content-section + .content-section { border-top: 8px solid var(--soft); }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 16px; }
.section-heading button { color: var(--red); font-size: 11px; font-weight: 600; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-action { min-width: 0; text-align: center; }
.quick-action > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0 auto 7px;
  border-radius: 6px;
  color: var(--ink);
  background: #f3f2ef;
}
.quick-action svg { width: 21px; }
.quick-action strong { display: block; overflow: hidden; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

.schedule-row {
  display: grid;
  grid-template-columns: 48px 3px 1fr 18px;
  gap: 11px;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
}
.schedule-row:last-child { border-bottom: 0; }
.schedule-row time { font-size: 12px; font-weight: 700; }
.schedule-row time small { display: block; margin-top: 3px; color: #a0a0a0; font-size: 9px; font-weight: 400; }
.schedule-tone { width: 3px; height: 34px; border-radius: 2px; background: var(--red); }
.schedule-tone.blue { background: var(--blue); }
.schedule-tone.amber { background: var(--amber); }
.schedule-copy { min-width: 0; }
.schedule-copy strong { display: block; font-size: 12px; }
.schedule-copy span { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-row > svg { width: 16px; color: #aaa; }

.office-banner {
  position: relative;
  width: calc(100% - 36px);
  height: 118px;
  display: grid;
  grid-template-columns: 1fr 22px;
  align-items: end;
  gap: 10px;
  margin: 0 18px 18px;
  overflow: hidden;
  padding: 18px;
  border-radius: 6px;
  color: white;
  text-align: left;
}
.office-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,14,14,.86), rgba(14,14,14,.18)); }
.office-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.office-banner span, .office-banner > svg { position: relative; z-index: 1; }
.office-banner small { display: block; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.office-banner strong { display: block; margin-top: 5px; font-size: 16px; }
.office-banner b { display: block; margin-top: 4px; color: #eee; font-size: 10px; font-weight: 400; }

.page-header {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: calc(78px + env(safe-area-inset-top));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: calc(env(safe-area-inset-top) + 18px) 18px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
}
.page-header h1 { margin: 4px 0 0; font-size: 25px; }
.segment-control {
  height: 38px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 14px 18px;
  padding: 3px;
  border-radius: 6px;
  background: #eeeeeb;
}
.segment-control button { border-radius: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.segment-control button.active { color: var(--ink); background: white; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.segment-control.compact { width: 210px; margin: 0; }
.case-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 18px 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.case-overview div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.case-overview span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.case-overview strong { display: block; margin-top: 5px; font-size: 12px; }
.case-list { padding: 0 18px 18px; }
.case-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) 20px;
  gap: 12px;
  align-items: center;
  min-height: 91px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.case-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: white;
  background: var(--red);
  font-size: 12px;
  font-weight: 800;
}
.case-mark.proposal { color: var(--red); background: #f7e8eb; }
.case-copy { min-width: 0; }
.case-copy small { color: var(--red); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.case-copy strong { display: block; margin-top: 4px; font-size: 14px; }
.case-copy span { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.case-row > svg { width: 17px; color: #a9a9a6; }

.search-field {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 18px 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
}
.search-field svg { width: 18px; color: #777; }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 12px; }
.topic-row {
  display: flex;
  gap: 7px;
  padding: 0 18px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.topic-row button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: white;
  font-size: 10px;
}
.topic-row button.active { border-color: var(--ink); color: white; background: var(--ink); }
.featured-insight {
  width: calc(100% - 36px);
  margin: 0 18px 8px;
  padding: 19px;
  border-radius: 6px;
  color: white;
  background: #1b1b1b;
  text-align: left;
}
.featured-insight > span { color: #f29aa9; font-size: 9px; font-weight: 800; }
.featured-insight h2 { margin: 12px 0 8px; font-size: 20px; line-height: 1.25; }
.featured-insight p { margin: 0; color: #c8c8c8; font-size: 11px; line-height: 1.5; }
.featured-insight footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; color: #eee; }
.featured-insight footer b { font-size: 10px; font-weight: 500; }
.featured-insight footer svg { width: 18px; }
.insight-section { padding-top: 13px; }
.insight-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0,1fr) 24px;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.insight-row small { color: var(--red); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.insight-row strong { display: block; margin-top: 5px; font-size: 13px; line-height: 1.35; }
.insight-row p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.insight-row button { align-self: start; width: 24px; height: 28px; display: grid; place-items: center; }
.insight-row button svg { width: 17px; }
.insight-row button.saved { color: var(--red); fill: var(--red); }

.mail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 18px 8px; }
.mail-toolbar > span { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.mail-list { border-top: 1px solid var(--line); }
.mail-row {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 46px;
  gap: 11px;
  min-height: 96px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.mail-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: #555; font-size: 10px; font-weight: 700; }
.mail-copy { min-width: 0; }
.mail-copy strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mail-copy h3 { margin: 4px 0; overflow: hidden; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.mail-copy p { margin: 0; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mail-row.unread .mail-copy strong, .mail-row.unread .mail-copy h3 { font-weight: 750; }
.mail-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; color: var(--muted); font-size: 9px; }
.mail-meta button { width: 24px; height: 24px; display: grid; place-items: center; color: #aaa; }
.mail-meta button.starred { color: var(--red); fill: var(--red); }
.mail-meta button svg { width: 16px; }
.unread-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.empty-state { padding: 70px 20px; color: var(--muted); text-align: center; }
.empty-state svg { width: 30px; height: 30px; }
.empty-state strong { display: block; margin-top: 12px; color: var(--ink); }
.empty-state span { display: block; margin-top: 5px; font-size: 11px; }

.profile-hero {
  display: grid;
  grid-template-columns: 64px minmax(0,1fr) 28px;
  gap: 14px;
  align-items: center;
  padding: 24px 18px 20px;
}
.profile-avatar { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--red); font-size: 18px; font-weight: 750; }
.profile-hero h2 { margin: 0; font-size: 21px; }
.profile-hero p { margin: 5px 0 2px; font-size: 12px; font-weight: 600; }
.profile-hero span { color: var(--muted); font-size: 10px; }
.profile-hero > button { width: 28px; height: 36px; display: grid; place-items: center; color: #aaa; }
.profile-hero > button svg { width: 17px; }
.profile-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 18px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-metrics div { padding: 14px 6px; text-align: center; }
.profile-metrics div + div { border-left: 1px solid var(--line); }
.profile-metrics strong { display: block; font-size: 16px; }
.profile-metrics span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.profile-menu { border-top: 8px solid var(--soft); border-bottom: 8px solid var(--soft); }
.profile-menu > button {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 18px;
  gap: 11px;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.profile-menu > button:last-child { border-bottom: 0; }
.menu-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; background: #f1efec; }
.menu-icon svg { width: 18px; }
.profile-menu strong { display: block; font-size: 12px; }
.profile-menu small { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu > button > svg { width: 16px; color: #aaa; }
.demo-note { margin: 18px; color: #aaa; font-size: 9px; text-align: center; }

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 40;
  width: min(100%, 430px);
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(14px);
}
.bottom-nav > button {
  min-width: 0;
  height: var(--nav-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #818181;
}
.bottom-nav > button > span { position: relative; width: 30px; height: 26px; display: grid; place-items: center; }
.bottom-nav svg { width: 22px; height: 22px; }
.bottom-nav small { font-size: 9px; }
.bottom-nav button.active { color: var(--red); }
.bottom-nav b {
  position: absolute;
  top: -5px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid white;
  border-radius: 9px;
  color: white;
  background: var(--red);
  font-size: 8px;
}

.detail-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: calc(64px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) 40px;
  align-items: end;
  gap: 8px;
  padding: env(safe-area-inset-top) 10px 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(14px);
}
.detail-header > div { align-self: center; min-width: 0; text-align: center; }
.detail-header h1 { margin: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.detail-header span { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.detail-body { min-height: calc(100dvh - 64px); padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.detail-hero { padding: 24px 18px 20px; color: white; background: #1a1a1a; }
.detail-hero .eyebrow { color: #ef9ba9; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.detail-hero h2 { margin: 9px 0 7px; font-size: 23px; line-height: 1.25; }
.detail-hero p { margin: 0; color: #d0d0d0; font-size: 11px; line-height: 1.55; }
.detail-section { margin-top: 8px; padding: 18px; background: white; }
.detail-section h2 { margin: 0 0 13px; font-size: 14px; }
.detail-section > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-grid div { padding: 13px 5px; text-align: center; }
.metric-grid div + div { border-left: 1px solid var(--line); }
.metric-grid strong { display: block; font-size: 17px; }
.metric-grid span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.detail-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 55px;
  border-bottom: 1px solid var(--line);
}
.detail-row:last-child { border-bottom: 0; }
.detail-row strong { display: block; font-size: 11px; }
.detail-row span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.state-tag { padding: 4px 7px; border-radius: 4px; color: var(--red); background: #f8e9ec; font-size: 8px; font-weight: 700; }
.team-list { display: grid; gap: 10px; }
.team-person { display: flex; align-items: center; gap: 10px; }
.team-person i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: white; background: #444; font-style: normal; font-size: 9px; font-weight: 700; }
.team-person span { font-size: 10px; }
.insight-points { margin: 0; padding: 0; list-style: none; }
.insight-points li { position: relative; padding: 11px 0 11px 20px; border-bottom: 1px solid var(--line); font-size: 11px; line-height: 1.5; }
.insight-points li::before { content: ""; position: absolute; top: 17px; left: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.mail-detail-head { padding: 20px 18px; background: white; }
.mail-detail-head h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.3; }
.sender-line { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; }
.sender-line strong { font-size: 11px; }
.sender-line span, .sender-line time { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.mail-body { padding: 20px 18px; color: #333; background: white; font-size: 12px; line-height: 1.65; white-space: pre-line; }
.attachment { display: flex; align-items: center; gap: 10px; margin: 0 18px 18px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.attachment svg { color: var(--red); }
.attachment strong { display: block; font-size: 10px; }
.attachment span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 18px; background: white; }
.detail-actions button { height: 40px; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; font-weight: 600; }
.detail-actions button.primary { border-color: var(--red); color: white; background: var(--red); }
.info-list { background: white; }
.info-row { min-height: 54px; display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 12px; align-items: center; padding: 8px 18px; border-bottom: 1px solid var(--line); }
.info-row span { color: var(--muted); font-size: 10px; }
.info-row strong, .info-row a { overflow-wrap: anywhere; color: var(--ink); font-size: 11px; font-weight: 500; text-align: right; text-decoration: none; }
.office-detail-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.office-address { padding: 18px; background: white; }
.office-address h2 { margin: 0 0 8px; font-size: 17px; }
.office-address p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.office-address a { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--red); font-size: 11px; font-weight: 600; text-decoration: none; }

.sheet-layer { position: fixed; inset: 0; z-index: 100; }
.sheet-layer[hidden] { display: none; }
.sheet-mask { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(0,0,0,.42); }
.action-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 430px);
  max-height: 82dvh;
  margin: 0 auto;
  overflow-y: auto;
  padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  border-radius: 8px 8px 0 0;
  background: white;
  animation: sheet-up .2s ease;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-handle { width: 34px; height: 4px; margin: 2px auto 15px; border-radius: 2px; background: #ccc; }
.sheet-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-title h2 { margin: 0; font-size: 17px; }
.sheet-title button { width: 34px; height: 34px; display: grid; place-items: center; }
.compose-form label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.compose-form input, .compose-form textarea { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 5px; outline: 0; color: var(--ink); background: #fafafa; font-size: 12px; text-transform: none; }
.compose-form textarea { min-height: 110px; resize: none; }
.compose-form input:focus, .compose-form textarea:focus { border-color: var(--red); }
.submit-button { width: 100%; height: 42px; border-radius: 5px; color: white; background: var(--red); font-size: 12px; font-weight: 700; }
.tool-sheet-list button { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.tool-sheet-list button svg { width: 19px; color: var(--red); }
.tool-sheet-list strong { display: block; font-size: 12px; }
.tool-sheet-list span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.toast { position: fixed; left: 50%; bottom: 88px; z-index: 120; max-width: calc(100% - 36px); padding: 9px 13px; transform: translate(-50%, 12px); border-radius: 5px; color: white; background: rgba(21,21,21,.92); font-size: 10px; opacity: 0; pointer-events: none; transition: .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100dvh - 48px); border-radius: 8px; box-shadow: 0 20px 60px rgba(23,23,23,.14); }
  .page { min-height: calc(100dvh - 48px); }
  .bottom-nav { bottom: 24px; border-radius: 0 0 8px 8px; }
}

@media (max-width: 350px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 14px 8px; }
  .segment-control.compact { width: 190px; }
  .mail-toolbar > span { display: none; }
}
