/* ==========================================================================
   Surface: Links manager (#page-links) + service picker + link dialog
   (owned by dashboard-core; markup from app.js NovaLinks, dialog from studio.js)
   Owns: .links-page, #linkList.link-list > li.link-row (.link-drag, .link-tile,
   .link-main, .link-mode, .link-clicks, .link-switch, .link-actions, .link-more,
   .is-hidden, .is-dragging, .is-grabbed), .link-row-placeholder, .links-empty,
   .links-composer (r174: .composer-chips > .composer-chip, .composer-form, .composer-url,
   .composer-detect, .composer-title, .composer-add, .composer-hint), .links-yours(-head),
   .link-row.is-new, .link-menu,
   #actionDialog.service-picker (.picker-search, .picker-cats, .picker-section,
   .picker-grid > .picker-tile, .picker-custom, .picker-empty),
   link editor dialog (.social-dialog, details.button-style, .custom-logo-upload,
   .upload-preview, .rights-confirm),
   .brand-tile (shared monochrome-on-tint brand icon; --brand / --glyph set inline).
   ========================================================================== */

@layer surfaces {
  /* ---- Brand tile: monochrome glyph on a surface step; the service's own colour only on hover/selection
     (it names the service, so it is content, not chrome). Radius by size: a quarter of the tile
     (24 → 6, 32 → 8, 40 → 10). -------- */
  .brand-tile {
    --tile: 40px;
    --brand: var(--nv-text-2);
    position: relative;
    display: grid;
    flex: none;
    place-items: center;
    width: var(--tile);
    height: var(--tile);
    overflow: hidden;
    border: 1px solid var(--nv-line);
    border-radius: calc(var(--tile) / 4);
    background: var(--nv-surface-2);
    color: var(--nv-text-2);
    transition: color var(--nv-dur-1) var(--nv-ease), background-color var(--nv-dur-1) var(--nv-ease), border-color var(--nv-dur-1) var(--nv-ease);
  }

  .brand-glyph {
    display: block;
    width: 46%;
    height: 46%;
    background: currentColor;
    -webkit-mask: var(--glyph) center / contain no-repeat;
    mask: var(--glyph) center / contain no-repeat;
  }

  .brand-tile > .nv-icon {
    width: 46%;
    height: 46%;
  }

  .brand-tile > b {
    font-size: calc(var(--tile) * .42);
    line-height: 1;
  }

  .brand-tile.is-image {
    background: var(--nv-surface-3);
  }

  .brand-tile.is-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  :is(.link-row, .picker-tile, .quick-tile, .rank-row):is(:hover, :focus-visible, :focus-within) .brand-tile:not(.is-image) {
    border-color: color-mix(in srgb, var(--brand) 42%, transparent);
    background: color-mix(in srgb, var(--brand) 14%, var(--nv-surface-2));
    color: var(--brand);
  }

  /* ---- Page ------------------------------------------------------------------ */
  .app-shell .page.links-page.active {
    display: grid;
    gap: var(--nv-space-5);
  }

  .links-page > .page-header {
    margin-bottom: 0;
  }

  /* The «6 / 50» count is quiet mono meta, not a chip. */
  .links-page .page-header-actions .chip {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--nv-text-3);
    font-family: var(--nv-font-mono);
    font-size: var(--nv-fs-13);
    font-weight: var(--nv-fw-regular);
    font-variant-numeric: tabular-nums;
  }

  .link-list {
    display: grid;
    gap: var(--nv-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .link-row {
    display: flex;
    align-items: center;
    gap: var(--nv-space-3);
    min-height: 64px;
    padding: var(--nv-space-2) var(--nv-space-3) var(--nv-space-2) var(--nv-space-1);
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-r-md);
    background: var(--nv-surface-1);
    transition: border-color var(--nv-dur-1) var(--nv-ease), opacity var(--nv-dur-2) var(--nv-ease);
  }

  .link-row:hover {
    border-color: var(--nv-line-strong);
  }

  .link-row.is-hidden .link-main b {
    color: var(--nv-text-3);
  }

  .link-row.is-hidden .link-tile {
    opacity: .5;
    filter: grayscale(1);
  }

  .link-drag {
    display: grid;
    flex: none;
    place-items: center;
    width: 28px;
    height: 44px;
    border-radius: var(--nv-r-xs);
    color: var(--nv-text-3);
    cursor: grab;
    touch-action: none;
  }

  .link-drag:hover {
    background: var(--nv-surface-2);
    color: var(--nv-text);
  }

  .link-drag .nv-icon {
    width: 18px;
    height: 18px;
  }

  .link-main {
    display: grid;
    flex: 1;
    gap: 2px;
    min-width: 0;
    cursor: pointer;
  }

  .link-main b {
    overflow: hidden;
    color: var(--nv-text);
    font-size: var(--nv-fs-14);
    font-weight: var(--nv-fw-semibold);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .link-main small {
    overflow: hidden;
    color: var(--nv-text-3);
    font-family: var(--nv-font-mono);
    font-size: var(--nv-fs-12);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .link-mode {
    flex: none;
  }

  /* r166 (K1): «Скрыта» chip — phones only (desktop keeps the switch as the state). */
  .link-hidden-chip {
    display: none;
  }

  /* Clicks are quiet meta: a muted icon, the figure in mono, the word muted. */
  .link-clicks {
    display: inline-flex;
    flex: none;
    align-items: baseline;
    gap: var(--nv-space-1);
    min-width: 88px;
    color: var(--nv-text-3);
    font-size: var(--nv-fs-12);
  }

  .link-clicks .nv-icon {
    align-self: center;
    width: 16px;
    height: 16px;
  }

  .link-clicks b {
    color: var(--nv-text-2);
    font-family: var(--nv-font-figure);
    font-size: var(--nv-fs-13);
    font-weight: var(--nv-fw-medium);
    font-variant-numeric: tabular-nums;
  }

  .link-switch {
    display: grid;
    flex: none;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
  }

  /* «Shown» uses the one «on» switch of components.css (light ramp track, dark knob); a hidden row is dimmed by
     .is-hidden. */

  .link-actions {
    display: flex;
    flex: none;
    gap: 2px;
  }

  .link-actions .icon-btn,
  .link-more {
    --btn-h: 32px;
  }

  .link-actions .icon-btn .nv-icon,
  .link-more .nv-icon {
    width: 16px;
    height: 16px;
  }

  .link-actions .danger-icon:hover {
    background: var(--nv-danger-soft);
    color: var(--nv-danger);
  }

  .link-more {
    display: none;
  }

  /* The row in the hand floats: one soft neutral shadow and an accent hairline. */
  .link-row.is-dragging {
    position: fixed;
    z-index: var(--nv-z-overlay);
    margin: 0;
    border-color: var(--nv-accent-line);
    background: var(--nv-surface-2);
    box-shadow: var(--nv-shadow-3);
    pointer-events: none;
    transform: scale(1.015);
  }

  .link-row.is-dragging .link-drag {
    color: var(--nv-accent-text);
  }

  /* Where the row will land: a dashed outline, no tint. */
  .link-row-placeholder {
    border: 1px dashed var(--nv-accent-line);
    border-radius: var(--nv-r-md);
    background: transparent;
  }

  .link-row.is-grabbed {
    border-color: var(--nv-accent);
    box-shadow: 0 0 0 1px var(--nv-accent);
  }

  .link-row.is-grabbed .link-drag {
    background: var(--nv-accent-soft);
    color: var(--nv-accent-text);
  }

  .links-empty {
    min-height: 260px;
  }

  .links-empty .empty-icon .nv-icon {
    width: 24px;
    height: 24px;
  }

  /* ---- r174: add-link composer (first block on the page) ---------------------- */
  .links-composer {
    display: grid;
    gap: var(--nv-space-3);
    min-width: 0;
  }

  .links-composer .card-head {
    margin-bottom: 0;
  }

  .links-composer .card-head > .ghost {
    flex: none;
    white-space: nowrap;
  }

  .links-composer .card-head h2 {
    font-size: var(--nv-fs-16);
  }

  .composer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--nv-space-2);
  }

  /* A toggle chip (control radius, 36px like a nav row) holding a 28px brand tile 4px in (1px border + 3px
     padding, which centres it): the tile's corners are 10 − 4 = 6. Touch screens: 44px with a 36px tile (below). */
  .composer-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--nv-space-2);
    min-height: 36px;
    padding: 3px var(--nv-space-3) 3px 3px;
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-r-control);
    background: var(--nv-surface-2);
    color: var(--nv-text-2);
    font-size: var(--nv-fs-13);
    font-weight: var(--nv-fw-medium);
    white-space: nowrap;
    transition: border-color var(--nv-dur-1) var(--nv-ease), background-color var(--nv-dur-1) var(--nv-ease), color var(--nv-dur-1) var(--nv-ease);
  }

  .composer-chip:hover {
    border-color: var(--nv-line-strong);
    background: var(--nv-surface-3);
    color: var(--nv-text);
  }

  .composer-chip[aria-pressed="true"] {
    border-color: var(--nv-accent-line);
    background: var(--nv-accent-soft);
    color: var(--nv-text);
  }

  .composer-chip .brand-tile {
    --tile: 28px;
    border-radius: calc(var(--nv-r-control) - 4px);
  }

  .composer-chip[aria-pressed="true"] .brand-tile:not(.is-image) {
    border-color: color-mix(in srgb, var(--brand) 42%, transparent);
    background: color-mix(in srgb, var(--brand) 14%, var(--nv-surface-2));
    color: var(--brand);
  }

  .composer-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 260px) auto;
    gap: var(--nv-space-2);
    align-items: center;
    min-width: 0;
  }

  .composer-url > input,
  .composer-title > input {
    min-width: 0;
  }

  .composer-url:has(input[aria-invalid="true"]) {
    border-color: var(--nv-danger);
  }

  .composer-detect {
    display: grid;
    flex: none;
    place-items: center;
  }

  /* The detected service fills the large field's content box like the «Название» prefix (1px border + 4px
     padding all round, no rim of its own): corners 10 − 4 = 6, the same as that prefix. */
  .composer-detect .brand-tile {
    --tile: calc(var(--nv-h-lg) - 10px);
    border-color: transparent;
    border-radius: calc(var(--nv-r-control) - 4px);
  }

  .composer-detect .brand-tile:not(.is-generic, .is-image) {
    border-color: color-mix(in srgb, var(--brand) 42%, transparent);
    background: color-mix(in srgb, var(--brand) 14%, var(--nv-surface-2));
    color: var(--brand);
  }

  /* «Название» is a label, not an address: sans, and the large field's nested corners (10 − 4). */
  .composer-title > .input-prefix {
    font-family: var(--nv-font-sans);
    font-size: var(--nv-fs-12);
  }

  .composer-title > input {
    font-family: var(--nv-font-sans);
  }

  .composer-add {
    min-height: var(--nv-h-lg);
    padding-inline: var(--nv-space-5);
  }

  .composer-hint {
    grid-column: 1 / -1;
    min-height: 1.4em;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--nv-text-3);
    font-size: var(--nv-fs-12);
  }

  .composer-hint[data-tone="success"] {
    color: var(--nv-success);
  }

  .composer-hint[data-tone="error"] {
    color: var(--nv-danger);
  }

  .composer-hint[data-tone="warning"] {
    color: var(--nv-warning);
  }

  /* «Ваши ссылки» heading + the row that was just added or moved */
  .links-yours {
    display: grid;
    gap: var(--nv-space-3);
    min-width: 0;
  }

  .links-yours-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px var(--nv-space-3);
  }

  .links-yours-head h2 {
    margin: 0;
    font-size: var(--nv-fs-16);
  }

  .links-yours-head span {
    color: var(--nv-text-3);
    font-size: var(--nv-fs-12);
  }

  /* Scrolling a row or the composer into view (new row, ↑/↓, «К полю добавления») keeps it clear of the
     sticky top bar and the phone tab bar (--nv-tabbar-h is 0 on desktop). */
  .link-row,
  .link-row :is(button, input),
  .links-composer :is(button, input) {
    scroll-margin-top: calc(var(--nv-topbar-h, 56px) + var(--nv-space-3));
    scroll-margin-bottom: calc(var(--nv-tabbar-h, 0px) + var(--nv-space-3));
  }

  /* The row that was just added or moved: its hairline turns accent for a moment, then settles (no tint). */
  .link-row.is-new {
    animation: link-row-new 2.2s var(--nv-ease);
  }

  @keyframes link-row-new {
    0%, 35% {
      border-color: var(--nv-accent);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .link-row.is-new {
      animation: none;
      border-color: var(--nv-accent-line);
    }
  }

  /* ---- Service picker dialog ------------------------------------------------- */
  #actionDialog.service-picker {
    --dialog-w: 760px;
  }

  .service-picker .dialog-body {
    gap: var(--nv-space-4);
  }

  .picker-search {
    min-height: var(--nv-h-lg);
  }

  .picker-search .input-prefix {
    background: transparent;
  }

  .picker-search .input-prefix .nv-icon {
    width: 18px;
    height: 18px;
    color: var(--nv-text-3);
  }

  .picker-search input {
    font-family: var(--nv-font-sans);
    font-size: var(--nv-fs-16);
  }

  .picker-cats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--nv-space-2);
  }

  .picker-section {
    display: grid;
    gap: var(--nv-space-2);
  }

  .picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: var(--nv-space-2);
  }

  .picker-tile {
    display: flex;
    align-items: center;
    gap: var(--nv-space-3);
    min-height: 56px;
    padding: var(--nv-space-2) var(--nv-space-3) var(--nv-space-2) var(--nv-space-2);
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-r-md);
    background: var(--nv-surface-2);
    text-align: left;
    transition: border-color var(--nv-dur-1) var(--nv-ease), background-color var(--nv-dur-1) var(--nv-ease);
  }

  .picker-tile:hover,
  .picker-tile:focus-visible {
    border-color: var(--nv-line-strong);
    background: var(--nv-surface-3);
  }

  .picker-tile .brand-tile {
    --tile: 36px;
  }

  .picker-tile > span:last-child {
    display: grid;
    min-width: 0;
  }

  .picker-tile b {
    overflow: hidden;
    color: var(--nv-text);
    font-size: var(--nv-fs-14);
    font-weight: var(--nv-fw-semibold);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .picker-tile small {
    color: var(--nv-text-3);
    font-size: var(--nv-fs-12);
  }

  .picker-empty {
    grid-column: 1 / -1;
    padding: var(--nv-space-6);
    border: 1px dashed var(--nv-line);
    border-radius: var(--nv-r-md);
    color: var(--nv-text-2);
    text-align: center;
  }

  /* «Свой URL»: a dashed neutral row (an open slot), the icons in the muted role; hover is a surface step. */
  .picker-custom {
    display: flex;
    align-items: center;
    gap: var(--nv-space-3);
    width: 100%;
    min-height: 60px;
    padding: var(--nv-space-2) var(--nv-space-4) var(--nv-space-2) var(--nv-space-2);
    border: 1px dashed var(--nv-line-strong);
    border-radius: var(--nv-r-md);
    background: var(--nv-surface-2);
    color: var(--nv-text);
    text-align: left;
    transition: border-color var(--nv-dur-1) var(--nv-ease), background-color var(--nv-dur-1) var(--nv-ease);
  }

  .picker-custom:hover {
    border-color: var(--nv-field-line-hover);
    background: var(--nv-surface-3);
  }

  .picker-custom > span:nth-child(2) {
    display: grid;
    flex: 1;
  }

  .picker-custom small {
    color: var(--nv-text-3);
  }

  .picker-custom > .nv-icon {
    width: 18px;
    height: 18px;
    color: var(--nv-text-3);
  }

  /* ---- Link editor dialog (studio.js openLinkEditor) ------------------------- */
  .social-dialog {
    display: grid;
    gap: var(--nv-space-4);
  }

  .social-dialog > label {
    display: grid;
    gap: var(--nv-space-2);
    color: var(--nv-text-2);
    font-size: var(--nv-fs-13);
    font-weight: var(--nv-fw-medium);
  }

  .social-dialog #studioLinkHint {
    margin-top: calc(var(--nv-space-3) * -1);
    color: var(--nv-text-3);
    font-family: var(--nv-font-mono);
  }

  /* One 12px step between the summary and each control (the margins alone: no grid gap on top of them). */
  .social-dialog details.button-style {
    display: grid;
    padding: var(--nv-space-3) var(--nv-space-4);
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-r-md);
    background: var(--nv-surface-2);
  }

  .social-dialog details.button-style[open] {
    padding-bottom: var(--nv-space-4);
  }

  /* The app's disclosure: the label left, a drawn chevron right (no ▼ marker). */
  .social-dialog details.button-style > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--nv-space-3);
    min-height: 32px;
    color: var(--nv-text);
    font-weight: var(--nv-fw-medium);
    list-style: none;
  }

  .social-dialog details.button-style > summary::-webkit-details-marker {
    display: none;
  }

  .social-dialog details.button-style > summary::after {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin-right: var(--nv-space-1);
    border-right: 2px solid var(--nv-text-3);
    border-bottom: 2px solid var(--nv-text-3);
    transform: translateY(-2px) rotate(45deg);
    transition: transform var(--nv-dur-2) var(--nv-ease);
  }

  .social-dialog details.button-style[open] > summary::after {
    transform: translateY(2px) rotate(-135deg);
  }

  .social-dialog details.button-style > :not(summary) {
    margin-top: var(--nv-space-3);
  }

  .social-dialog .editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--nv-space-3);
  }

  .social-dialog .editor-grid > label {
    display: grid;
    gap: var(--nv-space-2);
    color: var(--nv-text-2);
    font-size: var(--nv-fs-13);
    font-weight: var(--nv-fw-medium);
  }

  /* An upload slot: dashed hairline; hover is a stronger line and a surface step (no orange tint). */
  .custom-logo-upload {
    display: flex;
    align-items: center;
    gap: var(--nv-space-3);
    padding: var(--nv-space-3);
    border: 1px dashed var(--nv-line-strong);
    border-radius: var(--nv-r-md);
    cursor: pointer;
    transition: border-color var(--nv-dur-1) var(--nv-ease), background-color var(--nv-dur-1) var(--nv-ease);
  }

  .custom-logo-upload:hover {
    border-color: var(--nv-field-line-hover);
    background: var(--nv-surface-3);
  }

  .custom-logo-upload > span:last-child {
    display: grid;
  }

  .custom-logo-upload small {
    color: var(--nv-text-3);
  }

  .upload-preview {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border-radius: var(--nv-r-sm);
    background: var(--nv-surface-3);
    color: var(--nv-text-2);
    font-size: 20px;
  }

  .upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* The service glyph tile (app.js linkIcon) fills the preview box. */
  .upload-preview > .brand-tile {
    --tile: 44px;
    border: 0;
    background: transparent;
  }

  .rights-confirm {
    display: flex;
    align-items: flex-start;
    gap: var(--nv-space-3);
    color: var(--nv-text-2);
    font-size: var(--nv-fs-13);
    line-height: var(--nv-lh-ui);
    cursor: pointer;
  }

  .rights-confirm input {
    margin-top: 1px;
  }

  .rights-confirm small {
    display: block;
    color: var(--nv-text-3);
  }

  /* ---- Responsive ------------------------------------------------------------ */
  @media (max-width: 760px) {
    .link-clicks,
    .link-mode {
      display: none;
    }
  }

  @media (max-width: 640px) {
    .link-actions {
      display: none;
    }

    .link-more {
      display: inline-flex;
      --btn-h: 44px;
    }

    .link-row {
      gap: var(--nv-space-2);
      padding-right: var(--nv-space-1);
    }

    .link-tile {
      --tile: 36px;
    }

    .picker-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .picker-cats {
      flex-wrap: nowrap;
      margin: 0 calc(var(--nv-space-5) * -1);
      padding: 0 var(--nv-space-5);
      overflow-x: auto;
      scrollbar-width: none;
    }

    .picker-cats .chip {
      flex: none;
    }

    /* r174: phones stack the composer (URL, title, full-width «Добавить»); chips scroll sideways. */
    .composer-form {
      grid-template-columns: minmax(0, 1fr);
    }

    .composer-add {
      width: 100%;
    }

    /* r181: the row scrolls under the card's padding (edge to edge inside the card), so a chip scrolled into
       view is never cut at the content edge. */
    .composer-chips {
      flex-wrap: nowrap;
      margin-inline: calc(var(--nv-space-5) * -1);
      padding: 2px var(--nv-space-5);
      scroll-padding-inline: var(--nv-space-5);
      overflow-x: auto;
      scrollbar-width: none;
      overscroll-behavior-x: contain;
    }

    .composer-chips::-webkit-scrollbar {
      display: none;
    }

    .composer-chip {
      flex: none;
    }

    .social-dialog .editor-grid {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  /* ---- Phones: compact + calm (r160) --------------------------------------------
     Shorter rows, quick-add four across, picker tiles tighter. */
  @media (max-width: 640px) {
    .app-shell .page.links-page.active {
      gap: var(--nv-space-3);
    }

    .link-row {
      gap: var(--nv-space-2);
      min-height: 56px;
      padding-block: var(--nv-space-1);
    }

    .link-main small {
      font-size: var(--nv-fs-12);
    }

    /* r166 (K1): six orange switches were the loudest column on the page. On phones visibility lives
       in the row «…» menu («Скрыть со страницы»); a hidden link is dimmed and says «Скрыта». */
    .link-switch {
      display: none;
    }

    .link-hidden-chip {
      display: inline-flex;
      flex: none;
    }

    .link-row.is-hidden :is(.link-tile, .link-main) {
      opacity: .55;
    }

    .link-row.is-grabbed {
      box-shadow: 0 0 0 1px var(--nv-accent-line);
    }

    .links-empty {
      min-height: 0;
    }

    .links-composer {
      gap: var(--nv-space-2);
    }

    .links-composer .card-head span {
      font-size: var(--nv-fs-12);
    }

    /* r180: «Все сервисы» moves under the heading, so the text keeps the full width (beside the button it
       wrapped into a narrow column and pushed the URL field down). */
    .links-composer .card-head {
      flex-wrap: wrap;
    }

    .links-composer .card-head > div {
      flex: 1 1 100%;
    }

    .service-picker .dialog-body {
      gap: var(--nv-space-3);
    }

    .picker-search {
      min-height: var(--nv-hit);
    }

    .picker-cats {
      margin-inline: calc(var(--dialog-pad, var(--nv-space-5)) * -1);
      padding-inline: var(--dialog-pad, var(--nv-space-5));
    }

    .picker-tile {
      gap: var(--nv-space-2);
      min-height: 52px;
      padding: var(--nv-space-2);
    }

    .picker-tile .brand-tile {
      --tile: 32px;
    }

    .picker-tile b {
      font-size: var(--nv-fs-13);
    }

    /* r166 (K4): the category chips above already group the services. */
    .picker-tile small {
      display: none;
    }

    .picker-custom {
      min-height: 52px;
    }

    .social-dialog {
      gap: var(--nv-space-3);
    }
  }

  /* r180: a touch screen wider than a phone (landscape, tablet) keeps the row buttons at a full touch size; the
     34px above beat the components.css touch rule. */
  @media (pointer: coarse) {
    .link-actions .icon-btn,
    .link-more {
      --btn-h: var(--nv-hit);
    }

    /* r181: composer chips are full 44px targets on every touch screen; the tile grows to 36 so it stays
       4px in (corners stay 6). */
    .composer-chip {
      min-height: var(--nv-hit);
    }

    .composer-chip .brand-tile {
      --tile: 36px;
    }
  }
}
