@media (min-width: 721px) {
  :root[data-sidebar-slim="true"] .sidebar { padding-inline: 6px; }
  :root[data-sidebar-slim="true"] .sidebar .sidebar-search { justify-content: center; min-height: 40px; padding: 0; gap: 0; background: none; border-color: transparent; }
  :root[data-sidebar-slim="true"] .sidebar .sidebar-search:hover { background: var(--am-color-surface-raised); }
  :root[data-sidebar-slim="true"] .sidebar :is(.sidebar-label, .who, .account .name, .nav-label h2) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  :root[data-sidebar-slim="true"] .sidebar :is(.crown, .account-chevron, .all > span, .all a > svg:last-child, .nav-empty, .nav-remove, .nav-grip) { display: none; }
  :root[data-sidebar-slim="true"] .sidebar :is(.shelf, .all) { flex-direction: column; align-items: stretch; }
  :root[data-sidebar-slim="true"] .sidebar :is(.shelf a, .all a, .nav-rows a, .account > button) { justify-content: center; min-height: 40px; padding: 0; gap: 0; }
  :root[data-sidebar-slim="true"] .sidebar .nav-label { justify-content: center; padding-inline: 0; }
}
.nav-rows .ant-pin-face, .nav-rows .pin-mark { display: contents; }
#nav-recents .ant-pin-face .crown { order: 1; }
#nav-pinned:not(.editing) .nav-rows { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 4px; }
#nav-pinned:not(.editing) .nav-rows > li { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
#nav-pinned:not(.editing) .pin-tile { display: flex; flex-direction: column; align-items: center; gap: 5px; min-height: 0; padding: 6px 2px 5px; background: transparent; border-radius: 12px; }
#nav-pinned:not(.editing) .pin-tile[aria-current] { background: var(--am-color-selection); color: var(--am-color-selection-text); }
@media (hover: hover) { #nav-pinned:not(.editing) .pin-tile:not([aria-current]):hover { background: var(--am-color-surface-raised); } }
#nav-pinned:not(.editing) .pin-tile > .who { width: 100%; font-size: 11.5px; font-weight: var(--am-type-label-weight); line-height: 15px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav-pinned:not(.editing) .ant-pin-face,
#nav-pinned:not(.editing) .pin-mark { position: relative; display: grid; place-items: center; width: min(48px, 100%); aspect-ratio: 1; }
#nav-pinned:not(.editing) .pin-mark { color: var(--am-color-text-muted); }
#nav-pinned:not(.editing) .pin-mark svg { width: 28px; height: 28px; }
#nav-pinned:not(.editing) .pin-tile[aria-current] .pin-mark { color: var(--am-color-selection-text); }
#nav-pinned:not(.editing) .ant-pin-face .head { width: 100%; height: auto; aspect-ratio: 1; }
#nav-pinned:not(.editing) .ant-pin-face .crown { position: absolute; top: -3px; left: -1px; width: 14px; height: 14px; margin: 0; color: #efbf62; transform: rotate(-18deg); }
#nav-pinned:not(.editing) .nav-rows > li.drop-before::before,
#nav-pinned:not(.editing) .nav-rows > li.drop-after::after { top: 4px; bottom: 4px; width: 2px; height: auto; }
#nav-pinned:not(.editing) .nav-rows > li.drop-before::before { left: -3px; right: auto; }
#nav-pinned:not(.editing) .nav-rows > li.drop-after::after { right: -3px; left: auto; }
@container sidebar (max-width: 270px) {
  #nav-pinned:not(.editing) .nav-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container sidebar (max-width: 220px) {
  #nav-pinned:not(.editing) .nav-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container sidebar (max-width: 145px) {
  #nav-pinned:not(.editing) .nav-rows { grid-template-columns: minmax(0, 1fr); }
  #nav-pinned:not(.editing) .nav-rows > li.drop-before::before,
  #nav-pinned:not(.editing) .nav-rows > li.drop-after::after { left: 0; right: 0; width: auto; height: 2px; }
  #nav-pinned:not(.editing) .nav-rows > li.drop-before::before { top: -5px; bottom: auto; }
  #nav-pinned:not(.editing) .nav-rows > li.drop-after::after { bottom: -5px; top: auto; }
}
#nav-recents .nav-rows { display: flex; flex-direction: column; gap: 2px; }
#nav-recents .recent-row { min-height: 54px; padding: 8px 10px; gap: 10px; border-radius: 10px; }
#nav-recents .recent-row .head,
#nav-recents .recent-room-mark { flex: none; width: 36px; height: 36px; }
#nav-recents .recent-room-mark { display: grid; place-items: center; color: var(--am-color-text-muted); }
#nav-recents .recent-room-mark svg { width: 22px; height: 22px; }
#nav-recents .recent-row[aria-current] .recent-room-mark { color: var(--am-color-selection-text); }
#nav-recents .recent-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#nav-recents .recent-head { display: flex; align-items: center; gap: 4px; min-width: 0; }
#nav-recents .recent-body .who { font-size: 14.5px; font-weight: 500; line-height: 19px; }
#nav-recents .recent-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--am-color-text-muted); font-size: 12.5px; line-height: 17px; }
#nav-recents .recent-row[aria-current] .recent-preview { color: color-mix(in srgb, var(--am-color-selection-text) 72%, transparent); }
#nav-recents .recents-more { display: flex; justify-content: center; padding: var(--am-space-2) 0; }
#nav-recents .recents-more button { padding: 4px 10px; font: inherit; font-size: var(--am-type-caption-size); color: var(--am-color-text-muted); background: none; border: 0; border-radius: var(--am-radius-control); cursor: pointer; }
#nav-recents .recents-more button:hover { color: var(--am-color-text); background: var(--am-color-surface-raised); }
.sidebar #nav-pinned .ant-preview-trigger { display: none; }
.sidebar #nav-pinned .ant-peek { position: fixed; z-index: 10; width: min(280px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: visible; overflow-wrap: anywhere; color: var(--am-color-text); font-size: var(--am-type-caption-size); line-height: 1.35; pointer-events: none; visibility: hidden; }
.sidebar #nav-pinned .ant-peek-surface { display: block; max-height: inherit; padding: 8px 10px; overflow: hidden; background: var(--am-color-surface-raised); border: var(--am-border-thin) solid var(--am-color-border); border-radius: var(--am-radius-control); box-shadow: var(--am-elevation-panel); }
.sidebar #nav-pinned .ant-peek-surface > strong { display: block; overflow: hidden; font-weight: var(--am-type-label-weight); text-overflow: ellipsis; white-space: nowrap; }
.sidebar #nav-pinned .ant-peek-text { display: -webkit-box; max-height: 2.7em; margin: 4px 0 0; overflow: hidden; overflow-wrap: anywhere; white-space: pre-wrap; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
#nav-pinned.editing .ant-pin-face .crown { display: none; }
#nav-pinned.editing .pin-mark svg { width: 16px; height: 16px; }
@media (hover: none), (any-pointer: coarse) {
  /* The transparent preview target reaches behind the face on narrow tiles. Taps on the face open the Ant. */
  #nav-pinned:not(.editing) .ant-pin-face { z-index: 1; pointer-events: none; }
  #nav-pinned:not(.editing) .ant-pin-face .head { pointer-events: auto; }
  .sidebar #nav-pinned:not(.editing) .ant-preview-trigger { position: absolute; top: 0; right: 0; display: grid; place-items: start end; width: 44px; height: 44px; padding: 2px; color: var(--am-color-text-muted); background: transparent; border: 0; border-radius: var(--am-radius-control); }
  .sidebar #nav-pinned:not(.editing) .ant-preview-trigger svg { width: 12px; height: 12px; }
  .sidebar #nav-pinned:not(.editing) .ant-preview-trigger:focus-visible { outline: var(--am-border-control) solid var(--am-color-focus); outline-offset: -2px; }
}
@media (min-width: 721px) {
  :root[data-sidebar-slim="true"] #nav-pinned:not(.editing) .nav-rows { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  :root[data-sidebar-slim="true"] #nav-pinned:not(.editing) .pin-tile { flex-direction: row; justify-content: center; min-height: 40px; padding: 0; border-radius: var(--am-radius-control); }
  :root[data-sidebar-slim="true"] #nav-pinned:not(.editing) .pin-tile > .who { width: 1px; }
  :root[data-sidebar-slim="true"] #nav-pinned:not(.editing) .pin-mark { display: contents; }
  :root[data-sidebar-slim="true"] #nav-pinned:not(.editing) .pin-mark svg { width: 18px; height: 18px; }
  :root[data-sidebar-slim="true"] #nav-pinned:not(.editing) .nav-rows > li.drop-before::before,
  :root[data-sidebar-slim="true"] #nav-pinned:not(.editing) .nav-rows > li.drop-after::after { left: 0; right: 0; width: auto; height: 2px; }
  :root[data-sidebar-slim="true"] #nav-pinned:not(.editing) .nav-rows > li.drop-before::before { top: -1px; bottom: auto; }
  :root[data-sidebar-slim="true"] #nav-pinned:not(.editing) .nav-rows > li.drop-after::after { bottom: -1px; top: auto; }
  :root[data-sidebar-slim="true"] #nav-recents .recent-row { min-height: 40px; padding: 0; gap: 0; border-radius: var(--am-radius-control); }
  :root[data-sidebar-slim="true"] #nav-recents .recent-row .head { width: 28px; height: 28px; }
  :root[data-sidebar-slim="true"] #nav-recents .recent-room-mark { display: contents; }
  :root[data-sidebar-slim="true"] #nav-recents .recent-room-mark svg { width: 18px; height: 18px; }
  :root[data-sidebar-slim="true"] #nav-recents .recent-body,
  :root[data-sidebar-slim="true"] #nav-recents .recent-head { display: contents; }
  :root[data-sidebar-slim="true"] #nav-recents .recent-preview { display: none; }
  :root[data-sidebar-slim="true"] #nav-recents .recents-more button { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  :root[data-sidebar-slim="true"] .sidebar #nav-pinned .ant-preview-trigger { position: static; place-items: center; justify-self: center; width: 44px; height: 44px; padding: 0; }
  :root[data-sidebar-slim="true"] #nav-pinned:not(.editing) .ant-pin-face,
  :root[data-sidebar-slim="true"] #nav-pinned:not(.editing) .ant-pin-face .head { width: 28px; height: 28px; }
}
:root[data-sidebar-slim="true"] .sidebar .helper-mark { display: none; }
