/* ---------- chrome ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 2px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) calc(env(safe-area-inset-right, 0px) + 12px) 0 calc(env(safe-area-inset-left, 0px) + 10px);
  pointer-events: none; transition: opacity 200ms ease-out;
}
/* Breadcrumb: the brand is the root level. Ancestors are buttons, the current level is plain text.
   The 4px padding keeps focus rings inside the clipping box; the crumb padding puts the brand text at 16px. */
.crumbs { flex: 0 1 auto; min-width: 0; margin: -4px auto -4px -4px; padding: 4px; overflow: hidden; }
.crumbs ol { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: flex; align-items: center; min-width: 0; flex: 0 2 auto; }
.crumbs li:last-child { flex-shrink: 1; }
.crumbs li:first-child, .crumbs li:has(> .gap), .crumbs.measure li { flex-shrink: 0; }   /* the "…" never squeezes into its slash */
.crumbs.measure .crumb:not(.root) { max-width: 6em; }   /* a level only collapses if even a short ellipsis would not fit */
/* Last resort, when even that doesn't fit (.bare, renderCrumbs): the brand's name gives way to its mark, which stays
   whole where it was, and the open level keeps a few letters (the "…" goes too, if it must). */
.crumbs.bare .crumb.root { font-size: 0; max-width: none; text-overflow: clip; }      /* (its max-width is in em; Firefox ellipsed the mark away) */
.crumbs.bare .crumb.root > .mark { margin-right: -4px; }
.crumbs:not(.measure) li:last-child:not(:first-child) { min-width: 2.6em; }
/* The path is set in the book serif: the brand, then each board you are in. Each slash is a level down, so it is in
   the depth colour (section 25). */
.crumbs li + li::before { content: "/"; flex: none; padding: 0 1px; font: 400 16px/34px var(--f-display); color: var(--z); opacity: .78; user-select: none; -webkit-user-select: none; }
.crumb {
  display: block; min-width: 0; max-width: 14em; height: 34px; padding: 0 7px; box-sizing: border-box; border: 0; border-radius: 6px;
  font: 400 16px/34px var(--f-display); letter-spacing: -.005em; color: var(--ink-2); background: transparent; font-optical-sizing: auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: none; -webkit-user-select: none;
}
.crumb.root { font-size: 18px; font-weight: 500; letter-spacing: -.012em; }
/* The mark before the name (section 25): it takes the pointer even where the name doesn't, and turns once for it. */
.crumb.root > .mark { display: inline-block; width: 24px; height: 24px; margin: 0 6px 0 -4px; vertical-align: -6px; color: var(--ink); pointer-events: auto; }
.crumb.cur { max-width: 20em; font-weight: 500; color: var(--ink); }
.crumb.gap { position: relative; padding: 0 6px; color: var(--ink-3); }
button.crumb { pointer-events: auto; cursor: pointer; transition: background-color 120ms ease-out, color 120ms ease-out, box-shadow 120ms ease-out; }
@media (hover: hover) { button.crumb:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); } }
button.crumb:active { background: color-mix(in srgb, var(--ink) 9%, transparent); }
button.crumb:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; color: var(--ink); }
/* Back (section 9): one board up, as Esc, from a key before the path while a board is open. A raised key like the
   dock, so it reads as a button where the path reads as a name; its arrow in the depth colour, as each slash is: back
   is a level up Z. Over it, the arrow leans the way it goes. */
.crumb-back {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin-right: 8px; padding: 0; border: 0; border-radius: 8px;
  pointer-events: auto; cursor: pointer; color: var(--z);
  background: var(--glass); box-shadow: var(--glass-sh);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background-color 160ms ease-out, box-shadow 160ms ease-out;
}
.crumb-back[hidden] { display: none; }
.crumb-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6px; stroke-linecap: round; stroke-linejoin: round; transition: translate 160ms ease-out; }
@media (hover: hover) { .crumb-back:hover { background: color-mix(in srgb, var(--surface) 90%, transparent); } .crumb-back:hover svg { translate: -2px 0; } }
.crumb-back:active { background: var(--press-bg); box-shadow: var(--press); }
.crumb-back:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* What is carried, held over a crumb, goes up to that level when let go (section 17c). */
button.crumb:is(.into, .taking) { color: var(--ink); background: color-mix(in srgb, var(--ink) 9%, transparent); box-shadow: inset 0 0 0 1.5px var(--sel); }
/* While something on the canvas lies under the path, the path sits on a chip like the dock's (crumbChip), so the
   names never run into it; with nothing under it, it is the bare wordmark again. */
#crumbBg {
  position: absolute; z-index: -1; left: 0; top: 0; width: 0; height: 0; border-radius: 8px; pointer-events: none; opacity: 0;
  background: var(--glass); box-shadow: var(--glass-sh);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: opacity 160ms ease-out, width 160ms ease-out;
}
#crumbBg.on { opacity: 1; }
/* The dock holds only Guide, Axes, Night and Side view (Axio, v52): Clear and Undo are gone from it (Cmd/Ctrl+Z still
   undoes; the menu and the keyboard still delete). */
.dock > #clear, .dock > #undo { display: none !important; }
/* The bar's buttons share one raised dock; a button that is on is pressed into it. It sits at the top middle (v51),
   the path keeping clear of it (--dock-half, set from its width); on a phone it stays at the right, after the path. */
@media (min-width: 600px) {
  .bar > .dock { position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 10px); translate: -50% 0; }
  .bar > .crumbs { max-width: calc(50% - var(--dock-half, 170px) - 22px); }
  .bar > .crumb-back:not([hidden]) + .crumbs { max-width: calc(50% - var(--dock-half, 170px) - 22px - 42px); }   /* (the back key's room) */
}
/* One bar (Axio, 2026-11-04: "make everything on the top one single long bubble"): on a computer the path, the dock
   and the account's row all stand on a single long face across the top, in the floating chrome's own tone (--glass),
   where each used to be a bubble of its own. Inside it the dock, the back key and the account's buttons (.cx-in-bar,
   placed beside the dock by web/'s placePill) are flat; the path's chip is no longer needed. The face shows only while
   something on the canvas lies under it (.under, set by crumbChip); a button that is on keeps its pressed look either way. No backdrop blur on it:
   the face is nearly opaque, and a blur this wide would be redrawn on every pan. A phone keeps its own top. */
@media (min-width: 600px) {
  html:not(.pocket):not(.demo) .bar::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    left: calc(env(safe-area-inset-left, 0px) + 4px); right: calc(env(safe-area-inset-right, 0px) + 6px);
    top: calc(env(safe-area-inset-top, 0px) + 8px); height: 38px; border-radius: 11px;
    background: var(--glass); box-shadow: var(--glass-sh);
    opacity: 0; transition: opacity 160ms ease-out;     /* only while something lies under it (.under, crumbChip) */
  }
  html:not(.pocket):not(.demo) .bar.under::before { opacity: 1; }
  html:not(.pocket):not(.demo) .bar > :is(.dock, .crumb-back) { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html:not(.pocket):not(.demo) .bar > .crumb-back:active { background: var(--press-bg); box-shadow: var(--press); }
  html:not(.pocket):not(.demo) #crumbBg { display: none; }
  html:not(.pocket):not(.demo) .cx-pill.cx-in-bar .cx-acct-btn { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; transition: color 160ms ease-out, background-color 160ms ease-out; }
  html:not(.pocket):not(.demo) .cx-pill.cx-in-bar .cx-acct-btn:active { background: var(--press-bg); box-shadow: var(--press); }
}
@media (min-width: 600px) and (hover: hover) {
  html:not(.pocket):not(.demo) .bar > .crumb-back:hover, html:not(.pocket):not(.demo) .bar .btn:not([aria-pressed="true"]):hover,
  html:not(.pocket):not(.demo) .cx-pill.cx-in-bar .cx-acct-btn:hover { background: var(--glass-hov); }
}
/* The account's buttons when they float on their own (under the bar, or at the foot): the same face as the rest. */
.cx-pill .cx-acct-btn { background: var(--glass); box-shadow: var(--glass-sh); }
.dock {
  flex: none; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 8px; pointer-events: auto;
  background: var(--glass); box-shadow: var(--glass-sh);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn {
  flex: none; pointer-events: auto; height: 28px; padding: 0 9px; border: 0; border-radius: 6px;
  font: 500 12.5px/1 var(--f-ui); color: var(--ink-2); background: transparent; cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out, box-shadow 160ms ease-out;
}
.btn[aria-pressed="true"] { color: var(--ink); background: var(--press-bg); box-shadow: var(--press); }
@media (hover: hover) {
  .btn:hover { background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--ink); }
  .btn[aria-pressed="true"]:hover { background: color-mix(in srgb, var(--ink) 3%, var(--press-bg)); }
}
.btn:active { box-shadow: var(--press); background: var(--press-bg); }
.btn:focus-visible, .box:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Clear asks first (clearClick): "Clear all?" in the warning hue, over a hairline that runs out while it waits. */
#clear { position: relative; }
#clear.arm { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); box-shadow: none; }
@media (hover: hover) { #clear.arm:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); } }
#clear.arm::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: 4px; height: 1.5px; border-radius: 1px;
  background: currentColor; opacity: .5; transform-origin: left; animation: clr-run var(--clr-ms, 3200ms) linear forwards;
}
@keyframes clr-run { to { transform: scaleX(0); } }
#clear .c-s { display: none; }
@media (max-width: 480px) { #clear .c-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } #clear .c-s { display: inline; } }

#guide {   /* while it is on it stays, over whatever lies under it (Axio, 2026-10-27: "I want it to always be there") */
  position: fixed; left: 0; right: 0; width: max-content; margin-inline: auto; z-index: 10;
  /* centred by its margins, as a dialog is: no transform, so sharp on a 1x screen at any width, and the middle in every
     engine (WebKit, Safari's engine, put round() of a percentage off it) */
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: flex; gap: 2px; padding: 6px; box-sizing: border-box; max-width: calc(100% - 32px);
  border-radius: 10px; background: var(--glass); box-shadow: var(--glass-sh);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  pointer-events: none; user-select: none; -webkit-user-select: none;
  transition: opacity 200ms ease-out, visibility 0s;
}
/* A figure is pressed and dragged out, its thing with it, or pressed alone (section 5b): it takes the press, the strip
   round the figures still lets one through to the canvas. Under the pointer it takes its hue, as a drag of it does. */
#guide figure {
  margin: 0; display: grid; justify-items: center; gap: 4px; padding: 6px 8px 6px; border-radius: 7px;
  color: var(--ink-2); transition: background-color 160ms ease-out, color 160ms ease-out, box-shadow 160ms ease-out;
  pointer-events: auto; cursor: grab; touch-action: none; outline: none; -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  #guide figure:hover:not(.on) { background: color-mix(in srgb, var(--tc) 7%, transparent); color: var(--tc); }
  #guide figure:hover:not(.on) figcaption { color: color-mix(in srgb, var(--tc) 85%, var(--ink)); }
}
#guide figure:focus-visible { box-shadow: inset 0 0 0 1.5px var(--tc); color: var(--tc); }
body.placing, body.placing * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
#guide svg { display: block; width: 56px; height: 40px; }
#guide figcaption { font: 500 9.5px/13px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
#guide .g-short { display: none; }      /* "To-do" where "To-do List" has no room (a phone) */
#guide figure.on { background: color-mix(in srgb, var(--tc) 10%, var(--press-bg)); box-shadow: var(--press); color: var(--tc); }
#guide figure.on figcaption { color: color-mix(in srgb, var(--tc) 85%, var(--ink)); }
.bar.dim, #guide.dim { opacity: .15; transition-duration: 150ms; }
/* The way back (section 8b): a round chip tinted with the depth colour, its arrow in it, set by wbFrame from the middle
   toward where everything is (translate) and turned to point there (the arrow's rotate). */
#wayback {
  position: fixed; left: 0; top: 0; z-index: 10; width: 40px; height: 40px; margin: -20px 0 0 -20px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; color: var(--z);
  background: color-mix(in srgb, var(--z) 7%, var(--surface));
  box-shadow: var(--raise-sm), inset 0 0 0 1px color-mix(in srgb, var(--z) 24%, transparent);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color 140ms ease-out, scale 140ms ease-out;
}
#wayback[hidden] { display: none; }
#wayback:hover { background: color-mix(in srgb, var(--z) 13%, var(--surface)); }
#wayback:active { scale: .94; }
#wayback:focus-visible { outline: 2px solid var(--z); outline-offset: 3px; }
#wayback .wb-a, #wayback svg { display: block; width: 20px; height: 20px; }
#wayback svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
@media (pointer: coarse) { #wayback { width: 44px; height: 44px; margin: -22px 0 0 -22px; } }
@media (min-width: 601px) and (max-width: 900px) {     /* a small window: the eleven shapes a size down */
  #guide { padding: 5px; }
  #guide figure { padding: 5px 4px; gap: 3px; }
  #guide svg { width: 44px; height: 31px; }
  #guide figcaption { font-size: 8.5px; letter-spacing: .06em; }
}
@media (min-width: 601px) and (max-width: 700px) {     /* smaller still: their drawings a size further down */
  #guide figure { padding: 5px 3px; }
  #guide svg { width: 38px; height: 27px; }
}
@media (max-width: 600px) {     /* eleven shapes across a phone, their spare room shared out so the names keep apart */
  #guide { width: min(calc(100% - 24px), 460px); padding: 4px; gap: 0; }
  #guide figure { flex: 1 1 auto; padding: 5px 0 4px; }
  #guide svg { width: 30px; height: 22px; }
  #guide figcaption { font: 500 9.5px/12px var(--f-ui); letter-spacing: -.005em; text-transform: none; }
  #guide .g-long { display: none; }
  #guide .g-short { display: inline; }
}
@media (max-width: 450px) {     /* too narrow for eleven names in a row: two rows, six then five */
  #guide { width: min(calc(100% - 24px), 372px); flex-wrap: wrap; justify-content: center; }
  #guide figure { flex: 0 0 calc(100% / 6); }
}
@media (max-width: 380px) {     /* a small phone (360, 320) */
  #guide { width: calc(100% - 16px); padding: 3px; }
  #guide figure { padding: 4px 0 3px; gap: 2px; }
  #guide svg { width: 26px; height: 19px; }
  #guide figcaption { font-size: 9px; letter-spacing: -.01em; }
}


/* An open board's title (section 9, btSync): its name alone, large and centred under the bar (its top set from the
   dock and the account's pill), as Milanote shows a board's (Axio 2026-10-13). Only its words take a press: a click
   there renames the board, typed in place (btEdit), framed as a name being typed in a card is. Over the canvas it is
   bare words, as the path is; while something on the canvas lies under it, it sits on a chip like the path's
   (crumbChip), so the name never runs into it. It fades and drops in a little when a board has opened, and out while
   one opens or closes. Its chip is the name's, never there without it (Axio, 2026-11-08: the glass showed with no name
   on it): the blur only while the name is shown, and, faded out, the tile not drawn at all, since an engine can still
   draw a blur behind a tile whose opacity is 0. */
#btile {
  position: fixed; left: 50%; top: 54px; z-index: 1;
  max-width: min(560px, calc(100vw - 48px)); padding: 3px 16px; box-sizing: border-box; border-radius: 6px;
  pointer-events: none; user-select: none; -webkit-user-select: none;
  opacity: 0; visibility: hidden; translate: -50% -4px;
  transition: opacity 140ms ease-out, translate 140ms ease-out, background-color 160ms ease-out, box-shadow 160ms ease-out, visibility 0s linear 140ms;
}
#btile.on { opacity: 1; visibility: visible; translate: -50% 0; transition-duration: 220ms, 220ms, 160ms, 160ms, 0s; transition-delay: 0s; }
#btile.bt-chip { background: var(--glass); box-shadow: var(--glass-sh); }     /* (not .chip: that is the drawn type's label, preview.css, 21px high and in capitals) */
#btile.on.bt-chip { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#btile .bt-t {     /* (its line is there before it has a name: what stands under it is placed from its height, underBar) */
  display: block; min-height: 32px; max-width: 100%; font: 500 26px/32px var(--f-display); letter-spacing: -.018em; color: var(--ink); font-optical-sizing: auto;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 600px) { #btile .bt-t { min-height: 28px; font-size: 21px; line-height: 28px; letter-spacing: -.012em; } }
#btile.on .bt-t { pointer-events: auto; cursor: text; }
.cx-ro #btile .bt-t { pointer-events: none; }      /* a board shared to be looked at only (web/coordxyz-canvas.js) */
#btile.typing, #btile.typing .bt-t { user-select: text; -webkit-user-select: text; }
#btile.typing .bt-t {
  min-width: 6em; margin: 0 -6px; padding: 0 6px; border-radius: 4px; outline: none; text-overflow: clip;
  background: var(--surface); box-shadow: 0 0 0 1px var(--ink-3), 0 0 0 4px var(--halo);
}
#btile.typing .bt-t:empty::before { content: attr(data-ph); color: var(--ink-3); pointer-events: none; }
