/* ---------- the bar and the overlay: one for both pages, so going between them only changes what's under them ---------- */
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (hover: hover) { .hov:hover { color: var(--ink); background: var(--hover); } }
.brand-line { display: flex; align-items: center; gap: .5em; margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; pointer-events: none; }
/* a button: a word in an outline */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
/* a move: the same outline wherever one is written out, in the overlay and in the guide */
.mv { display: grid; place-items: center; min-width: 38px; height: 34px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap; }
@media (hover: hover) { .btn:hover { background: var(--hover); } }
.sq { pointer-events: auto; display: grid; place-items: center; width: 38px; height: 38px; margin: -10px -5px -10px -10px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
/* a chevron, the way to the other page: the same on both, pointing where it goes */
.chev { pointer-events: auto; display: grid; place-items: center; width: 44px; height: 44px; margin: -12px -13px; border-radius: 50%; color: var(--ink); text-decoration: none; }
.chev svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s cubic-bezier(.32, .72, 0, 1); }
.chev.fwd { margin-left: auto; }
.chev.fwd svg { transform: rotate(180deg); }
@media (hover: hover) { .chev:hover { background: var(--hover); } .chev:hover svg { transform: translateX(-2px); } .chev.fwd:hover svg { transform: rotate(180deg) translateX(-2px); } }
.sq span { width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 3.6px; transition: background-color .35s ease, transform .4s cubic-bezier(.32, .72, 0, 1); }
.panel { --pad: 22px; position: fixed; z-index: 7; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 64px); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--panel-edge); border-radius: 28px; background: var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .28); color: var(--ink);
  opacity: 0; transform: translateY(28px); transition: opacity .32s ease, transform .42s cubic-bezier(.32, .72, 0, 1), background-color .3s ease; }
.panel.in { opacity: 1; transform: none; }
.view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.p-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px var(--pad) 28px; }
.grow { flex: 1 1 auto; }
.p-icons { flex: 0 0 auto; display: flex; gap: 4px; }
.p-back svg, .p-icon svg { grid-area: 1 / 1; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .25s, transform .4s cubic-bezier(.32, .72, 0, 1); }
.theme-btn .i-sun { opacity: 0; transform: rotate(-60deg) scale(.7); }
:root[data-theme="dark"] .theme-btn .i-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-btn .i-moon { opacity: 0; transform: rotate(60deg) scale(.7); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { opacity: 0; transform: rotate(60deg) scale(.7); }
}
@media (min-width: 900px), (hover: hover) and (pointer: fine) and (min-width: 520px) {
  .panel { --pad: clamp(22px, 3.2vw, 32px); left: auto; right: clamp(14px, 3vw, 30px); top: calc(env(safe-area-inset-top, 0px) + clamp(14px, 2.8vw, 28px)); bottom: clamp(14px, 3vw, 30px); width: clamp(300px, 38vw, 450px); height: auto; transform: translateX(32px); overflow: visible; }
  .panel.in { transform: none; }
  .view { overflow: hidden; border-radius: 28px; }
  .p-head { min-height: 76px; padding: 24px 22px 12px 18px; }
  .p-body { padding: 8px var(--pad) 32px; }
}
/* going between the cube and the guide: the bar stays where it is, the rest crossfades (where the browser can) */
@view-transition { navigation: auto; }
.brand-line { view-transition-name: bar; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } .panel { transition-duration: .01ms; } }
