/* Toli & Me bottom dock (2026-11-15): resting row of five (~64pt + safe area), "Your apps" sheet of ten, a floating pill
   while scrolling down. Colours and sizes come from tokens.css. Phones only (the desktop side rail keeps its own layout). */
.dk-tile { position: relative; display: grid; place-items: center; flex: none; width: var(--dock-tile); height: var(--dock-tile); border-radius: 30%; background: var(--tile); color: #fff;
  transition: box-shadow .15s; }
@supports (corner-shape: squircle) { .dk-tile { corner-shape: squircle; border-radius: 34%; } }
.dk-tile .cp-ic { width: var(--dock-sym); height: var(--dock-sym); }
.dk-badge { position: absolute !important; top: -5px !important; right: -7px !important; left: auto !important; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px;
  background: var(--dock-badge) !important; color: #fff !important; font: 700 10px/13px Inter, -apple-system, system-ui, sans-serif !important; text-align: center; border: 1.5px solid #fff; font-style: normal; }
.dk-badge[hidden] { display: none !important; }
.dk-head { display: none; }

@media (max-width: 1023px) {
  html body nav[data-dock][data-dock] { position: fixed; left: 0; right: 0; bottom: 0; top: auto; transform: none; width: auto; z-index: 20;
    display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; column-gap: 0; row-gap: 12px; height: auto !important; min-height: 0 !important; align-content: start;
    padding: 8px 10px calc(3px + env(safe-area-inset-bottom, 0px)) !important; margin: 0; border: 0 !important; border-radius: 0 !important;
    background: var(--dock-bg) !important; -webkit-backdrop-filter: blur(var(--dock-blur)); backdrop-filter: blur(var(--dock-blur));
    box-shadow: inset 0 .5px 0 var(--dock-hairline) !important; font-family: Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    transition: none; will-change: transform, opacity; backface-visibility: hidden; -webkit-backface-visibility: hidden; }  /* shape changes in one frame; dock.js animates only transform + opacity (smooth on phones) */
  html body nav[data-dock][data-dock] [data-key] { position: relative; display: flex !important; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px !important;
    min-width: 44px; min-height: 44px; padding: 0 !important; margin: 0; background: none !important; border: 0; border-radius: 0 !important; outline: none;
    font: 500 var(--dock-label-size)/1.2 Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif !important; color: var(--dock-label) !important; text-decoration: none;
    overflow: visible !important; white-space: nowrap; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
  html body nav[data-dock][data-dock] [data-key] > svg, html body nav[data-dock][data-dock] [data-key] > i:not(.dk-badge) { display: none !important; }  /* the old glyphs, until the dock builds */
  html body nav[data-dock][data-dock] [data-key] .dk-lb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  html body nav[data-dock][data-dock] [data-key].on, html body nav[data-dock][data-dock] [data-key][aria-current] { color: var(--dock-label-on) !important; font-weight: 600 !important; }
  html body nav[data-dock][data-dock] [data-key].on .dk-tile, html body nav[data-dock][data-dock] [data-key][aria-current] .dk-tile { box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px color-mix(in srgb, var(--tile) 45%, transparent); }
  html body nav[data-dock][data-dock] [data-key]:focus-visible .dk-tile { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tile); }
  html body nav[data-dock][data-dock] [data-key]::before, html body nav[data-dock][data-dock] [data-key]::after { content: none !important; display: none !important; }
  html body nav[data-dock][data-dock] .r2 { display: none !important; }
  html body nav[data-dock][data-dock] .tb-grab { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 64px; height: 9px; display: grid !important; place-items: center; background: none; cursor: pointer; }
  html body nav[data-dock][data-dock] .tb-grab i { display: block; width: 32px; height: 4px; border-radius: 2px; background: var(--dock-grabber) !important; }
  html body nav[data-dock][data-dock] .tb-editb, html body nav[data-dock][data-dock] .tb-ebar { display: none !important; }
  html body nav[data-dock][data-dock] .fab { top: -70px !important; }

  /* the sheet: all ten, 5×2, "Your apps" · Hold to reorder */
  html body nav[data-dock][data-dock].open { border-radius: 22px 22px 0 0 !important; padding: 12px 10px calc(10px + env(safe-area-inset-bottom, 0px)) !important; row-gap: 10px;
    box-shadow: inset 0 .5px 0 var(--dock-hairline), 0 -12px 32px -18px rgba(23,22,28,.25) !important; }
  html body nav[data-dock][data-dock].open .r2 { display: flex !important; animation: dkIn .22s ease-out both; }
  html body nav[data-dock][data-dock].open .dk-head { display: flex; grid-column: 1 / -1; order: -1; align-items: baseline; justify-content: space-between; padding: 6px 10px 0; }
  .dk-head b { font: 700 17px Inter, -apple-system, system-ui, sans-serif; color: var(--dock-label-on); letter-spacing: -.2px; }
  .dk-head span { font: 500 12.5px Inter, -apple-system, system-ui, sans-serif; color: var(--dock-label); }
  .dk-head button { display: none; height: 30px; padding: 0 14px; border: 0; border-radius: 15px; background: var(--dock-label-on); color: #fff; font: 700 13px Inter, -apple-system, system-ui, sans-serif; }
  html body nav[data-dock][data-dock] .dk-head button { display: none !important; }
  html body nav[data-dock][data-dock].editing .dk-head span { display: none; } html body nav[data-dock][data-dock].editing .dk-head button { display: block !important; width: auto !important; min-width: 68px; height: 30px !important; padding: 0 16px !important; border-radius: 15px !important; background: var(--dock-label-on) !important; color: #fff !important; font: 700 13px/30px Inter, -apple-system, system-ui, sans-serif !important; }
  html body nav[data-dock][data-dock].open [data-key] .dk-tile { width: var(--sheet-tile); height: var(--sheet-tile); }
  html body nav[data-dock][data-dock].open [data-key] { font-size: var(--sheet-label-size) !important; }
  html body nav[data-dock][data-dock].open .fab { display: none !important; }

  /* reorder: tiles wiggle, drag (or tap one, then another) to swap */
  html body nav[data-dock][data-dock].editing [data-key] { animation: dkJig .26s ease-in-out infinite alternate; touch-action: none; }
  html body nav[data-dock][data-dock].editing [data-key]:nth-child(odd) { animation-delay: -.13s; }
  html body nav[data-dock][data-dock] [data-key].pick .dk-tile, html body nav[data-dock][data-dock] [data-key].over .dk-tile { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tile); }

  /* the floating pill while scrolling down */
  html body nav[data-dock][data-dock].pill { left: 50%; right: auto; bottom: calc(var(--pill-bottom) + env(safe-area-inset-bottom, 0px)); transform: translate3d(-50%,0,0); width: auto;
    grid-template-columns: repeat(4, 48px) !important; height: var(--pill-h) !important; align-items: center; padding: 0 8px !important; border-radius: 999px !important; row-gap: 0;
    box-shadow: inset 0 0 0 .5px var(--dock-hairline), 0 10px 30px -12px rgba(23,22,28,.35) !important; }
  html body nav[data-dock][data-dock].pill [data-key] { min-height: 44px; justify-content: center; gap: 0 !important; }
  html body nav[data-dock][data-dock].pill .dk-lb, html body nav[data-dock][data-dock].pill .tb-grab, html body nav[data-dock][data-dock].pill .fab { display: none !important; }
  html body nav[data-dock][data-dock].pill .dk-tile { width: var(--pill-tile); height: var(--pill-tile); }
  html body nav[data-dock][data-dock].pill .dk-tile .cp-ic { width: var(--pill-sym); height: var(--pill-sym); }
  html body nav[data-dock][data-dock].pill .dk-badge { min-width: 8px; width: 8px; height: 8px; padding: 0; top: -2px !important; right: -2px !important; font-size: 0 !important; border-width: 1.5px; }
  html body nav[data-dock][data-dock].pill [data-key].on .dk-tile { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px color-mix(in srgb, var(--tile) 45%, transparent); }

  html body .app { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)) !important; }
  html body.tb-open .app { padding-bottom: calc(260px + env(safe-area-inset-bottom, 0px)) !important; }
  /* Talk runs to the bottom of the screen and the dock floats over it: the page behind can never show through (2026-11-15) */
  html body.clik-open.ck-list #clik { bottom: 0 !important; padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important; box-sizing: border-box; overscroll-behavior: contain; }
  html body.clik-open.ck-list.tb-open #clik { padding-bottom: calc(200px + env(safe-area-inset-bottom, 0px)) !important; }
}
@keyframes dkIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dkJig { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
@media (prefers-reduced-motion: reduce) {
  html body nav[data-dock][data-dock].editing [data-key] { animation: none !important; }
  html body nav[data-dock][data-dock].open .r2 { animation: none !important; }
}
/* desktop side rail: the new icons at a rail size */
@media (min-width: 1024px) { [data-dock] .dk-tile { --dock-tile: 30px; --dock-sym: 17px; } [data-dock] [data-key] .dk-lb { font-weight: inherit; } [data-dock] .dk-badge { top: -6px !important; right: -6px !important; } }
/* the product icons keep their own colours whatever a page's older styles say */
html body nav[data-dock][data-dock] .cp-ic path { fill: none !important; stroke: #fff !important; stroke-width: 2px !important; }
html body nav[data-dock][data-dock] .cp-ic circle { fill: #fff !important; stroke: none !important; }
/* where the page hides the dock (the front page, onboarding), it stays hidden */
html body nav[data-dock][data-dock].hidden { display: none !important; }
@media (max-width: 1023px) {
  /* Talk's New button sits above the dock; while Talk is open, Talk is the current app */
  html body.clik-open.ck-list #clik .fab2 { bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important; }
  html body.clik-open.ck-list.tb-open #clik .fab2 { bottom: calc(216px + env(safe-area-inset-bottom, 0px)) !important; }
  html body.clik-open nav[data-dock][data-dock] [data-key].on .dk-tile { box-shadow: none; }
  html body.clik-open nav[data-dock][data-dock] [data-key].on { color: var(--dock-label) !important; font-weight: 500 !important; }
  html body.clik-open nav[data-dock][data-dock] [data-key="talkin"] { color: var(--dock-label-on) !important; font-weight: 600 !important; }
  html body.clik-open nav[data-dock][data-dock] [data-key="talkin"] .dk-tile { box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px color-mix(in srgb, var(--tile) 45%, transparent); }
}
/* the tile being dragged: lifted above the others, no wiggle */
html body nav[data-dock][data-dock] [data-key].drag { z-index: 5; animation: none !important; transition: none !important; will-change: transform; }
html body nav[data-dock][data-dock] [data-key].drag .dk-tile { box-shadow: 0 10px 24px -8px rgba(23,22,28,.35); }
