/* Canonical mobile-web layer. Shared tokens keep every screen aligned. */
.mobile-page-title,
.mobile-update-screen,
.mobile-message-new-icon,
.chat-back,
.messages-brand { display: none; }
.mobile-profile-more { display: none; }
.mobile-profile-topline { display: none; }
.conversation-now { display: none; }
.mobile-update-screen[hidden] { display: none !important; }

@media (max-width: 700px) {
  :root {
    --m-paper: #f4f1e9;
    --m-surface: #fffefa;
    --m-ink: #171713;
    --m-muted: #89877f;
    --m-line: #e5e2da;
    --m-acid: #b9f447;
    --m-nav: 64px;
    --m-header-height: 64px;
    --m-header-padding-x: 20px;
    --m-header-logo: 34px;
    --m-header-gap: 12px;
    --m-header-action: 32px;
  }

  html, body { background: var(--m-paper); background-image: none; }
  body.mobile-composer-open, body.messages-open { overflow: hidden; }
  .site-shell { width: 100%; min-height: 100dvh; }

  .topbar {
    position: static;
    display: flex;
    align-items: center;
    gap: var(--m-header-gap);
    width: 100%;
    height: var(--m-header-height);
    padding: 10px var(--m-header-padding-x);
    background: var(--m-paper);
    border: 0;
    backdrop-filter: none;
  }
  .brand { flex: 0 0 var(--m-header-logo); width: var(--m-header-logo); height: var(--m-header-logo); border-radius: 8px; }
  .mobile-page-title:not(:empty) {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
    padding: 2px 0;
    color: var(--m-ink);
    font-size: 24px;
    font-weight: 850;
    line-height: 34px;
    letter-spacing: -.7px;
    text-overflow: clip;
    white-space: nowrap;
  }
  .mobile-page-title:empty { display: none; }
  .topnav, .account-actions { margin-left: auto; }
  .page-notifications .topnav, body.mobile-history-page .topnav { display: none; }

  .people-panel, .profile-panel, .notifications-view {
    background: transparent;
    box-shadow: none;
  }
  .people-heading h1 {
    color: var(--m-ink);
    font-family: inherit;
    font-size: 25px;
    font-weight: 850;
    line-height: 31px;
    letter-spacing: -.8px;
    text-transform: none;
  }
  .people-heading h1::after,
  body.mobile-history-page .history-heading h3,
  .page-notifications .notifications-view > .eyebrow,
  .page-notifications .notifications-view > h2,
  .page-notifications .notifications-view > .section-lead { display: none; }
  body.mobile-history-page .profile-panel,
  .page-notifications .notifications-view { padding-top: 8px; }
  body.mobile-history-page .topbar .brand { display: none; }
  .page-notifications .topbar .brand { display: none; }

  .profile-panel .history-heading {
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
  }
  .profile-panel .rewind-launch {
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    padding: 13px;
    border-radius: 18px;
  }
  body.mobile-history-page .history-heading {
    display: block;
    margin: 9px 0 24px;
  }

  .mobile-nav {
    z-index: 90;
    height: calc(var(--m-nav) + env(safe-area-inset-bottom));
    padding: 4px 6px env(safe-area-inset-bottom);
    background: var(--m-paper);
    border-top: 1px solid var(--m-line);
    box-shadow: none;
    backdrop-filter: none;
  }
  .mobile-nav > a, .mobile-nav > button { min-width: 0; color: #929087; }
  .mobile-nav svg { width: 25px; height: 25px; }
  .mobile-nav > a > span:last-child,
  .mobile-nav > button > span:last-child { margin-top: 1px; font-size: 10px; font-weight: 750; line-height: 12px; }
  .mobile-compose {
    align-self: center;
    width: 44px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    color: #fff;
    background: var(--m-ink);
    border-radius: 14px;
  }
  .mobile-compose::before, .mobile-compose::after { background: #fff; }
  .mobile-right-now.active, .mobile-notifications.active, .mobile-messages.active,
  .mobile-profile.active, body.messages-open .mobile-messages,
  body.mobile-history-page .mobile-profile { color: var(--m-ink); }

  /* Full-page Update NOW, kept above the still-available mobile tab bar. */
  .mobile-update-screen {
    position: fixed;
    z-index: 80;
    top: var(--mobile-viewport-top, 0px);
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: min(100%, 520px);
    height: calc(var(--mobile-viewport-height, 100dvh) - var(--m-nav) - env(safe-area-inset-bottom));
    margin: 0 auto;
    overflow: hidden;
    color: var(--m-ink);
    background: var(--m-paper);
  }
  .mobile-update-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 58px;
    padding: 0 18px;
    border-bottom: 1px solid var(--m-line);
  }
  .mobile-update-header h2 { margin: 0; font-size: 16px; font-weight: 800; }
  .mobile-update-cancel {
    justify-self: start;
    padding: 8px 0;
    color: var(--m-muted);
    background: none;
    border: 0;
    font: inherit;
  }
  .mobile-update-header-submit {
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--m-acid);
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
  }
  .mobile-update-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    padding: 22px 20px 14px;
  }
  #mobileUpdateText {
    flex: 1 1 auto;
    width: 100%;
    min-height: 120px;
    padding: 0;
    resize: none;
    color: var(--m-ink);
    background: transparent;
    border: 0;
    outline: 0;
    font: 700 22px/1.42 inherit;
    letter-spacing: -.3px;
  }
  #mobileUpdateText::placeholder { color: #a09e96; }
  .mobile-status-image-preview { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-top: 12px; }
  .mobile-status-image-preview[hidden] { display: none; }
  .mobile-status-image-preview > div { position: relative; height: 116px; overflow: hidden; border-radius: 13px; background: #edf3ef; }
  .mobile-status-image-preview > div:only-child { grid-column: 1 / -1; height: min(250px, 34vh); }
  .mobile-status-image-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .mobile-status-image-preview button {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 25px;
    height: 25px;
    padding: 0;
    color: #fff;
    background: var(--m-ink);
    border: 2px solid #fff;
    border-radius: 50%;
  }
  .mobile-status-image-name { display: none; }
  .mobile-feeling-picker {
    display: block;
    flex: 0 0 auto;
    padding: 10px 0 0;
    background: transparent;
    border: 0;
  }
  .mobile-feeling-picker[hidden] { display: none !important; }
  .mobile-feeling-picker > div {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding-bottom: 2px;
  }
  .mobile-feeling-picker > div::-webkit-scrollbar { display: none; }
  .mobile-feeling-picker > div button {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 51px;
    padding: 5px 3px 4px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 20px;
  }
  .mobile-feeling-picker button small {
    display: block;
    max-width: 100%;
    margin-top: 2px;
    overflow: hidden;
    color: var(--m-muted);
    font-size: 9px;
    font-weight: 700;
    line-height: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-feeling-picker button.selected { background: var(--m-surface); border-color: #d4d0c6; }
  .mobile-update-tools {
    display: flex;
    align-items: center;
    flex: 0 0 58px;
    gap: 8px;
    padding: 7px 14px;
    background: var(--m-surface);
    border-top: 1px solid var(--m-line);
  }
  .mobile-update-tools > button, .mobile-update-tools > label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    color: var(--m-ink);
    background: transparent;
    border: 0;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
  }
  .mobile-character-count { margin-left: auto; color: var(--m-muted); font-size: 11px; font-weight: 700; }
  .mobile-update-tool svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .mobile-update-tool > span:not(#mobileFeelingEmoji) { display: none; }
  .mobile-feeling-trigger #mobileFeelingEmoji { font-size: 21px; line-height: 1; }
  .mobile-update-tools .mobile-update-submit {
    width: auto;
    min-width: 62px;
    margin-left: 0;
    padding: 0 16px;
    color: var(--m-ink);
    background: var(--m-acid);
    font-size: 13px;
    font-weight: 850;
  }

  /* Dedicated Messages page. Inbox stays mounted behind the conversation. */
  .messages-drawer {
    position: fixed;
    z-index: 80;
    top: var(--mobile-viewport-top, 0px);
    right: 0;
    bottom: auto;
    left: 0;
    width: min(100%, 520px);
    height: calc(var(--mobile-viewport-height, 100dvh) - var(--m-nav) - env(safe-area-inset-bottom));
    max-width: none;
    max-height: none;
    margin: 0 auto;
    overflow: hidden;
    background: var(--m-paper);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    transition: opacity .12s ease, visibility .12s ease;
  }
  .messages-drawer.open { opacity: 1; visibility: visible; transform: none; }
  .messages-drawer-header {
    display: flex;
    align-items: center;
    flex: 0 0 var(--m-header-height);
    height: var(--m-header-height);
    padding: 10px var(--m-header-padding-x);
    background: var(--m-paper);
    border: 0;
    border-bottom: 1px solid var(--m-line);
  }
  .messages-heading-identity { display: flex; align-items: center; min-width: 0; gap: var(--m-header-gap); }
  .messages-brand {
    position: relative;
    display: block;
    flex: 0 0 var(--m-header-logo);
    width: var(--m-header-logo);
    height: var(--m-header-logo);
    overflow: hidden;
    border-radius: 8px;
  }
  .messages-brand img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 164%;
    height: 164%;
    max-width: none;
    transform: translate(-50%, -50%);
  }
  .messages-drawer-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 850;
    line-height: 30px;
    letter-spacing: -.7px;
  }
  .messages-close-action { display: none; }
  .message-new-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--m-header-action);
    height: var(--m-header-action);
    margin-left: auto;
    padding: 0;
    color: #fff;
    background: var(--m-ink);
    border: 0;
    border-radius: 50%;
  }
  .message-new-action svg { width: 17px; height: 17px; stroke-width: 2.1; }
  .desktop-message-new-icon { display: none; }
  .mobile-message-new-icon { display: block; }
  .messages-heading-identity .messages-brand { display: none !important; }
  .messages-heading-identity { gap: 0; }
  .message-new-action { color: #fff !important; }
  .message-new-action svg {
    stroke: #fff !important;
    stroke-width: 2.4;
  }
  .messages-layout { position: relative; display: block; flex: 1 1 auto; min-height: 0; overflow: hidden; }
  .conversation-list-pane {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    background: var(--m-paper);
    border: 0;
    opacity: 1;
  }
  .message-search { display: none; }
  .conversation-list {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 20px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .conversation-list::-webkit-scrollbar, .message-stream::-webkit-scrollbar { display: none; }
  .conversation-row {
    min-height: 76px;
    padding: 12px 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--m-line);
    border-radius: 0;
    box-shadow: none;
  }
  .conversation-row:hover, .conversation-row.active { background: transparent; transform: none; }
  .conversation-row .avatar, .conversation-row .avatar-fallback {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
  }
  .conversation-copy strong { font-size: 14px; line-height: 19px; }
  .conversation-username { display: none; }
  .conversation-now {
    display: block;
    max-width: 100%;
    margin-top: 4px;
    overflow: hidden;
    color: #77766f;
    font-size: 10px;
    font-style: normal;
    line-height: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .conversation-now b { color: #6f9227; font-weight: 800; }
  .conversation-copy em { margin-top: 4px; font-size: 12px; line-height: 16px; }
  .conversation-time { color: #99978f; font-size: 11px; }

  .chat-pane {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    background: var(--m-paper);
    border: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: none;
    transition: opacity .1s ease, visibility .1s ease;
  }
  .messages-drawer.chat-selected .chat-pane {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  .messages-drawer.chat-selected > .messages-drawer-header,
  .messages-drawer.chat-selected > .messages-new {
    display: none;
  }
  .messages-drawer.chat-selected .conversation-pane { opacity: 1; pointer-events: none; }
  .chat-header {
    display: flex;
    align-items: center;
    flex: 0 0 var(--m-header-height);
    min-height: var(--m-header-height);
    gap: 9px;
    padding: 8px 14px;
    background: var(--m-paper);
    border-bottom: 1px solid var(--m-line);
  }
  .chat-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    color: var(--m-ink);
    background: #e5e2da;
    border: 0;
    border-radius: 50%;
  }
  .chat-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
  .chat-contact-copy { min-width: 0; }
  .chat-contact-avatar, .chat-contact-avatar .avatar, .chat-contact-avatar .avatar-fallback {
    width: 35px;
    height: 35px;
    min-width: 35px;
    border-radius: 11px;
  }
  .chat-contact-copy strong { font-size: 14px; line-height: 18px; }
  .chat-contact-copy small, .chat-profile-action { display: none; }
  .chat-header-actions { gap: 5px; margin-left: auto; }
  .call-action { width: 34px; height: 34px; padding: 8px; background: transparent; border: 0; }
  .call-action svg { width: 18px; height: 18px; }
  .message-stream {
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px 16px 12px;
    background: var(--m-paper);
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .message-bubble-row { width: fit-content; }
  .message-bubble {
    width: auto;
    max-width: 100%;
    min-width: 0;
    padding: 9px 12px;
    background: #eae8e1;
    border: 0;
    border-radius: 16px;
    box-shadow: none;
    font-size: 14px;
    line-height: 20px;
  }
  .message-body { word-break: normal; }
  .message-bubble.own { background: #dfff8c; }
  .message-composer {
    display: flex;
    align-items: flex-end;
    flex: 0 0 auto;
    gap: 7px;
    width: 100%;
    margin: 0;
    padding: 7px 14px calc(5px + env(safe-area-inset-bottom));
    background: var(--m-paper);
    border-top: 1px solid var(--m-line);
    border-radius: 0;
    box-shadow: none;
  }
  .message-composer textarea, .message-composer input[type="text"] {
    min-height: 42px;
    max-height: 112px;
    padding: 10px 13px;
    color: var(--m-ink);
    background: var(--m-surface);
    border: 1px solid #d8d5cc;
    border-radius: 15px;
    outline: 0;
    font-size: 14px;
    line-height: 20px;
  }
  .message-composer .composer-attach, .message-composer .composer-send {
    flex: 0 0 40px;
    width: 40px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 14px;
  }
  .message-composer .composer-emoji { display: none; }
  .message-composer .composer-send { color: var(--m-ink); background: var(--m-acid); }
  .message-reply-context, .message-attachment-preview {
    margin: 0 14px;
    background: var(--m-surface);
    border-color: var(--m-line);
  }

  /* Every top-level mobile screen uses the exact same header geometry and
     brand crop. This removes the sub-pixel logo hop between tabs. */
  .topbar,
  .messages-drawer-header {
    box-sizing: border-box;
    flex: 0 0 var(--m-header-height);
    width: 100%;
    height: var(--m-header-height);
    min-height: var(--m-header-height);
    max-height: var(--m-header-height);
    padding: 10px var(--m-header-padding-x);
  }
  .chat-header {
    box-sizing: border-box;
    height: var(--m-header-height);
    min-height: var(--m-header-height);
    max-height: var(--m-header-height);
  }
  .brand,
  .messages-brand {
    box-sizing: border-box;
    flex: 0 0 var(--m-header-logo);
    width: var(--m-header-logo);
    height: var(--m-header-logo);
    border-radius: 8px;
  }
  .brand img,
  .messages-brand img {
    position: absolute;
    top: 0;
    left: 0;
    width: 164%;
    height: 164%;
    max-width: none;
    transform: translate(-19.38%, -18.34%);
  }
  body:not(.mobile-keyboard-visible) .messages-drawer,
  body:not(.mobile-keyboard-visible) .mobile-update-screen { top: 0; }

  body.mobile-keyboard-visible .mobile-nav { display: none; }
  body.mobile-keyboard-visible .messages-drawer,
  body.mobile-keyboard-visible .mobile-update-screen { height: var(--mobile-viewport-height, 100dvh); }
}

/* Green-sky mobile browser refresh. Loaded after the shared desktop sheet. */
@media (max-width: 700px) {
  :root {
    --m-paper: #ffffff;
    --m-surface: #ffffff;
    --m-ink: #101a14;
    --m-muted: #65726a;
    --m-line: #dce6e0;
    --m-acid: #2f7d32;
    --m-green-soft: #eaf4e8;
    --m-nav: 62px;
    --m-header-height: 62px;
    --m-header-padding-x: 16px;
    --m-header-logo: 34px;
  }

  html, body, .site-shell, .topbar, .people-panel, .profile-panel,
  .mobile-nav, .mobile-update-screen, .mobile-update-tools,
  .messages-drawer, .messages-drawer-header, .conversation-list-pane,
  .chat-pane, .message-stream, .message-composer { background: #fff !important; }
  body *, body *::before, body *::after { box-shadow: none !important; }

  .site-shell {
    max-width: 560px;
    border-top: 0;
    border-right: 1px solid var(--m-line);
    border-bottom: 0;
    border-left: 1px solid var(--m-line);
  }
  .topbar { position: sticky; top: 0; z-index: 45; border-bottom: 1px solid var(--m-line); }
  .brand { border-radius: 10px; }
  .page-home .topnav, .page-following .topnav {
    gap: 2px;
    padding: 2px;
    border-radius: 999px;
    background: #edf3ef;
  }
  .page-home .topnav a, .page-following .topnav a {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 999px;
    color: var(--m-muted);
    font-size: 11px;
  }
  .page-home .topnav a span,
  .page-following .topnav a span { display: none; }
  .page-home .topnav .desktop-nav-icon,
  .page-following .topnav .desktop-nav-icon {
    width: 17px;
    height: 17px;
    display: block;
  }
  .page-home .topnav a.active, .page-following .topnav a.active { color: #fff; background: var(--m-acid); }
  .page-home .topbar,
  .page-following .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }
  .page-home .topnav,
  .page-following .topnav {
    justify-self: center;
    margin: 0;
  }
  .page-home .account-actions,
  .page-following .account-actions {
    display: flex !important;
    margin: 0;
  }
  .page-home .account-actions > :not(.search-launch),
  .page-following .account-actions > :not(.search-launch) { display: none !important; }
  .page-home .account-actions .search-launch,
  .page-following .account-actions .search-launch {
    width: 36px;
    height: 36px;
    display: grid !important;
    place-items: center;
    border: 1px solid var(--m-line);
    color: var(--m-ink);
    background: #fff;
  }
  .page-home .account-actions .search-launch svg,
  .page-following .account-actions .search-launch svg {
    width: 18px;
    height: 18px;
  }

  .people-panel {
    min-height: calc(100dvh - var(--m-header-height));
    padding: 18px 14px calc(var(--m-nav) + env(safe-area-inset-bottom) + 24px);
    box-sizing: border-box;
  }
  .people-heading { min-height: 54px; padding: 0 5px; }
  .people-heading h1 { color: var(--m-ink); font-size: 20px; line-height: 1.2; letter-spacing: -.45px; }
  .people-list { border-top: 1px solid var(--m-line); }
  .person-row {
    min-height: 70px;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 11px;
    padding: 10px 5px;
    border-bottom: 1px solid var(--m-line);
    border-radius: 0;
  }
  .person-row > .chevron { display: none; }
  .person-row:hover, .person-row.selected { background: #f5f9f6; }
  .avatar-wrap, .avatar { width: 48px; height: 48px; border-radius: 50%; }
  .person-row strong { color: var(--m-ink); font-size: 14px; }
  .person-row p { margin-top: 3px; color: var(--m-muted); font-size: 11px; }
  .person-row time { color: #839087; font-size: 10px; }
  .people-panel .sidebar-meta {
    order: 1;
    display: block !important;
    margin: 0 5px 14px;
  }
  .people-panel .android-download {
    min-height: 50px;
    display: grid !important;
    padding: 10px 12px;
    border: 1px solid var(--m-line);
    border-radius: 12px;
    background: #fff;
  }
  .people-panel .people-heading { order: 0; }
  .people-panel .people-list { order: 2; }
  .sidebar-legal { color: var(--m-muted); }

  .profile-panel {
    min-height: calc(100dvh - var(--m-header-height));
    padding: 18px 16px calc(var(--m-nav) + env(safe-area-inset-bottom) + 34px);
    box-sizing: border-box;
  }
  .page-profile:not(.mobile-history-page) .topbar,
  .page-following_profile:not(.mobile-history-page) .topbar { display: none; }
  .page-profile .profile-panel,
  .page-following_profile .profile-panel {
    position: relative;
    min-height: calc(100dvh - var(--m-nav) - env(safe-area-inset-bottom));
    padding-top: 12px;
  }
  .page-profile .mobile-back,
  .page-following_profile .mobile-back {
    width: 36px;
    height: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 14px -5px;
    padding: 0;
    border: 1px solid var(--m-line);
    border-radius: 999px;
    color: var(--m-ink);
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
  }
  .page-profile .mobile-back span,
  .page-following_profile .mobile-back span { display: none; }
  .page-profile .mobile-profile-topline,
  .page-following_profile .mobile-profile-topline {
    min-height: 52px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    margin: -12px -16px 16px;
    padding: 0 8px;
    border-bottom: 1px solid var(--m-line);
    background: #fff;
  }
  .mobile-history-page .mobile-profile-topline { display: none; }
  .mobile-profile-topline .mobile-back {
    width: 40px;
    height: 40px;
    min-height: 40px;
    justify-self: start;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
  }
  .mobile-profile-topline .mobile-back svg {
    width: 22px;
    height: 22px;
  }
  .mobile-profile-topline > strong {
    grid-column: 2;
    overflow: hidden;
    font-size: 17px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .page-profile .mobile-profile-settings-more,
  .page-following_profile .mobile-profile-settings-more {
    position: absolute;
    z-index: 72;
    top: 12px;
    right: 16px;
    display: block;
  }
  .page-profile .mobile-profile-settings-more[open],
  .page-following_profile .mobile-profile-settings-more[open] { z-index: 220; }
  .page-profile .mobile-profile-action-more,
  .page-following_profile .mobile-profile-action-more {
    position: relative;
    z-index: 72;
    display: block;
    flex: 0 0 32px;
  }
  .mobile-profile-action-more[open] { z-index: 220; }
  .mobile-profile-action-more > summary { width: 32px; height: 32px; }
  .mobile-profile-action-more > summary svg { width: 17px; height: 17px; }
  /* Options beside Follow is an anchored menu, not a page-level settings sheet. */
  .mobile-profile-more.mobile-profile-action-more[open]::before { background: transparent; }
  .mobile-profile-action-more .mobile-profile-sheet {
    position: absolute;
    z-index: 200;
    top: calc(100% + 8px);
    right: 0;
    bottom: auto;
    left: auto;
    width: 208px;
    max-height: none;
    margin: 0;
    overflow: hidden;
    padding: 4px;
    border: 1px solid #d9e2dc;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(22, 35, 27, .14);
  }
  .mobile-profile-action-more .mobile-profile-sheet > header { display: none; }
  .mobile-profile-action-more .mobile-profile-sheet-row {
    min-height: 36px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 9px;
    padding: 0 9px 0 10px;
    border: 0;
    border-radius: 7px;
    color: #34433a;
    font-size: 11.5px;
    font-weight: 650;
  }
  .mobile-profile-action-more .mobile-profile-sheet-row > svg {
    width: 17px;
    height: 17px;
    grid-column: 2;
    grid-row: 1;
    color: #637269;
  }
  .mobile-profile-action-more .mobile-profile-sheet-row .profile-menu-label {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-profile-action-more .mobile-profile-sheet .profile-block-button {
    margin-top: 3px;
    border-top: 1px solid #e2e8e4;
    border-radius: 0 0 7px 7px;
    color: #34433a;
  }
  .mobile-profile-action-more .mobile-profile-sheet .profile-block-button > svg { color: #637269; }
  .mobile-profile-action-more .mobile-profile-sheet-row:active {
    color: #176b34;
    background: #eaf5ed;
  }
  .mobile-profile-action-more .mobile-profile-sheet .profile-block-button:active {
    color: #b42318;
    background: #fff1ef;
  }
  .mobile-history-page .mobile-profile-more { display: none; }
  .mobile-profile-more > summary {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    list-style: none;
    border: 1px solid var(--m-line);
    border-radius: 50%;
    color: var(--m-ink);
    background: #fff;
  }
  .mobile-profile-more > summary::-webkit-details-marker { display: none; }
  .mobile-profile-more > summary svg {
    width: 19px;
    height: 19px;
  }
  .mobile-profile-more[open]::before {
    content: "";
    position: fixed;
    z-index: 199;
    inset: 0;
    background: rgba(10, 18, 13, .38);
  }
  .mobile-profile-sheet {
    position: fixed;
    z-index: 200;
    right: 0;
    bottom: 0;
    left: 0;
    width: min(100%, 560px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 14px calc(14px + env(safe-area-inset-bottom));
    border: 1px solid var(--m-line);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: #fff;
  }
  .mobile-profile-sheet > header {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    border-bottom: 1px solid var(--m-line);
  }
  .mobile-profile-sheet > header h2 {
    margin: 0;
    font-size: 17px;
  }
  .mobile-profile-sheet > header button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: var(--m-muted);
    background: transparent;
    font-size: 22px;
  }
  .mobile-profile-sheet-row,
  .mobile-profile-sheet form > button {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 10px;
    border: 0;
    border-bottom: 1px solid var(--m-line);
    color: var(--m-ink);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    text-align: left;
    text-decoration: none;
  }
  .mobile-profile-sheet-row > svg,
  .mobile-profile-sheet form > button > svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
  }
  .mobile-profile-sheet-row.language-row { justify-content: space-between; }
  .mobile-profile-sheet-row.language-row > span:first-of-type {
    display: inline-flex;
    align-items: center;
    gap: 13px;
  }
  .mobile-profile-languages {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border-radius: 999px;
    background: #eef3ef;
  }
  .mobile-profile-languages a {
    min-width: 30px;
    padding: 5px 7px;
    border-radius: 999px;
    color: var(--m-muted);
    font-size: 10px;
    text-align: center;
    text-decoration: none;
  }
  .mobile-profile-languages a.active { color: #fff; background: var(--m-ink); }
  .mobile-profile-sheet form { margin: 0; }
  .mobile-profile-sheet-section-label {
    padding: 14px 10px 5px;
    color: var(--m-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .mobile-profile-sheet form:last-child > button {
    border-bottom: 0;
    color: #b42318;
  }
  .mobile-profile-sheet .profile-block-button { color: #b42318; }
  .support-now-row > span {
    min-width: 0;
    display: grid;
    gap: 2px;
  }
  .support-now-row strong { font-size: 13px; }
  .support-now-row small { color: var(--m-muted); font-size: 9px; font-weight: 550; }
  .page-profile .mobile-back svg,
  .page-following_profile .mobile-back svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .profile-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px 14px;
    padding: 0 0 18px;
  }
  .profile-identity { display: contents; }
  .profile-avatar-wrap { grid-column: 1; grid-row: 1; }
  .profile-copy {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .profile-actions {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    margin: 0;
    padding-top: 0;
  }
  .profile-header.own-profile .profile-actions { margin: 0; }
  .profile-avatar { width: 76px; height: 76px; border-radius: 50%; background: var(--m-green-soft); }
  .profile-identity h2 { order: 0; color: var(--m-ink); font-size: 23px; }
  .profile-identity p { order: 1; margin: 4px 0 0; color: var(--m-muted); }
  .profile-professional { order: 2; color: var(--m-ink); font-size: 12px; }
  .profile-bio { order: 3; color: #536159; font-size: 12px; }
  .profile-stats { order: 4; color: var(--m-muted); font-size: 10px; }
  .profile-stats b { color: var(--m-ink); }
  .profile-actions { margin: 15px 0 0; gap: 7px; }
  .profile-actions .secondary-button {
    min-height: 38px;
    padding: 0 12px;
    border-color: var(--m-line);
    border-radius: 999px;
    color: var(--m-ink);
    background: #fff;
    font-size: 10px;
  }
  .profile-edit-button { display: inline-flex; align-items: center; gap: 6px; }
  .profile-edit-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .message-profile-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0 !important;
    display: grid !important;
    place-items: center;
    border-radius: 50% !important;
  }
  .message-profile-button svg { width: 18px; height: 18px; margin: 0; }
  .follow-button:not(.following):not(.requested) {
    border-color: var(--m-acid) !important;
    color: #fff !important;
    background: var(--m-acid) !important;
  }

  .now-hero {
    margin: 18px 0 14px;
    padding: 18px;
    border: 1px solid var(--m-acid);
    border-radius: 16px;
    color: var(--m-ink);
    background: #fff;
  }
  .now-hero::after { display: none; }
  .now-meta, .now-hero .now-meta { color: var(--m-muted); }
  .now-hero p {
    max-width: 100%;
    margin: 28px 0 14px;
    color: var(--m-ink);
    font-size: clamp(24px, 7.5vw, 34px);
    line-height: 1.14;
  }
  .hero-actions .like-toggle, .hero-actions .comment-toggle,
  .hero-actions .message-now-action, .hero-actions .item-menu { color: #748078; }
  .hero-actions .like-toggle span, .hero-actions .comment-toggle span { color: #748078; }
  .hero-actions .like-toggle:hover, .hero-actions .comment-toggle:hover,
  .hero-actions .message-now-action:hover, .hero-actions .item-menu:hover { color: var(--m-acid); background: var(--m-green-soft); }
  .now-hero .action-menu {
    width: 226px;
    padding: 5px;
    border-color: var(--m-line);
    border-radius: 10px;
    color: var(--m-ink);
    background: #fff;
  }
  .action-menu .hide-action,
  .action-menu .delete-action {
    min-height: 46px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22px;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    border-radius: 7px;
    color: #35443a;
    background: transparent;
  }
  .action-menu .delete-action {
    margin-top: 2px;
    border-top: 1px solid var(--m-line);
    border-radius: 0 0 7px 7px;
  }
  .action-menu .hide-action:hover,
  .action-menu .delete-action:hover { color: #24372b; background: #f2f6f3; }
  .action-menu .action-copy { grid-column: 1; grid-row: 1; }
  .action-menu .action-copy strong { margin: 0; color: inherit; font-size: 12px; font-weight: 650; }
  .action-menu .action-icon,
  .action-menu .delete-action .action-icon {
    width: 22px;
    height: 22px;
    grid-column: 2;
    grid-row: 1;
    color: #536159;
    background: transparent;
    border-radius: 0;
  }

  .composer { border: 1px solid var(--m-line); border-radius: 16px; background: #fff; }
  .composer textarea { color: var(--m-ink); }
  .composer .attach-photo { color: #5f6e64; }
  .composer #postButton { color: #fff; background: var(--m-acid); }

  .history-section { margin-top: 28px; }
  .history-heading h3 { color: var(--m-ink); font-size: 20px; }
  .rewind-launch, .rewind-launch:hover {
    width: auto;
    flex-basis: auto !important;
    padding: 6px 1px;
    border: 0;
    border-radius: 0;
    color: var(--m-muted);
    background: transparent;
  }
  .rewind-launch .rewind-launch-clock {
    flex: 0 0 16px;
    width: 16px !important;
    height: 16px !important;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .history-group + .history-group { padding-top: 24px; }
  .history-group h4 { color: #758279; }
  .history-item { min-height: 56px; border-bottom: 1px solid var(--m-line); }
  .history-copy p { color: var(--m-ink); font-size: 14px; font-weight: 500; }
  .history-line::after { background: var(--m-line); }
  .history-line i { background: var(--m-acid); }

  .profile-panel .history-heading {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
  }
  .profile-panel .rewind-launch,
  .profile-panel .rewind-launch:hover {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid var(--m-line);
    border-radius: 999px;
    color: #46534b;
    background: #f5f8f6;
  }
  .profile-panel .rewind-launch b {
    color: inherit !important;
    font-size: 11px;
    font-weight: 700;
  }
  .profile-panel .history-group { display: block; }
  .profile-panel .history-group + .history-group {
    margin-top: 18px;
    padding-top: 0;
  }
  .profile-panel .history-group h4 {
    margin: 0 0 5px;
    font-size: 10px;
    letter-spacing: .05em;
  }
  .profile-panel .history-item {
    min-height: 50px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 7px 0;
  }
  .profile-panel .history-item > time {
    padding-top: 2px;
    color: #758279;
    font-size: 10px;
  }
  .profile-panel .history-line { display: none; }
  .profile-panel .history-copy p {
    font-size: 14px;
    line-height: 1.35;
  }
  .profile-panel .history-item > .comments-panel { grid-column: 2 / -1; }

  body.mobile-history-page .profile-panel {
    padding: 10px 15px calc(var(--m-nav) + env(safe-area-inset-bottom) + 28px);
  }
  body.mobile-history-page .history-section { margin-top: 0; }
  body.mobile-history-page .history-heading {
    display: flex;
    align-items: center;
    margin: 7px 0 18px;
  }
  body.mobile-history-page .rewind-launch,
  body.mobile-history-page .rewind-launch:hover {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid var(--m-line);
    border-radius: 999px;
    color: #46534b;
    background: #f5f8f6;
  }
  body.mobile-history-page .rewind-launch b {
    color: inherit !important;
    font-size: 11px;
    font-weight: 700;
  }
  body.mobile-history-page .history-group { display: block; }
  body.mobile-history-page .history-group + .history-group {
    margin-top: 18px;
    padding-top: 0;
  }
  body.mobile-history-page .history-group h4 {
    margin: 0 0 5px;
    color: #758279;
    font-size: 10px;
    letter-spacing: .05em;
  }
  body.mobile-history-page .history-item {
    min-height: 50px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 7px 0;
  }
  body.mobile-history-page .history-item > time {
    padding-top: 2px;
    color: #758279;
    font-size: 10px;
  }
  body.mobile-history-page .history-line { display: none; }
  body.mobile-history-page .history-copy p {
    font-size: 14px;
    line-height: 1.35;
  }
  body.mobile-history-page .history-actions { gap: 5px; }
  body.mobile-history-page .history-item > .comments-panel { grid-column: 2 / -1; }

  .mobile-nav {
    height: calc(var(--m-nav) + env(safe-area-inset-bottom));
    grid-template-columns: 1fr 1fr 52px 1fr 1fr;
    border-top: 1px solid var(--m-line);
  }
  .mobile-nav > a, .mobile-nav > button { color: #7e8a82; }
  .mobile-nav svg {
    width: 23px;
    height: 23px;
    fill: none;
    transition: color .15s ease, fill .15s ease, stroke-width .15s ease;
  }
  .mobile-nav > a > span:last-child,
  .mobile-nav > button > span:last-child { display: none !important; }
  .mobile-right-now.active, .mobile-notifications.active, .mobile-profile.active,
  body.messages-open .mobile-messages, body.mobile-history-page .mobile-profile { color: var(--m-ink); }
  .mobile-right-now.active > svg,
  .mobile-notifications.active .mobile-nav-icon > svg,
  .mobile-profile.active > svg,
  body.messages-open .mobile-messages .mobile-nav-icon > svg,
  body.mobile-history-page .mobile-profile > svg {
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 2;
  }
  .mobile-nav .mobile-compose {
    width: 40px;
    height: 40px;
    min-height: 40px;
    place-self: center;
    border-radius: 50%;
    color: #fff !important;
    background: #111512;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
  }
  body.messages-open .mobile-nav .mobile-right-now,
  body.messages-open .mobile-nav .mobile-notifications,
  body.messages-open .mobile-nav .mobile-profile { color: #7e8a82 !important; }
  body.messages-open .mobile-nav .mobile-messages { color: var(--m-ink) !important; }
  body.messages-open .mobile-nav .mobile-right-now > svg,
  body.messages-open .mobile-nav .mobile-notifications .mobile-nav-icon > svg,
  body.messages-open .mobile-nav .mobile-profile > svg {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
  }
  body.messages-open .mobile-nav .mobile-messages .mobile-nav-icon > svg {
    fill: currentColor !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
  }

  .mobile-update-screen { color: var(--m-ink); }
  .mobile-update-header { border-bottom-color: var(--m-line); }
  .mobile-update-cancel { color: var(--m-acid); font-weight: 700; }
  #mobileUpdateText { color: var(--m-ink); font-size: 19px; font-weight: 500; }
  .mobile-feeling-picker > div button.selected { border-color: #b9dec7; background: var(--m-green-soft); }
  .mobile-update-tools { border-top-color: var(--m-line); }
  .mobile-update-tool { color: #46534b !important; }
  .mobile-update-tools .mobile-update-submit { color: #fff; background: var(--m-acid); border-radius: 999px; }

  /* Mobile interaction states: color the glyph, never leave a tapped square behind. */
  .hero-actions .item-menu,
  .hero-actions .item-menu:hover,
  .hero-actions .item-menu:focus,
  .hero-actions .item-menu:focus-visible,
  .hero-actions .item-menu:active {
    border-radius: 50%;
    color: #748078 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .hero-actions .item-menu:focus-visible,
  .hero-actions .item-menu:active { color: var(--m-acid) !important; }
  .hero-actions .like-toggle.liked,
  .history-actions .like-toggle.liked { color: #e83e8c !important; opacity: 1; }
  .hero-actions .like-toggle.liked svg,
  .history-actions .like-toggle.liked svg { fill: currentColor !important; stroke: currentColor !important; }
  .hero-actions .like-toggle.liked span,
  .history-actions .like-toggle.liked span { color: currentColor !important; }
  .now-meta span,
  .now-hero .now-meta span {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--m-acid);
    background: var(--m-green-soft);
    font-size: 10px;
    font-weight: 800;
  }
  .now-meta span i { margin-right: 6px; }

  .profile-panel .rewind-launch,
  .profile-panel .rewind-launch:hover,
  body.mobile-history-page .rewind-launch,
  body.mobile-history-page .rewind-launch:hover {
    width: fit-content;
    max-width: 100%;
    flex: 0 0 auto !important;
    min-height: 32px;
    padding: 0 10px;
    border-color: #dce6df;
    background: #fff;
  }

  .now-hero .hero-comments-panel {
    margin: 12px 0 0;
    padding: 10px 0 0;
    border: 0;
    border-top: 1px solid var(--m-line);
    border-radius: 0;
    background: #fff !important;
  }
  .now-hero .hero-comments-panel .no-replies {
    padding: 2px 0 4px;
    color: #78857d !important;
  }
  .now-hero .hero-comments-panel .reply-item p {
    color: var(--m-ink) !important;
    -webkit-text-fill-color: var(--m-ink);
  }
  .now-hero .hero-comments-panel .reply-item strong {
    color: var(--m-ink) !important;
    -webkit-text-fill-color: var(--m-ink);
  }
  .now-hero .hero-comments-panel .reply-meta time,
  .now-hero .hero-comments-panel .reply-meta button {
    color: var(--m-muted) !important;
    -webkit-text-fill-color: var(--m-muted);
  }
  .now-hero .hero-comments-panel .reply-meta .reply-delete {
    color: #b42318 !important;
    -webkit-text-fill-color: #b42318;
  }
  .now-hero .hero-comments-panel .reply-meta .reply-like.liked {
    color: #e83e8c !important;
    -webkit-text-fill-color: #e83e8c;
  }
  .now-hero .hero-comments-panel .reply-form { gap: 8px; margin-top: 7px; padding-top: 8px; }
  .now-hero .hero-comments-panel .reply-form input {
    min-width: 0;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid #d5e1da !important;
    border-radius: 12px;
    color: var(--m-ink) !important;
    background: #fff !important;
    opacity: 1 !important;
    -webkit-text-fill-color: var(--m-ink);
  }
  .now-hero .hero-comments-panel .reply-form input::placeholder {
    color: #849189 !important;
    opacity: 1;
    -webkit-text-fill-color: #849189;
  }
  .now-hero .hero-comments-panel .reply-form > button[type="submit"] {
    min-width: 58px;
    min-height: 40px;
    border-radius: 12px;
    color: #fff;
    background: var(--m-acid);
  }

  .privacy-preview-dialog {
    border-color: var(--m-line);
    border-radius: 20px 20px 0 0;
    background: #fff;
  }
  .privacy-preview-option,
  .privacy-preview-option:hover,
  .privacy-preview-option.selected {
    border-color: transparent !important;
    background: #fff !important;
  }
  .privacy-preview-option.selected > b { border-color: var(--m-acid); background: var(--m-acid); box-shadow: inset 0 0 0 4px #fff !important; }
  .privacy-preview-dialog > footer .privacy-preview-save { width: 100%; color: #fff; background: var(--m-acid); border-color: var(--m-acid); border-radius: 999px; }

  .edit-profile-overlay {
    z-index: 500;
    display: grid !important;
    place-items: end center;
    padding: 0;
    background: rgba(10, 18, 13, .38);
  }
  .edit-profile-overlay[hidden] { display: none !important; }
  .edit-profile-dialog {
    width: min(100%, 560px);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    border: 1px solid var(--m-line);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: #fff;
  }
  .edit-profile-dialog header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
  }

  .feedback-overlay,
  .app-download-overlay,
  .support-overlay,
  .switch-account-overlay {
    position: fixed;
    inset: 0;
    z-index: 520;
    display: grid !important;
    place-items: end center;
    padding: 0;
    background: rgba(10, 18, 13, .38);
  }
  .feedback-overlay[hidden],
  .app-download-overlay[hidden],
  .support-overlay[hidden],
  .switch-account-overlay[hidden] { display: none !important; }
  .feedback-dialog,
  .app-download-dialog,
  .support-dialog,
  .switch-account-dialog {
    width: min(100%, 560px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--m-line);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: #fff;
  }
  .feedback-dialog > header,
  .app-download-dialog > header,
  .support-dialog > header,
  .switch-account-dialog > header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
  }

  .feedback-overlay {
    align-items: center !important;
    justify-items: center !important;
    place-items: center !important;
    padding: 16px !important;
  }
  .app-download-overlay,
  .switch-account-overlay {
    place-items: center;
    padding: 16px;
  }
  .feedback-dialog {
    position: relative !important;
    inset: auto !important;
    width: min(420px, 100%);
    max-height: calc(100dvh - 32px);
    margin: auto !important;
    border: 1px solid var(--m-line);
    border-radius: 18px;
  }
  .app-download-dialog,
  .switch-account-dialog {
    width: min(420px, 100%);
    max-height: calc(100dvh - 32px);
    border: 1px solid var(--m-line);
    border-radius: 18px;
  }

  .feedback-dialog > header {
    min-height: 56px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--m-line);
  }
  .feedback-dialog > header h2 {
    margin: 0;
    color: var(--m-ink);
    font-size: 16px;
    text-align: center;
  }
  .feedback-dialog > header button {
    justify-self: start;
    padding: 8px 0;
    border: 0;
    color: var(--m-acid);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
  }
  .feedback-dialog > header .feedback-submit { justify-self: end; }
  .feedback-dialog > div { padding: 18px 16px 24px; }
  .feedback-dialog p { margin: 0 0 12px; color: var(--m-muted); font-size: 12px; line-height: 1.5; }
  .feedback-dialog textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid var(--m-line);
    border-radius: 12px;
    outline: 0;
    color: var(--m-ink);
    background: #fff;
    font: inherit;
    font-size: 16px;
    line-height: 1.45;
    resize: vertical;
  }
  .feedback-dialog > div > small { display: block; margin-top: 6px; color: var(--m-muted); font-size: 10px; text-align: right; }
  .feedback-error, .feedback-success { min-height: 17px; margin-top: 8px; font-size: 11px; }
  .feedback-error { color: #b42318; }
  .feedback-success { color: var(--m-acid); }
  .feedback-success[hidden] { display: none; }

  .app-download-dialog > header {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--m-line);
  }
  .app-download-dialog > header h2 { margin: 0; color: var(--m-ink); font-size: 17px; }
  .app-download-dialog > header button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: var(--m-muted);
    background: transparent;
    font-size: 22px;
  }
  .app-download-options { display: grid; padding: 4px 16px 18px; }
  .app-download-options > a,
  .app-download-options > div {
    min-height: 66px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-items: center;
    padding: 9px 2px;
    border: 0;
    border-bottom: 1px solid var(--m-line);
    color: var(--m-ink);
    background: #fff;
    text-decoration: none;
  }
  .app-download-options > * > span {
    grid-row: 1 / 3;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #34453a;
  }
  .app-download-options svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .app-download-options strong { align-self: end; font-size: 13px; }
  .app-download-options small { align-self: start; color: var(--m-muted); font-size: 10px; }
  .app-download-options > * > b { grid-column: 3; grid-row: 1 / 3; color: var(--m-acid); font-size: 10px; }
  .app-download-options .coming-soon { opacity: .62; }

  .support-dialog > header { min-height: 56px; }
  .support-body { padding: 19px 16px calc(22px + env(safe-area-inset-bottom)); }
  .support-body h3 { font-size: 21px; }

  .page-notifications .profile-panel { padding-top: 0; }
  .page-notifications .notifications-view {
    width: calc(100% + 32px);
    max-width: none;
    margin: 0 -16px;
    padding-top: 0;
  }
  .page-notifications .notification-tabs {
    height: 48px;
    margin-top: 0;
    border-bottom-color: var(--m-line);
  }
  .page-notifications .notification-tabs button { font-size: 13px; }
  .page-notifications .notification-tabs button.active::after {
    right: 34%;
    left: 34%;
    background: var(--m-acid);
  }
  .page-notifications .notification-filter-empty { min-height: 300px; }

  .global-search-overlay, .global-search-dialog, .global-search-dialog > header { background: #fff; }
  .global-search-input { border-color: var(--m-line); background: #f0f4f1; }
  .global-search-row:hover { background: #f5f9f6; }
}

@media (max-width: 700px) {
  /* Get NOW now lives in Profile settings; keep only the legal links below
     the feed instead of repeating the Android download card. */
  .people-panel .android-download { display: none !important; }
  .people-panel .sidebar-meta { display: none !important; }
}

@media (max-width: 700px) {
  /* Unread counts use NOW's cannabis green, never the legacy lime. */
  .mobile-nav-icon b,
  .mobile-admin-inbox-row > b {
    min-width: 17px;
    height: 17px;
    display: inline-grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: #2f7d32;
    font-size: 8px;
    line-height: 1;
  }
  .mobile-admin-inbox-row > b { margin-left: auto; border-width: 0; }

  body.admin-inbox-open { overflow: hidden; }
  .admin-inbox-drawer {
    position: fixed;
    z-index: 620;
    inset: 0;
    width: min(100%, 560px);
    height: 100dvh;
    display: flex !important;
    flex-direction: column;
    margin: 0 auto;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #fff;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform .18s ease, visibility 0s linear .18s;
  }
  .admin-inbox-drawer.open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition-delay: 0s;
  }
  .admin-inbox-drawer > header {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px 0 16px;
    border-bottom: 1px solid var(--m-line);
    background: #fff;
  }
  .admin-inbox-drawer > header > div { display: flex; align-items: center; gap: 9px; }
  .admin-inbox-drawer > header > div > span { display: none; }
  .admin-inbox-drawer h2 { margin: 0; color: var(--m-ink); font-size: 18px; }
  .admin-inbox-drawer svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .admin-inbox-drawer > header > button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--m-muted);
    background: #fff;
  }
  .admin-inbox-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 9px 12px;
    border-bottom: 1px solid var(--m-line);
    background: #fff;
  }
  .admin-inbox-tabs button {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    color: var(--m-muted);
    background: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
  }
  .admin-inbox-tabs button.active { color: #fff; background: var(--m-ink); }
  .admin-inbox-list { min-height: 0; flex: 1; overflow-y: auto; padding: 4px 12px 20px; }
  .admin-inbox-item { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 13px 4px; border-bottom: 1px solid var(--m-line); }
  .admin-inbox-avatar { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #edf3ef; font-size: 10px; font-weight: 800; }
  .admin-inbox-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .admin-inbox-item p { margin: 0 0 5px; font-size: 12px; }
  .admin-inbox-item p small { color: var(--m-muted); font-weight: 500; }
  .admin-inbox-item > div > div { color: #465249; font-size: 12px; line-height: 1.45; }
  .admin-inbox-item footer { display: flex; gap: 9px; margin-top: 8px; color: var(--m-muted); font-size: 9px; }
  .admin-inbox-state { min-height: 180px; display: grid; place-items: center; padding: 24px; color: var(--m-muted); font-size: 12px; text-align: center; }

  /* Expanded notifications are a flat list: divider + chevron only. */
  .page-notifications .notification-group,
  .page-notifications .notification-group[open] {
    margin: 0;
    overflow: visible;
    border-bottom: 1px solid var(--m-line);
    border-radius: 0;
    background: #fff !important;
  }
  .page-notifications .notification-group > summary,
  .page-notifications .notification-group[open] > summary {
    border-bottom: 1px solid var(--m-line);
    border-radius: 0;
    background: #fff !important;
  }
  .page-notifications .notification-group[open] > summary .notification-chevron { transform: rotate(90deg); }
  .page-notifications .notification-children {
    margin: 0 10px 0 52px;
    border-top: 0;
    background: #fff;
  }
  .page-notifications .notification-child {
    min-height: 64px;
    padding: 9px 3px;
    border: 0;
    border-radius: 0;
    background: #fff;
  }
  .page-notifications .notification-child + .notification-child { border-top: 1px solid var(--m-line); }
  .page-notifications .notification-child:hover { background: #fff; }
  .page-notifications .notification-child .notification-chevron { color: #8b9690; }
  .page-notifications .notification-item.unread { background: #fff; }
  .page-notifications .notification-item.unread .notification-icon,
  .page-notifications .notification-item.unread .notification-avatar { color: #fff; background: #2f7d32; }
  .page-notifications .notification-avatar,
  .page-notifications .notification-icon { border-radius: 50%; }
  .page-notifications .notification-child-message {
    display: block;
    color: var(--m-ink);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.45;
  }
  .page-notifications .notification-child-message b { font-weight: 750; }
  .page-notifications .notification-child-copy > small {
    font-weight: 400;
    line-height: 1.45;
  }
}

@media (max-width: 700px) {
  /* Final mobile color language: centered black/white navigation. */
  .page-home .topbar,
  .page-following .topbar {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 0;
    padding-inline: 16px;
    background: #fff;
  }
  .page-home .topbar .brand,
  .page-following .topbar .brand { justify-self: start; }
  .page-home .topnav,
  .page-following .topnav {
    justify-self: center;
    border: 1px solid var(--m-line);
    background: #fff;
  }
  .page-home .topnav a,
  .page-following .topnav a { color: var(--m-ink); background: #fff; }
  .page-home .topnav a.active,
  .page-following .topnav a.active { color: #fff; background: var(--m-ink); }
  .page-home .account-actions,
  .page-following .account-actions { justify-self: end; }

  /* Settings separators belong between groups, not between every item. */
  .mobile-profile-settings-more .mobile-profile-sheet-row,
  .mobile-profile-settings-more .mobile-profile-sheet form > button { border-bottom: 0; }
  .mobile-profile-settings-more .mobile-profile-sheet-section-label {
    margin-top: 5px;
    padding-top: 13px;
    border-top: 1px solid var(--m-line);
  }
  .mobile-profile-settings-more .settings-account-start {
    margin-top: 5px;
    border-top: 1px solid var(--m-line);
    border-radius: 0;
  }

  /* The pill already marks the current NOW. */
  .now-meta span i { display: none; }

  .now-hero .action-menu { background: #fff !important; }
  .now-hero .action-menu .hide-action,
  .now-hero .action-menu .delete-action { background: #fff !important; }
  .now-hero .action-menu .hide-action:hover,
  .now-hero .action-menu .delete-action:hover { background: #f6f8f6 !important; }

  .message-composer .composer-send { color: #fff; background: var(--m-ink); }
  .message-composer .composer-send:disabled { color: #fff; background: #7f8983; }
  .message-bubble.own,
  .message-bubble-row.own .message-bubble {
    color: #fff !important;
    background: #2f7d32 !important;
  }
  .message-bubble-row.own .message-reply-reference {
    border-color: rgba(255, 255, 255, .28);
    color: rgba(255, 255, 255, .82);
    background: rgba(255, 255, 255, .1);
  }

  /* Rewind follows the light NOW card language on mobile. */
  .rewind-overlay { color: var(--m-ink); background: #fff; backdrop-filter: none; }
  .rewind-dialog { color: var(--m-ink); background: #fff; box-shadow: none; }
  .rewind-topbar {
    min-height: 64px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--m-line);
    background: #fff;
  }
  .rewind-topbar button,
  .rewind-topbar select,
  .rewind-controls button { border-color: var(--m-line); color: var(--m-ink); background: #fff; }
  .rewind-topbar > div:nth-child(2) span { color: var(--m-muted); }
  .rewind-topbar h2 { color: var(--m-ink); }
  .rewind-top-actions select { color: var(--m-ink); background: #fff; }
  .rewind-progress { padding: 9px 16px 0; }
  .rewind-progress i { background: #e1e8e3; }
  .rewind-progress i::after { background: var(--m-ink); }
  .rewind-content { padding: 14px 16px; background: #fff; }
  .rewind-stage { border: 1px solid var(--m-acid); border-radius: 16px; background: #fff; }
  .rewind-stage-shade { display: none; }
  .rewind-stage-copy { bottom: 50px; padding: 24px; }
  .rewind-stage-stamp time { color: var(--m-ink); font-size: 38px; }
  .rewind-stage-stamp > span { border-left-color: var(--m-acid); }
  .rewind-stage-stamp b,
  .rewind-stage-stamp small { color: var(--m-ink); }
  .rewind-stage-copy p {
    margin-top: 18px;
    color: var(--m-ink);
    font-size: clamp(25px, 8vw, 32px);
  }
  .rewind-stage-meta { color: var(--m-muted); }
  .rewind-stage:has(> img:not([hidden])) .rewind-stage-shade {
    display: block;
    background: linear-gradient(180deg, rgba(6, 7, 5, .08), rgba(6, 7, 5, .82));
  }
  .rewind-stage:has(> img:not([hidden])) .rewind-stage-stamp time,
  .rewind-stage:has(> img:not([hidden])) .rewind-stage-stamp b,
  .rewind-stage:has(> img:not([hidden])) .rewind-stage-stamp small,
  .rewind-stage:has(> img:not([hidden])) .rewind-stage-copy p { color: #fff; }
  .rewind-controls { padding: 0 16px max(14px, env(safe-area-inset-bottom)); background: #fff; }
  .rewind-controls .rewind-play { border-color: var(--m-ink); color: #fff; background: var(--m-ink); }
  .rewind-state { color: var(--m-muted); background: #fff; }
}
