/* The supplied desktop collection uses quiet, flat preference surfaces.
   Keep the existing forms, live statuses and native dialog focus behavior. */
.settings-page { width:100%; max-width:none; }
.settings-page .settings-layout {
  grid-template-columns:220px minmax(0,1fr);
  align-items:stretch;
  gap:12px;
}
.settings-page .settings-nav {
  position:sticky;
  top:80px;
  align-self:start;
  min-height:550px;
  padding:14px 8px;
  gap:4px;
  border:1px solid var(--border);
  border-radius:7px;
  background:var(--paper);
}
.settings-page .settings-nav-caption,
.settings-page .settings-nav-button small,
.settings-page .settings-chevron { display:none; }
.settings-page .settings-nav-button {
  position:relative;
  min-height:44px;
  gap:12px;
  padding:10px 12px;
  border:0;
  border-radius:5px;
  color:var(--ink);
  box-shadow:none;
}
.settings-page .settings-nav-button > span { font-size:13px; font-weight:450; line-height:1.4; }
.settings-page .settings-nav-button > .icon { width:18px; height:18px; }
.settings-page .settings-nav-button[aria-current] { background:var(--surface-hover); }
.settings-page .settings-nav-button[aria-current]::before {
  content:"";
  position:absolute;
  left:-8px;
  top:4px;
  bottom:4px;
  width:3px;
  border-radius:0 3px 3px 0;
  background:var(--yellow);
}
.settings-page .settings-card {
  min-height:550px;
  padding:24px;
  border-radius:7px;
  background:var(--paper);
}
.settings-page .settings-card h2 { margin:0 0 5px; font-size:23px; line-height:1.3; letter-spacing:-.5px; font-weight:650; }
.settings-page .settings-description { max-width:none; margin:0 0 20px; font-size:13px; line-height:1.6; }
.settings-page label:not(.checkbox-label) { margin:18px 0 7px; font-size:12px; font-weight:500; line-height:1.5; }
.settings-page :is(input:not([type="checkbox"]):not([type="range"]),select) {
  height:40px;
  min-height:40px;
  border-color:var(--border);
  border-radius:5px;
  padding:8px 12px;
  font-size:13px;
  background:var(--control);
}
html[data-theme="dark"] .settings-page :is(input,select) { border-color:var(--border); }
.settings-page .form-note { margin-top:11px; font-size:12px; line-height:1.6; color:var(--muted); }
.settings-page .settings-actions {
  position:sticky;
  bottom:0;
  z-index:6;
  margin:0;
  padding:14px 20px;
  gap:16px;
  border-top:0;
  border-radius:0 0 7px 7px;
  background:var(--paper);
  box-shadow:none;
}
.settings-page #settings-form:has(> .settings-actions:not([hidden])) .settings-card:not([hidden]) { border-radius:7px 7px 0 0; }
.settings-page .settings-actions .form-note { font-size:12px; font-weight:400; }
.settings-page .settings-save-help { max-width:54ch; font-size:11px; line-height:1.5; }
.settings-page .settings-action-buttons { gap:8px; }
.settings-page .settings-action-buttons .button { min-height:40px; border-radius:5px; font-size:12px; padding:8px 16px; }
.settings-page :is(button,input,select):focus-visible { outline:2px solid var(--focus,var(--yellow)); outline-offset:3px; }

/* Appearance cards put the choice above its preview, as in the references. */
.settings-page .theme-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:18px 0 14px; }
.settings-page .theme-options > button {
  min-width:0;
  padding:16px;
  gap:16px;
  border:1px solid var(--border);
  border-radius:7px;
  background:var(--control);
  color:var(--ink);
  box-shadow:none;
}
.settings-page .theme-options > button[aria-pressed="true"] { border-color:var(--yellow); background:var(--page); color:var(--ink); box-shadow:inset 0 0 0 1px var(--yellow); }
.settings-page .theme-choice-label { order:-1; padding:0; gap:10px; font-size:16px; font-weight:600; }
.settings-page .theme-choice-description { order:-1; align-self:stretch; margin:-10px 0 0 37px; color:var(--muted); font-size:11px; font-weight:400; line-height:1.5; text-align:left; }
.settings-page .theme-check { order:-1; margin-left:0; margin-right:2px; width:25px; height:25px; border-color:var(--muted); flex:0 0 25px; }
.settings-page .theme-choice-label > .icon { display:none; }
.settings-page [aria-pressed="true"] .theme-check { background:var(--yellow); color:#20271b; border-color:var(--yellow); }
.settings-page .theme-preview { height:150px; padding:18px 12px; gap:14px; border-radius:5px; overflow:hidden; }
.settings-page .theme-preview .preview-sidebar { width:30%; padding-top:20px; }
.settings-page .theme-preview .preview-content { padding-top:19px; }
.settings-page .theme-preview:has(.preview-brand) { position:relative; padding-top:32px; gap:0; }
.settings-page .theme-preview .preview-brand { position:absolute; left:10px; top:9px; display:flex; align-items:center; gap:4px; height:15px; color:#263124; font-size:10px; font-weight:750; letter-spacing:-.4px; }
.settings-page .theme-preview .preview-brand .icon { width:12px; height:12px; }
.settings-page .theme-preview .preview-brand img { display:block; max-width:60px; width:60px; height:auto; }
.settings-page .theme-preview .preview-nav { display:grid; gap:8px; min-width:0; font-size:7px; line-height:1.3; text-align:left; }
.settings-page .theme-preview .preview-nav span { display:block; padding:2px 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.settings-page .theme-preview .preview-nav span:first-child { background:#f7edaa; border-left:2px solid #e8d860; border-radius:2px; }
.settings-page .theme-preview:has(.preview-brand) .preview-sidebar { width:35%; padding:8px 6px 0 0; border-right:1px solid #e0e4da; }
.settings-page .theme-preview:has(.preview-brand) .preview-content { flex:1; min-width:0; padding:8px 0 0 10px; }
.settings-page .theme-preview .preview-title { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; color:#263124; font-size:13px; font-weight:650; text-align:left; letter-spacing:-.3px; }
.settings-page .theme-preview .preview-title b { display:grid; place-items:center; width:18px; height:18px; border-radius:3px; background:#f3e580; color:#263124; font-size:15px; font-weight:450; }
.settings-page .theme-preview .preview-task { display:flex; align-items:center; gap:7px; padding:7px 0; border-bottom:1px solid #e0e4da; }
.settings-page .theme-preview .preview-task::before { content:""; flex:0 0 11px; height:11px; border:1px solid #aab2a4; border-radius:50%; }
.settings-page .theme-preview .preview-task span { width:68%; height:4px; border-radius:3px; background:#dce1d7; }
.settings-page .theme-preview-light { color:#44503c; }
.settings-page .theme-preview-dark { background:#151c16; border-color:#34402f; color:#e2e8da; }
.settings-page .theme-preview-dark :is(.preview-brand,.preview-title) { color:#edf1e6; }
.settings-page .theme-preview-dark .preview-nav span:first-child { background:#303c28; border-color:#f1e480; }
.settings-page .theme-preview-dark:has(.preview-brand) .preview-sidebar,
.settings-page .theme-preview-dark .preview-task { border-color:#34402f; }
.settings-page .theme-preview-dark .preview-task span { background:#394234; }
.settings-page #appearance-status { padding:11px 13px; border:1px solid var(--border); border-radius:5px; background:var(--control); }

/* Time zones, lists, sound and data use the same field and row rhythm. */
.settings-page .timezone-chips { display:grid; gap:0; margin-top:16px; border:1px solid var(--border); border-radius:5px; overflow:hidden; }
.settings-page .timezone-chips:empty { display:none; }
.settings-page .timezone-chip { display:flex; justify-content:space-between; width:100%; max-width:none; min-height:48px; margin:0; padding:4px 12px; border:0; border-bottom:1px solid var(--border); border-radius:0; background:var(--control); font-size:13px; }
.settings-page .timezone-chip:last-child { border-bottom:0; }
.settings-page .timezone-chip button { color:var(--red); }
.settings-page .custom-list-row { min-height:62px; padding:10px 0; gap:10px; }
.settings-page .list-settings-name { font-size:13px; }
.settings-page .custom-list-row .button { min-height:36px; border-radius:5px; font-size:12px; }
.settings-page .list-color-field { min-width:118px; }
.settings-page .list-color-field label { font-size:11px; margin:0 0 3px; }
.settings-page .list-color-field select { min-height:36px; height:36px; font-size:12px; padding:5px 8px; }
.settings-page .settings-info { margin-top:18px; padding:18px 0; border:0; border-top:1px solid var(--border); border-radius:0; background:transparent; color:var(--ink); }
html[data-theme="dark"] .settings-page .settings-info { background:transparent; border-color:var(--border); }
.settings-page .settings-info h3 { margin:0 0 6px; font-size:15px; line-height:1.4; }
.settings-page .settings-info p { margin-top:5px; font-size:12px; line-height:1.6; color:var(--muted); }
.settings-page .settings-info .button { margin-top:12px; min-height:40px; font-size:12px; }
.settings-page .data-tools { display:flex; flex-wrap:wrap; gap:8px; }
.settings-page .sound-choice { gap:10px; }
.settings-page .sound-choice .button { min-height:40px; }
.settings-page #settings-volume { height:30px; min-height:30px; accent-color:var(--yellow); }
.settings-page .quiet-weekdays { margin:18px 0 10px; gap:6px; }
.settings-page .quiet-weekdays legend { font-size:12px; }
.settings-page .quiet-weekdays label { min-height:36px; padding:5px 9px; margin:0; border-radius:5px; font-size:12px; }
.settings-page .quiet-weekdays input { accent-color:var(--yellow); }
.settings-page .quiet-weekdays label:has(input:checked) { border-color:var(--yellow); }
.settings-page .checkbox-label { font-size:13px; line-height:1.5; gap:9px; }
.settings-page #settings-panel-time { padding:24px 24px 0; }
.settings-page .time-settings-group { padding:16px; margin-top:12px; border:1px solid var(--border); border-radius:6px; background:var(--control); }
.settings-page .time-settings-group h3 { margin-bottom:6px; font-size:15px; font-weight:600; }
.settings-page .time-settings-group .form-note { margin-top:5px; }
.settings-page .time-settings-grid { gap:12px; }
.settings-page .time-presets { gap:8px; margin:14px 0; }
.settings-page .time-preset { padding:3px; border-radius:5px; background:var(--paper); }
.settings-page .time-preset:has([aria-pressed="true"]) { border-color:var(--yellow); }
.settings-page .time-preset [aria-pressed="true"] { color:var(--yellow); }
.settings-page .time-days { gap:6px; }
.settings-page .time-days label { min-height:36px; margin:0; padding:5px 9px; border-radius:5px; font-size:12px; }
.settings-page .time-days label:has(input:checked) { background:var(--surface-hover); border-color:var(--yellow); }
.settings-page #settings-panel-time .time-settings-actions { margin-top:20px; padding:14px 0; gap:12px; }
.settings-page #settings-panel-time .time-settings-buttons button { min-height:40px; font-size:12px; border-radius:5px; }

/* The original dialogs remain modal; only their visual treatment changes. */
.modal,
html[data-theme="dark"] .modal { border-color:var(--border); border-radius:8px; background:var(--paper); box-shadow:0 18px 70px #0005; }
.modal::backdrop,
html[data-theme="dark"] .modal::backdrop { background:#080d09a6; backdrop-filter:blur(1px); }
.editor-dialog.modal { --editor-control-border:var(--border); width:620px; border-radius:8px; }
html[data-theme="dark"] .editor-dialog.modal { --editor-control-border:var(--border); }
.editor-dialog.modal .modal-heading { padding:18px 22px 10px; border-bottom:0; }
.editor-dialog.modal .modal-heading h2 { font-size:24px; line-height:1.3; letter-spacing:-.5px; }
.editor-dialog.modal .modal-body { padding:8px 22px 20px; }
.editor-dialog.modal .modal-body label:not(.checkbox-label) { margin:14px 0 6px; color:var(--ink); font-size:12px; font-weight:450; }
.editor-dialog.modal .modal-body > label:first-child { margin-top:0; }
.editor-dialog.modal .form-grid { gap:12px; }
.editor-dialog.modal .modal-body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea) { border-radius:5px; font-size:13px; line-height:1.5; }
.editor-dialog.modal .modal-body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select) { height:42px; min-height:42px; padding:8px 11px; }
.editor-dialog.modal .modal-body textarea { min-height:78px; padding:9px 11px; }
.editor-dialog.modal .form-note { margin-top:8px; font-size:12px; line-height:1.55; }
.editor-dialog.modal .world-times { font-size:11px; }
.editor-dialog.modal .preset-row { gap:6px; margin-top:12px; }
.editor-dialog.modal .preset-row button { min-height:34px; padding:5px 9px; font-size:11px; border-radius:5px; }
.editor-dialog.modal .editor-advanced { margin-top:18px; border:0; border-top:1px solid var(--border); border-radius:0; background:transparent; }
.editor-dialog.modal .editor-advanced > summary { min-height:52px; padding:12px 32px 12px 0; border-radius:0; }
.editor-dialog.modal .editor-advanced > summary > span:first-child { color:var(--ink); font-size:13px; font-weight:550; }
.editor-dialog.modal .editor-options-summary { font-size:11px; }
.editor-dialog.modal .editor-advanced > summary::after { right:4px; }
.editor-dialog.modal .editor-advanced-body { padding:0 0 12px; }
.editor-dialog.modal .sound-choice .button { min-height:42px; font-size:12px; }
.editor-dialog.modal .checkbox-label { min-height:36px; font-size:12px; }
.editor-dialog.modal .editor-privacy-note { padding:16px; border-radius:6px; background:var(--control); }
.editor-dialog.modal .modal-footer { padding:14px 22px; gap:10px; }
.editor-dialog.modal .modal-footer .button { min-height:42px; padding:8px 16px; border-radius:5px; font-size:12px; }
#list-dialog.editor-dialog { width:520px; }

.account-modal { width:760px; padding:24px; }
.account-modal .modal-heading { margin-bottom:12px; align-items:center; }
.account-modal .modal-heading h2 { margin:0; font-size:27px; font-weight:650; letter-spacing:-.7px; }
.account-modal .modal-heading .eyebrow { display:none; }
.account-modal .account-intro { max-width:60ch; color:var(--muted); font-size:13px; }
.account-modal #signed-in-account > :is(form,section),
.account-modal .account-plan-summary { margin-top:14px; padding:16px; border:1px solid var(--border); border-radius:6px; background:var(--control); }
.account-modal .signed-in-email { margin:16px 0 0; font-size:13px; }
.account-modal label:not(.checkbox-label) { color:var(--ink); font-size:12px; }
.account-modal :is(input:not([type="checkbox"]),select) { border-color:var(--border); border-radius:5px; font-size:14px; background:var(--control); color:var(--ink); }
.account-modal .account-actions { gap:8px; margin:12px 0; }
.account-modal .button { min-height:40px; font-size:12px; border-radius:5px; }
.account-modal .form-note { font-size:12px; line-height:1.6; color:var(--muted); }
.account-modal #account-sync-status { margin-top:16px; padding:12px 14px; border:1px solid var(--border); border-radius:5px; background:var(--control); color:var(--ink); }
.account-modal #mobile-device-status h3 { margin:0 0 6px; font-size:14px; }
.account-modal .mobile-device-results { list-style:none; margin:12px 0 0; padding:0; }
.account-modal .mobile-device-results li + li { margin-top:12px; padding-top:12px; border-top:1px solid var(--border); }
.account-modal .mobile-device-results h4 { margin:0 0 4px; font-size:13px; }
.account-modal .mobile-device-results p,.account-modal .mobile-device-results dl { margin:0; font-size:12px; line-height:1.6; }
.account-modal .mobile-device-results dl { margin-top:6px; }
.account-modal .mobile-device-results dl > div { display:grid; grid-template-columns:52px minmax(0,1fr); gap:8px; }
.account-modal .mobile-device-results dt { color:var(--muted); }
.account-modal .mobile-device-results dd { margin:0; overflow-wrap:anywhere; }
.account-modal #delete-account-panel { margin-top:16px; padding-top:16px; border-top:1px solid var(--border); }
.account-modal #delete-account-panel p { font-size:13px; line-height:1.6; }
.account-modal #sync-conflicts:empty { display:none; }
#sharing-inbox-dialog { width:820px; padding:24px; }
#sharing-inbox-dialog .modal-heading { margin-bottom:18px; align-items:center; }
#sharing-inbox-dialog .modal-heading h2 { font-size:25px; font-weight:650; }
#sharing-inbox .sharing-invitation { margin:12px 0; padding:18px; border:1px solid var(--border); border-radius:6px; background:var(--control); }
#sharing-inbox .sharing-invitation h3 { margin:0 0 5px; font-size:16px; font-weight:600; }
#sharing-inbox .sharing-invitation p { color:var(--muted); font-size:13px; }
#sharing-inbox .sharing-actions { justify-content:flex-end; }
#sharing-inbox .sharing-actions .button { min-height:40px; font-size:12px; border-radius:5px; }
#share-dialog .sharing-member { padding:12px 0; }
#share-dialog .sharing-notice { border-radius:6px; background:var(--control); }

/* Connected recipients stay compact; all sending still uses the existing UI. */
body[data-current-view="pings"] .pings-page { width:100%; max-width:720px; margin:0 auto; }
.pings-page .pings-back { min-height:36px; margin:0 0 12px; font-size:12px; color:var(--muted); }
.pings-page > h2 { margin:0 0 8px; font-size:12px; font-weight:450; color:var(--muted); }
.pings-page .pings-persons { gap:10px; margin:0 0 18px; }
.pings-page .pings-person { flex-direction:row; width:auto; min-width:100px; max-width:100%; min-height:44px; gap:10px; padding:5px 12px 5px 6px; border:1px solid var(--border); border-radius:8px; background:var(--paper); font-size:13px; text-align:left; }
.pings-page .pings-person > span:last-child { min-width:0; overflow-wrap:anywhere; }
.pings-page .pings-person .pings-avatar { width:30px; height:30px; flex:0 0 30px; border:0; font-size:13px; }
.pings-page .pings-person[aria-pressed="true"] { border-color:var(--yellow); box-shadow:inset 0 0 0 1px var(--yellow); background:var(--surface-hover); }
.pings-page .pings-person[aria-pressed="true"] .pings-avatar { outline:0; border:0; }
.pings-page .pings-person[aria-pressed="true"]::after { display:none; }
.pings-page .pings-person.add { border-style:dashed; background:transparent; }
.pings-page .pings-person.add .pings-avatar { font-size:23px; background:transparent; color:var(--ink); }
.pings-composer { padding:20px; border:1px solid var(--border); border-radius:7px; background:var(--paper); }
.pings-composer h2 { margin:0 0 14px; font-size:19px; font-weight:600; letter-spacing:-.3px; }
.pings-page .pings-messages { gap:10px; margin:0 0 16px; }
.pings-page .pings-message { min-height:52px; gap:12px; padding:12px 14px; border-radius:6px; background:var(--control); font-size:13px; }
.pings-page .pings-message > span { font-size:23px; }
.pings-page .pings-message[aria-pressed="true"] { border-color:var(--yellow); color:var(--ink); background:var(--surface-hover); box-shadow:inset 0 0 0 1px var(--yellow); }
.pings-page .pings-preview { margin:0 0 12px; padding:11px 14px; border-radius:5px; font-size:13px; }
.pings-page .pings-send { min-height:42px; border-radius:5px; font-size:13px; }
.pings-page .pings-note { margin:12px 0 0; text-align:left; font-size:11px!important; }
.pings-page .pings-tools { margin-top:12px; padding:0; border:1px solid var(--border); border-radius:7px; background:var(--paper); }
.pings-page .pings-tools > summary { min-height:48px; padding:14px 16px; font-size:13px; font-weight:500; }
.pings-page .pings-tools-inner { padding:16px; border-top:1px solid var(--border); }
.pings-page .pings-tools-inner h2 { margin:0 0 12px; font-size:16px; }
.pings-page .pings-status { margin:8px 0; font-size:12px; }
.pings-page .pings-form { gap:10px; }
.pings-page .pings-form :is(input:not([type="checkbox"]),select) { min-height:40px; border-radius:5px; font-size:13px; }
.pings-page .pings-form .button { min-height:40px; font-size:12px; }
.pings-page .pings-empty { margin:12px 0; padding:22px; border:1px solid var(--border); border-radius:7px; background:var(--paper); }
.pings-page .pings-empty p { font-size:13px; }
.pings-page :is(button,input,select,summary):focus-visible { outline:2px solid var(--focus,var(--yellow)); outline-offset:3px; }

@media(min-width:1200px) {
  .settings-page .time-settings-group:first-of-type .time-settings-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .account-modal #profile-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 16px; align-items:end; }
  .account-modal #profile-form label { grid-column:1; margin:0; }
  .account-modal #profile-form input { grid-column:1; }
  .account-modal #profile-form .button { grid-column:2; grid-row:2; margin:0; }
}
@media(max-width:1100px) {
  .settings-page .settings-layout { grid-template-columns:190px minmax(0,1fr); }
  .settings-page .settings-card { padding:20px; }
  .settings-page .settings-nav-button { padding:9px 10px; gap:9px; }
  .settings-page .settings-actions { align-items:stretch; flex-direction:column; }
  .settings-page .settings-action-buttons { justify-content:flex-end; }
}
@media(max-width:760px) {
  .settings-page .settings-layout { grid-template-columns:minmax(0,1fr); gap:14px; }
  .settings-page .settings-nav { position:static; min-height:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding:8px; gap:5px; }
  .settings-page .settings-nav-button { min-height:48px; padding:8px; gap:7px; }
  .settings-page .settings-nav-button > span { font-size:12px; }
  .settings-page .settings-nav-button[aria-current]::before { left:0; top:7px; bottom:7px; }
  .settings-page .settings-card { min-height:0; padding:20px; }
  .settings-page .settings-actions { padding:14px 16px max(14px,env(safe-area-inset-bottom)); }
  .settings-page :is(input:not([type="checkbox"]):not([type="range"]),select) { min-height:44px; height:44px; font-size:16px; }
  .settings-page .settings-action-buttons .button,
  .settings-page .custom-list-row .button,
  .settings-page .settings-info .button,
  .settings-page .sound-choice .button,
  .settings-page #settings-panel-time .time-settings-buttons button { min-height:44px; }
  .settings-page .list-color-field select { min-height:44px; height:44px; font-size:16px; }
  .settings-page .quiet-weekdays label,
  .settings-page .time-days label { min-height:44px; }
  .settings-page .theme-options > button { padding:12px; gap:12px; }
  .settings-page .theme-preview { height:120px; padding:14px 9px; gap:10px; }
  .settings-page #settings-panel-time { padding:20px 20px 0; }
  .settings-page .time-settings-grid { grid-template-columns:minmax(0,1fr); }
  .pings-page .pings-send,
  .pings-page .pings-form .button { min-height:44px; }
  .pings-page .pings-form :is(input:not([type="checkbox"]),select) { min-height:44px; font-size:16px; }
  .account-modal { padding:20px; }
  .account-modal .button,
  #sharing-inbox .sharing-actions .button { min-height:44px; }
  .account-modal :is(input:not([type="checkbox"]),select) { min-height:44px; font-size:16px; }
}
@media(max-width:560px) {
  .editor-dialog.modal { width:calc(100vw - 16px); max-width:calc(100vw - 16px); border-radius:8px; }
  .editor-dialog.modal .modal-heading { padding:12px 16px 6px; }
  .editor-dialog.modal .modal-heading h2 { font-size:22px; }
  .editor-dialog.modal .modal-body { padding:10px 16px 16px; }
  .editor-dialog.modal .form-grid { grid-template-columns:minmax(0,1fr); gap:0; }
  .editor-dialog.modal .modal-body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea) { font-size:16px; }
  .editor-dialog.modal .modal-body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select) { height:46px; min-height:46px; }
  .editor-dialog.modal .preset-row button,
  .editor-dialog.modal .checkbox-label,
  .editor-dialog.modal .sound-choice .button { min-height:44px; }
  .editor-dialog.modal .modal-footer { padding:12px 16px max(12px,env(safe-area-inset-bottom)); gap:8px; }
  .editor-dialog.modal .modal-footer .button { min-height:44px; padding:8px 10px; font-size:13px; }
  .settings-page .settings-nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .settings-page .settings-card { padding:16px; }
  .settings-page .settings-card h2 { font-size:21px; }
  .settings-page .theme-options { gap:8px; }
  .settings-page .theme-options > button { padding:10px; }
  .settings-page .theme-choice-label { font-size:14px; gap:6px; }
  .settings-page .theme-check { width:20px; height:20px; flex-basis:20px; }
  .settings-page .theme-preview { height:98px; padding:9px 7px; gap:7px; }
  .settings-page .time-settings-group { padding:12px; }
  .settings-page #settings-panel-time { padding:16px 16px 0; }
  .settings-page .settings-action-buttons { width:100%; }
  .settings-page .settings-action-buttons .button { flex:1; min-width:0; padding:8px; font-size:12px; }
  .pings-composer { padding:16px; }
  .pings-page .pings-messages { gap:8px; }
  .pings-page .pings-message { min-height:64px; padding:10px; gap:8px; font-size:12px; }
  .pings-page .pings-message > span { font-size:20px; }
  .account-modal { padding:18px; }
  .account-modal .modal-heading h2 { font-size:24px; }
  #sharing-inbox-dialog { padding:18px; }
  #sharing-inbox-dialog .modal-heading h2 { font-size:23px; }
  #sharing-inbox .sharing-invitation { padding:14px; }
  #sharing-inbox .sharing-actions { justify-content:flex-start; }
}
@media(pointer:coarse) {
  .settings-page .button,
  .settings-page .quiet-weekdays label,
  .settings-page .time-days label,
  .editor-dialog.modal .preset-row button,
  .editor-dialog.modal .checkbox-label,
  .editor-dialog.modal .modal-footer .button,
  .account-modal .button,
  #sharing-inbox .sharing-actions .button,
  .pings-page .pings-send { min-height:44px; }
}

/* Account PIN sign-in stays inside the existing native account dialog. */
#pin-auth-panel { min-width:0; margin:16px 0 0; padding:18px; border:1px solid var(--border); border-radius:6px; background:var(--control); }
#pin-auth-panel[hidden],#pin-settings[hidden] { display:none; }
#pin-auth-panel h3,#pin-settings h3 { margin:0 0 8px; color:var(--ink); font-size:18px; line-height:1.4; }
#pin-auth-panel .pin-account { margin:12px 0; color:var(--ink); font-size:14px; overflow-wrap:anywhere; }
#pin-auth-panel .pin-form { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; margin:16px 0 0; }
#pin-auth-panel .pin-form[hidden] { display:none; }
#pin-auth-panel .pin-form label { margin:0; }
#pin-auth-panel .pin-input { box-sizing:border-box; width:100%; max-width:240px; min-width:0; min-height:48px; margin:0 0 8px; font-size:22px; letter-spacing:.35em; font-variant-numeric:tabular-nums; background:var(--paper); }
#pin-auth-panel .pin-email { box-sizing:border-box; width:100%; min-width:0; min-height:44px; margin:0 0 8px; font-size:16px; background:var(--paper); }
#pin-auth-panel .pin-input[aria-invalid="true"] { border-color:var(--ink); outline:2px solid var(--ink); outline-offset:2px; }
#pin-auth-panel .pin-actions,#pin-settings .pin-actions { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0; }
#pin-auth-panel .pin-actions .button,#pin-settings .pin-actions .button { min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
#pin-auth-panel .pin-lockout { margin:0 0 8px; padding:10px 12px; border:1px solid var(--border); border-radius:5px; color:var(--ink); font-size:13px; line-height:1.5; font-variant-numeric:tabular-nums; }
#pin-auth-panel .form-error:empty,#pin-auth-panel #pin-ui-status:empty { display:none; }
#pin-auth-panel #pin-ui-error { margin:12px 0 0; }
#pin-auth-panel :is(#pin-new-account,#pin-setup-email-recovery) { justify-self:start; min-height:44px; padding:8px 0; }
#pin-settings { margin:20px 0; padding-top:18px; border-top:1px solid var(--border); }
@media(max-width:390px) {
  #pin-auth-panel { padding:14px; }
  #pin-auth-panel .pin-actions .button { flex:1 1 100%; }
}
