/* iOS type hierarchy, checked against Apple HIG on 2026-10-08.
   https://developer.apple.com/design/human-interface-guidelines/typography
   https://webkit.org/blog/3709/using-the-system-font-in-web-content/
   HIG point sizes are mapped to CSS px at the default scale, not CSS pt.
   Use the installed system font; do not bundle SF font binaries.
   One rem is the 17px Body style. Safari can use its preferred Body size. */
html:not(.desktop) { font-size: 106.25%; }
@supports (font: -apple-system-body) {
  html:not(.desktop) { font: -apple-system-body; }
}
html:not(.desktop), html:not(.desktop):has(.step) {
  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --rounded: var(--font);
  --type-large: 2rem; /* 34/41 */
  --type-title: 1.647059rem; /* 28/34 */
  --type-title2: 1.294118rem; /* 22/28 */
  --type-title3: 1.176471rem; /* 20/25 */
  --type-body: 1rem; /* 17/22 */
  --type-callout: .941176rem; /* 16/21 */
  --type-subhead: .882353rem; /* 15/20 */
  --type-footnote: .764706rem; /* 13/18 */
  --type-caption: .705882rem; /* 12/16 */
  --type-caption2: .647059rem; /* 11/13 */
}
html:not(.desktop) body {
  font: 400 var(--type-body)/1.294118 var(--font);
  font-kerning: normal; font-optical-sizing: auto;
}
html:not(.desktop) :is(button, input, select, textarea) { font-family: var(--font); }
html:not(.desktop) :is(.large-title, .msg-header h1) {
  font: 700 var(--type-large)/1.205882 var(--font); letter-spacing: normal;
}
html:not(.desktop) :is(.title, .step-head h1, .welcome-text h1) {
  font: 700 var(--type-title)/1.214286 var(--font); letter-spacing: normal;
}
html:not(.desktop) .title2 { font: 600 var(--type-title2)/1.272727 var(--font); }
html:not(.desktop) :is(.headline, .slot-title, .page-title, .dialog-title, .sheet-nav > .headline) {
  font: 600 var(--type-body)/1.294118 var(--font); letter-spacing: normal;
}
html:not(.desktop) :is(.sub, .conv-sub, .bio, .step-head .sub) {
  font-size: var(--type-subhead); line-height: 1.333333; font-weight: 400;
}
html:not(.desktop) :is(.caption, .slot-sub, .section-label, .list-footer, .step .step-footer, .hint-line, .welcome .legal, .rules-legal) {
  font-size: var(--type-footnote); line-height: 1.384615; font-weight: 400;
}
html:not(.desktop) :is(.caption.strong, .section-label) { font-weight: 600; }
html:not(.desktop) .list-header {
  font: 600 var(--type-subhead)/1.333333 var(--font);
}
html:not(.desktop) :is(.conv-title, .dm-text, .list-row, .row-value, .row-select, .search-field input, .dm-field, .form-row input, .form-row textarea, .nav-text) {
  font-size: var(--type-body); line-height: 1.294118;
}
html:not(.desktop) .conv-title { font-weight: 400; }
html:not(.desktop) .conv-title.unread { font-weight: 600; }
html:not(.desktop) .conv-sub.unread { font-weight: 500; }
html:not(.desktop) :is(.btn, .step .btn) {
  font-size: var(--type-body); line-height: 1.294118; font-weight: 600;
  height: auto; min-height: 54px; padding-block: 14px; white-space: normal;
}
html:not(.desktop) .btn.medium { min-height: 44px; padding-block: 10px; }
html:not(.desktop) .btn.small { min-height: 34px; padding-block: 7px; font-size: var(--type-subhead); }
html:not(.desktop) :is(.chip, .composition, .text-btn, .cam-chip) {
  font-size: var(--type-subhead); line-height: 1.333333; font-weight: 600;
}
html:not(.desktop) :is(.composition, .chip) { height: auto; min-height: 34px; padding-block: 8px; }
html:not(.desktop) .composition { min-height: 46px; }
html:not(.desktop) :is(.pick-name, .tile-label, .active-person, .dialog-message) {
  font-size: var(--type-footnote); line-height: 1.384615;
}
html:not(.desktop) :is(.pick-note, .meta, .counter, .plus-badge, .tab-badge) {
  font-size: var(--type-caption2); line-height: 1.181818;
}
/* Navigation labels remain stable when content text grows, per HIG. */
html:not(.desktop) .tab-label { font: 500 11px/13px var(--font); letter-spacing: normal; }
html:not(.desktop) .lens-row .tab-label { font-weight: 500; }
html:not(.desktop) .live-pill { font-size: var(--type-caption); line-height: 1.333333; }
html:not(.desktop) .live-pill b { font: 600 var(--type-footnote)/1.384615 var(--font); }
html:not(.desktop) .step :is(.big-field, .name-field, .date-wheel select) {
  font-size: var(--type-body); line-height: 1.294118; font-weight: 400;
}
html:not(.desktop) .step :is(.gender-options .headline, .perm-row .headline, .rule .headline) {
  font-size: var(--type-body); line-height: 1.294118; font-weight: 600;
}
html:not(.desktop) .step :is(.rule .sub, .check-row, .terms-toggle) {
  font-size: var(--type-subhead); line-height: 1.333333;
}
html:not(.desktop) .step .code-boxes .box {
  font: 600 var(--type-title2)/1.272727 var(--font); font-variant-numeric: tabular-nums;
}
/* Growing text needs space rather than clipped labels or unreachable controls. */
html:not(.desktop) .home { overflow-y: auto; }
html:not(.desktop) .home > * { flex-shrink: 0; }
html:not(.desktop) .home > .hero { flex: 1 0 220px; }
html:not(.desktop) .sheet-nav { height: auto; min-height: 60px; padding-block: 10px; }
html:not(.desktop) .sheet-nav.text-buttons { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
html:not(.desktop) .nav-text { white-space: normal; }
html:not(.desktop) .slot-content { min-width: 0; overflow-wrap: anywhere; }
html:not(.desktop) .step :is(.choice .grow, .perm-row > div:last-child, .rule > div:last-child) { min-width: 0; }
