/* ==========================================================================
   FijyOS 6 shell (D-033): side bar, Ask box, page tabs, the sheet, FF's
   panel, the phone bar, dialogs and every transition between pages.
   Mobile first. Colours, fonts and shapes come from base.css tokens; a
   theme restyles these parts, it never rebuilds them (THEMES.md).
   ========================================================================== */

:root {
  --rail-w: 0px;
  --agent-w: 400px;
  --top-h: 64px;
  --tabbar-h: 0px;
  --gutter: 16px;
  --veil: none;
  --scene-pos: center;
  --scene-motion: kenburns;
  --rail-bg: var(--bar-bg);
  --rail-text: var(--bar-text);
  --rail-pill: var(--accent);
  --rail-pill-text: var(--accent-text);
  --sheen: rgba(255, 255, 255, .14);
  --glow: color-mix(in srgb, var(--accent) 55%, transparent);
  /* motion personality (themes may change these) */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.2, .9, .25, 1.08);
  --dur: .55s;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root { --ease-spring: linear(0, .006, .025 2.8%, .101 6.1%, .539 18.9%, .721 25.3%, .849 31.5%, .937 38.1%, .968 41.8%, .991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001 85.9%, 1); }
}
@media (max-width: 899px) { :root { --tabbar-h: calc(68px + var(--safe-b)); --top-h: 58px; } }
@media (min-width: 900px) { :root { --rail-w: 92px; --gutter: 22px; } }
@media (min-width: 1280px) { :root { --rail-w: 252px; --gutter: 28px; } }

@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

html { scroll-padding-top: calc(var(--top-h) + var(--safe-t) + 60px); }
body.app, body.front-body { min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--ink); overflow-x: hidden; }
html:not(.js) .js-only { display: none !important; }

/* ---------- the scene: drawn background (ambience.js), optional picture, veil ---------- */
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--bg); contain: strict; }
.scene-pic, .scene-pic-next { position: absolute; inset: -3%; background: var(--scene-sm, none) var(--scene-pos) / cover no-repeat; transition: opacity 1.8s ease; }
@media (min-width: 900px), (min-resolution: 2dppx) and (min-width: 600px) { .scene-pic, .scene-pic-next { background-image: var(--scene-lg, var(--scene-sm, none)); } }
.scene-pic-next { opacity: 0; }
.scene[data-scene-key="none"] .scene-pic { display: none; }
.scene-art { position: absolute; inset: 0; }
.scene-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-veil { position: absolute; inset: 0; background: var(--veil), var(--scene-dim); }
.scene:not([data-scene-key="none"]) .scene-veil { background: var(--veil), var(--scene-dim-pic, rgba(0, 0, 0, .45)); }
html[data-fx="on"] .scene:not([data-scene-key="none"]) .scene-pic { animation: var(--scene-motion) 70s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07) translate3d(-1.2%, -1%, 0); } }

/* ---------- side bar ---------- */
.rail { display: none; }
@media (min-width: 900px) {
  .rail {
    position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: var(--rail-w);
    display: flex; flex-direction: column; gap: 4px;
    padding: calc(14px + var(--safe-t)) 12px 14px max(12px, var(--safe-l));
    color: var(--rail-text); background: var(--rail-bg);
    -webkit-backdrop-filter: blur(var(--bar-blur)) saturate(1.4); backdrop-filter: blur(var(--bar-blur)) saturate(1.4);
    box-shadow: var(--rail-shadow, 1px 0 0 var(--line));
    overflow-y: auto; scrollbar-width: none;
    view-transition-name: rail;
  }
}
.rail-brand { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 12px; margin-bottom: 10px; color: inherit; text-decoration: none; font-family: var(--f-display); font-size: var(--fs-3); letter-spacing: .01em; }
.rail-brand .ff-mark { width: 26px; height: auto; flex: none; color: var(--brand-ink, var(--accent)); filter: drop-shadow(0 0 calc(10px * var(--glow-a)) var(--glow)); }
.rail-brand b { font-weight: inherit; opacity: .6; }
.rail-list { display: flex; flex-direction: column; gap: 3px; }
.rail-main .rl { min-height: 54px; }
.rail-main .rl-t { font-size: var(--fs-2); }
.rail-sep { height: 1px; margin: 12px 14px; background: currentColor; opacity: .14; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 3px; padding-top: 12px; }
.rail-foot form { display: contents; }
.rl {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 46px; padding: 0 14px;
  color: inherit; text-decoration: none; font: inherit; font-size: var(--fs-1); font-weight: 600; text-align: left;
  background: none; border: 0; border-radius: var(--rail-radius, 14px); cursor: pointer; isolation: isolate;
  transition: background-color var(--t-fast);
}
.rl:visited { color: inherit; }
.rl:hover { background: color-mix(in srgb, currentColor 9%, transparent); }
.rl-ico { display: grid; place-items: center; width: 26px; height: 26px; flex: none; }
.rl-ico .ico { width: 24px; height: 24px; }
.rl-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the icon and label ride above the gliding pill during page changes (each has its own transition name) */
.rl-c { display: flex; flex-direction: inherit; align-items: center; gap: inherit; min-width: 0; max-width: 100%; }
.tbb-c { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.rl.is-on { color: var(--rail-pill-text); }
.rl-pill { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--rail-pill); box-shadow: 0 6px 22px -6px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .18); view-transition-name: rail-pill; }
.rl-badge { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--bad); color: #fff; font-size: 12px; line-height: 22px; font-weight: 700; text-align: center; }
/* compact side bar (tablets, small laptops): icons with small labels underneath */
@media (min-width: 900px) and (max-width: 1279px) {
  .rail { padding-left: 8px; padding-right: 8px; }
  .rail-brand { justify-content: center; padding: 0; }
  .rail-brand .rl-t { display: none; }
  .rl, .rail-main .rl { flex-direction: column; justify-content: center; gap: 3px; min-height: 64px; padding: 6px 2px; }
  .rl-t, .rail-main .rl-t { font-size: 11.5px; max-width: 100%; }
  .rl-badge { position: absolute; top: 4px; right: 8px; min-width: 18px; padding: 0 5px; line-height: 18px; font-size: 11px; }
  .rail-sep { margin: 8px 10px; }
}

/* ---------- the frame: top bar, tabs, sheet ---------- */
.shell-main { position: relative; z-index: 2; min-height: 100dvh; margin-left: var(--rail-w); padding: 0 max(var(--gutter), var(--safe-r)) calc(18px + var(--tabbar-h)) var(--gutter); transition: margin-right var(--dur) var(--ease-out); }
@media (min-width: 1280px) { body.agent-open .shell-main { margin-right: var(--agent-w); } }
@media (max-width: 899px) { .shell-main { padding-left: max(var(--gutter), var(--safe-l)); } }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; min-height: calc(var(--top-h) + var(--safe-t)); padding-top: var(--safe-t); margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); transition: background-color .25s, box-shadow .25s; }
body.scrolled .top { background: var(--top-bg, var(--bar-bg)); -webkit-backdrop-filter: blur(var(--bar-blur)) saturate(1.4); backdrop-filter: blur(var(--bar-blur)) saturate(1.4); box-shadow: 0 1px 0 var(--line); color: var(--bar-text); }
.top-title { flex: 1; min-width: 0; }
.top-sec { margin: 0; font-family: var(--f-display); font-weight: var(--head-weight); font-size: var(--fs-3); line-height: 1.1; color: var(--ink); text-shadow: var(--ink-shadow, none); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; view-transition-name: sec-title; }
body.scrolled .top-sec { color: inherit; text-shadow: none; }
/* (6.16.0) The owner's side bar already names the section, so the top bar doesn't say it again beside it (it stays
   for screen readers, and on phones where there is no side bar). A short row of tabs then takes the freed place
   in the top bar and stays there as the page scrolls; with Phineas's panel open there's only room on a very wide screen. */
@media (min-width: 900px) {
  body.is-owner .top-sec { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); view-transition-name: none; }
}
@media (min-width: 1340px) {
  body.is-owner.tabs-up:not(.agent-open) .tabs-row { position: sticky; top: calc((var(--top-h) - 50px) / 2); z-index: 31; margin: calc((var(--top-h) + 50px) / -2) 0 calc((var(--top-h) - 50px) / 2 + 4px); }
}
@media (min-width: 1760px) {
  body.is-owner.tabs-up.agent-open .tabs-row { position: sticky; top: calc((var(--top-h) - 50px) / 2); z-index: 31; margin: calc((var(--top-h) + 50px) / -2) 0 calc((var(--top-h) - 50px) / 2 + 4px); }
}

/* the Ask box: one place to search, jump, add and ask */
.askbox {
  position: relative; display: flex; align-items: center; gap: 10px; width: min(460px, 42vw); min-height: 46px; padding: 0 10px 0 16px;
  color: var(--surface-text); font: inherit; font-size: var(--fs-1); text-align: left;
  background: var(--askbox-bg, color-mix(in srgb, var(--surface) 88%, transparent));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 0; border-radius: 999px; cursor: text; isolation: isolate;
  box-shadow: 0 0 0 1px var(--line), 0 8px 26px -10px rgba(0, 0, 0, .35);
  view-transition-name: askbox;
}
.askbox::before { content: ""; position: absolute; inset: -1.5px; z-index: -1; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--ang), transparent 0 60%, var(--accent), var(--accent-2), transparent 95%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: 0; transition: opacity .3s; }
.askbox:hover::before, .askbox:focus-visible::before { opacity: 1; }
html[data-fx="on"] .askbox:hover::before, html[data-fx="on"] .askbox:focus-visible::before { animation: ang 2.4s linear infinite; }
@keyframes ang { to { --ang: 360deg; } }
.askbox .ico { width: 20px; height: 20px; color: var(--muted); flex: none; }
.askbox-t { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.askbox-k, .cmdk kbd { flex: none; padding: 2px 8px; border-radius: 7px; font: 600 12px/1.6 var(--f-body); color: var(--muted); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 899px) { .askbox { display: none; } }
.agent-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px 0 8px; border: 0; border-radius: 999px; font: inherit; font-weight: 700; color: var(--accent-text); background: var(--accent); box-shadow: 0 8px 24px -8px var(--glow); cursor: pointer; transition: transform var(--t-fast) var(--ease-out); }
.agent-btn:hover { transform: translateY(-1px); }
.agent-btn[aria-expanded="true"] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent), 0 8px 24px -8px var(--glow); }
.agent-dog { width: 34px; height: 30px; flex: none; }
/* FF's face (Ornament::dog): fixed fur colours, the collar follows the theme */
.agent-dog { --buddy-ink: #2a1d14; }
.agent-dog .b-line { stroke: var(--buddy-ink); stroke-width: 3.5px; stroke-linejoin: round; }
.agent-dog .b-fur { fill: #dca46a; } .agent-dog .b-dark { fill: #93603a; } .agent-dog .b-cream { fill: #fdf0dc; }
.agent-dog .b-patch { fill: #93603a; opacity: .55; }
.agent-dog .b-shadow { display: none; }
.agent-dog .b-collar { fill: var(--acc-c, #e04f6a); }
.agent-dog .b-tag circle { fill: #f4c542; } .agent-dog .b-tag text { display: none; }
.agent-dog .b-eye, .agent-dog .b-nose { fill: var(--buddy-ink); } .agent-dog .b-glint { fill: #fff; }
.agent-dog .b-eyes { transform-box: fill-box; transform-origin: center; }
.agent-dog .b-mouth { fill: none; stroke: var(--buddy-ink); stroke-width: 3px; stroke-linecap: round; }
.agent-dog .b-happy, .agent-dog .b-tongue, .agent-dog .b-dots { display: none; }
.agent-dog .b-blush { fill: #ff8fa3; opacity: .5; }
.agent-dog .b-ear-l { transform-origin: 66px 52px; } .agent-dog .b-ear-r { transform-origin: 134px 52px; }
html[data-fx="on"] .agent-dog .b-eyes { animation: dog-blink 5s infinite; }
html[data-fx="on"] .agent-btn:hover .agent-dog .b-ear-l { animation: dog-ear .5s ease-in-out 2 alternate; }
html[data-fx="on"] .agent-btn:hover .agent-dog .b-ear-r { animation: dog-ear .5s ease-in-out .1s 2 alternate-reverse; }
@keyframes dog-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes dog-ear { to { transform: rotate(-9deg); } }
/* (6.20.0) the assistant's face is Fuse: brass head, two warm eyes, a pilot light. Same box as the old face. */
.agent-fuse { overflow: visible; }
.agent-btn .agent-fuse { box-sizing: border-box; width: 36px; height: 36px; padding: 3px 3px 2px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #3a2616, #150d08 75%); box-shadow: inset 0 0 0 1px rgba(60, 40, 14, .7), 0 1px 0 rgba(255, 255, 255, .35); }
.agent-fuse .f-eyes { transform-box: fill-box; transform-origin: center; }
.agent-fuse .f-head { transform-box: fill-box; transform-origin: 50% 100%; }
.agent-fuse .f-glow { transform-box: fill-box; transform-origin: center; opacity: .75; }
html[data-fx="on"] .agent-fuse .f-glow { animation: fuse-breathe 3.6s ease-in-out infinite; }
html[data-fx="on"] .agent-btn:hover .agent-fuse .f-head, html[data-fx="on"] .agent-face:hover .agent-fuse .f-head { animation: fuse-nod .45s ease-in-out 2 alternate; }
@keyframes fuse-breathe { 0%, 100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes fuse-nod { to { transform: rotate(-7deg); } }
@media (max-width: 899px) { .agent-btn { padding: 0 10px; } .agent-btn-t { display: none; } }

/* page tabs: the current one has a pill that glides to the next */
.tabs-row { position: relative; z-index: 20; display: flex; align-items: center; gap: 4px; margin: 0 0 16px; padding: 5px; width: fit-content; max-width: 100%; border-radius: 999px; background: var(--tabs-bg, color-mix(in srgb, var(--surface) 70%, transparent)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 0 0 1px var(--line); overflow-x: auto; scrollbar-width: none; view-transition-name: tabs; }
.tb { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; color: var(--surface-text); text-decoration: none; font-weight: 600; white-space: nowrap; cursor: pointer; isolation: isolate; list-style: none; }
.tb::-webkit-details-marker { display: none; }
.tb:visited { color: var(--surface-text); }
.tb:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tb.is-on { color: var(--accent-text); }
.tb-pill { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--accent); box-shadow: 0 4px 16px -6px var(--glow); view-transition-name: tab-pill; }
.tb-more { position: relative; }
.tb-more-list { position: absolute; z-index: 60; top: calc(100% + 10px); right: 0; min-width: 240px; display: flex; flex-direction: column; padding: 6px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.tb-more:not([open]) .tb-more-list { display: none; } /* closed: no box at all (it could widen a phone page) */
/* (6.19.0) lifted out of the row by fijy.js so the row's sideways scrolling can't cut it off */
.tb-more-list.is-float { position: fixed; z-index: 400; top: 0; left: 0; right: auto; max-height: calc(100dvh - 120px); overflow-y: auto; }
.tb-more-list.is-float[hidden] { display: none; }
.tb-more-list a { padding: 11px 14px; border-radius: var(--radius-sm); color: var(--surface-text); text-decoration: none; }
.tb-more-list a:hover, .tb-more-list a.is-on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
@media (max-width: 899px) { .tabs-row { width: auto; max-width: none; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); border-radius: 0; padding: 6px var(--gutter); } .tb-more { position: static; } .tb-more-list { left: var(--gutter); right: var(--gutter); } }

/* the sheet: the page itself */
.sheet { position: relative; display: block; min-height: 60vh; padding: clamp(18px, 2.6vw, 34px); border-radius: var(--sheet-radius); background: var(--dash-bg, var(--sheet-bg)); color: var(--surface-text); box-shadow: var(--sheet-shadow); outline: 0; view-transition-name: sheet; }
.sheet > .flashes { margin-bottom: 14px; }
.sheet-head { margin: 0 0 18px; }
.sheet-head h1 { margin: 0; font-size: clamp(var(--fs-4), 4vw, var(--fs-5)); }
@media (max-width: 899px) { .sheet { margin: 0 calc(-1 * var(--gutter)); border-radius: var(--sheet-radius) var(--sheet-radius) 0 0; padding: 18px var(--gutter) 24px; } }
.statusline { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: center; padding: 16px 0 4px; color: var(--ink-soft); font-size: var(--fs-0); text-shadow: var(--ink-shadow, none); }
.statusline span:empty { display: none; }

/* ---------- FF's panel: docks beside the page on wide screens ---------- */
.agent {
  position: fixed; z-index: 70; top: 0; right: 0; bottom: 0; width: min(var(--agent-w), 100vw);
  display: flex; flex-direction: column; gap: 10px; padding: calc(14px + var(--safe-t)) 16px calc(14px + var(--safe-b));
  color: var(--surface-text); background: var(--agent-bg, var(--sheet-bg)); box-shadow: -1px 0 0 var(--line), -24px 0 60px -20px rgba(0, 0, 0, .45);
  view-transition-name: agent;
}
.agent[hidden] { display: none; }
html[data-fx="on"] .agent.opening { animation: agent-in .5s var(--ease-spring) both; }
@keyframes agent-in { from { transform: translateX(40px); opacity: 0; } }
@media (max-width: 899px) {
  .agent { top: auto; left: 0; width: 100%; height: min(86dvh, 760px); border-radius: var(--sheet-radius) var(--sheet-radius) 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .45); }
  html[data-fx="on"] .agent.opening { animation: sheet-up .45s var(--ease-out) both; }
}
.agent-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.agent-face { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); }
.agent-face .agent-dog { width: 42px; height: 38px; }
html[data-fx="on"] .agent.opening .agent-face { animation: hop .6s .15s var(--ease-spring) both; }
@keyframes hop { 40% { transform: translateY(-8px) rotate(-6deg); } }
.agent-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.agent-who b { font-family: var(--f-display); font-size: var(--fs-2); }
.agent-who small { color: var(--muted); }
.agent .sd-x { width: 40px; height: 40px; font-size: 22px; }
.agent .sd-x .ico { width: 18px; height: 18px; }
.agent-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 2px; overscroll-behavior: contain; }
/* one message (6.12.0): FF's with its face beside it, yours on the right; under each, who said it, from where, when */
.am { display: flex; gap: 8px; align-items: flex-start; max-width: 100%; }
.am.me { justify-content: flex-end; }
.am-av { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-top: 2px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); }
.am-av .agent-dog { width: 26px; height: 23px; }
.am-b { min-width: 0; max-width: min(100% - 38px, 74ch); padding: 10px 14px 7px; border-radius: 4px 16px 16px 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); line-height: 1.6; overflow-wrap: anywhere; }
.am.me .am-b { max-width: min(86%, 64ch); border-radius: 16px 16px 4px 16px; background: var(--accent); color: var(--accent-text); box-shadow: none; }
.am.me a { color: inherit; }
.am.failed .am-b { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad, #e08f7c) 65%, transparent); }
.am .am-t { display: block; font-weight: 700; margin-bottom: 4px; }
.am-x > :first-child { margin-top: 0; } .am-x > :last-child { margin-bottom: 0; }
.am-x p { margin: 0 0 8px; } .am-x ul, .am-x ol { margin: 0 0 8px; padding-left: 20px; } .am-x li { margin: 2px 0; }
.am-x h1, .am-x h2, .am-x h3, .am-x h4 { margin: 12px 0 4px; font-size: 1em; font-weight: 700; font-family: inherit; }
.am-x code { padding: 1px 5px; border-radius: 4px; font-size: .92em; background: color-mix(in srgb, currentColor 12%, transparent); }
.am-x pre { margin: 0 0 8px; padding: 10px 12px; border-radius: 8px; overflow-x: auto; background: color-mix(in srgb, currentColor 9%, transparent); }
.am-x pre code { padding: 0; background: none; }
.am-x table { border-collapse: collapse; margin: 0 0 8px; font-size: .95em; display: block; overflow-x: auto; }
.am-x th, .am-x td { padding: 3px 10px 3px 0; text-align: left; border-bottom: 1px solid var(--line); }
.am-x blockquote { margin: 0 0 8px; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); }
.am-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.am-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 5px; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.am.me .am-f { color: inherit; opacity: .72; }
.am-copy { border: 0; padding: 0 2px; background: none; color: inherit; font: inherit; cursor: pointer; opacity: 0; text-decoration: underline; text-underline-offset: 2px; transition: opacity .12s; }
.am:hover .am-copy, .am-copy:focus-visible { opacity: 1; }
@media (hover: none) { .am-copy { opacity: .8; } }
html[data-fx="on"] .am { animation: am-in .35s var(--ease-spring) both; }
@keyframes am-in { from { opacity: 0; transform: translateY(8px); } }
.am.typing .am-x { display: flex; align-items: center; gap: 10px; padding-bottom: 3px; color: var(--muted); }
.am-dots { display: inline-flex; gap: 4px; }
.am-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .4; }
html[data-fx="on"] .am-dots i { animation: dots 1s infinite; } html[data-fx="on"] .am-dots i:nth-child(2) { animation-delay: .15s; } html[data-fx="on"] .am-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { opacity: 1; transform: translateY(-3px); } }
.agent-ask.busy .btn, .ffx-ask.busy .btn { opacity: .55; }
.agent-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-log:has(.am.me) ~ .agent-chips { display: none; }   /* suggestions are for starting; once you are talking they make way */
.agent-chips button { min-height: 36px; padding: 4px 12px; border: 0; border-radius: 999px; font: inherit; font-size: var(--fs-0); color: var(--surface-text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; text-align: left; }
.agent-chips button:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.agent-ask { display: flex; gap: 8px; align-items: flex-end; }
.agent-ask textarea { min-height: 48px; max-height: 180px; resize: none; border-radius: 22px; padding: 12px 16px; }
.agent-ask .btn { width: 48px; min-height: 48px; border-radius: 50%; flex: none; }
.agent-foot { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- phone bar ---------- */
.tabbar { display: none; }
@media (max-width: 899px) {
  .tabbar {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end;
    padding: 6px max(6px, var(--safe-l)) calc(8px + var(--safe-b)) max(6px, var(--safe-r));
    color: var(--rail-text); background: var(--tabbar-bg, var(--rail-bg));
    -webkit-backdrop-filter: blur(var(--bar-blur)) saturate(1.4); backdrop-filter: blur(var(--bar-blur)) saturate(1.4);
    box-shadow: 0 -1px 0 var(--line);
    view-transition-name: tabbar;
  }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; padding: 4px 2px; border: 0; border-radius: 16px; background: none; color: inherit; font: inherit; font-size: 11.5px; font-weight: 600; text-decoration: none; cursor: pointer; isolation: isolate; opacity: .78; }
  .tabbar .ico { width: 24px; height: 24px; }
  .tabbar [aria-current] { opacity: 1; color: var(--rail-pill-text); }
  .tbb-pill { position: absolute; inset: 2px 6px; z-index: -1; border-radius: 16px; background: var(--rail-pill); view-transition-name: rail-pill; }
  .tbb-dot { position: absolute; top: 8px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--bad); }
  .tbb-ask { opacity: 1 !important; }
  .tbb-ask-o { display: grid; place-items: center; width: 56px; height: 56px; margin-top: -24px; border-radius: 50%; color: var(--accent-text); background: var(--accent); box-shadow: 0 10px 26px -8px var(--glow), 0 0 0 5px var(--bg); }
  .tbb-ask-o .ico { width: 26px; height: 26px; }
}

/* ---------- dialogs: bottom sheets on phones, cards on bigger screens ---------- */
.sheet-dlg { width: min(760px, 100vw - 32px); max-width: none; max-height: min(88dvh, 900px); padding: 0; margin: auto; color: var(--surface-text); background: var(--sheet-bg); border-radius: var(--sheet-radius); box-shadow: var(--sheet-shadow); overflow: hidden; }
.sheet-dlg[open] { display: flex; flex-direction: column; }
.sheet-dlg::backdrop, .cmdk::backdrop { background: var(--backdrop, rgba(0, 0, 0, .5)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sd-wrap { display: flex; flex-direction: column; min-height: 0; max-height: inherit; overflow: auto; overscroll-behavior: contain; }
.sd-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 22px; background: var(--sheet-bg); border-bottom: 1px solid var(--line); }
.sd-head h2 { margin: 0; flex: 1; font-size: var(--fs-3); }
.sd-x { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--surface-2); color: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.sd-x:hover { background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); }
.sd-foot { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 22px calc(12px + var(--safe-b)); background: var(--sheet-bg); border-top: 1px solid var(--line); }
.sd-foot .hint { flex: 1 1 200px; margin: 0; }
html[data-fx="on"] .sheet-dlg[open] { animation: dlg-in .4s var(--ease-spring); }
html[data-fx="on"] .sheet-dlg[open]::backdrop, html[data-fx="on"] .cmdk[open]::backdrop { animation: fade-in .3s ease; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@media (max-width: 899px) {
  .sheet-dlg { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: var(--sheet-radius) var(--sheet-radius) 0 0; }
  html[data-fx="on"] .sheet-dlg[open] { animation: sheet-up .42s var(--ease-out); }
  .sd-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line); }
  .sd-head { padding-top: 20px; }
}
.ev-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px calc(18px + var(--safe-b)); border-top: 1px solid var(--line); }
.ev-foot form { display: contents; }
.ev-foot .ico { width: 20px; height: 20px; }

/* More (phones) */
.ms-list { display: grid; gap: 10px; padding: 14px 16px 18px; }
.ms-sec { padding: 8px; border-radius: var(--radius); background: var(--surface-2); }
.ms-h { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 8px; color: var(--surface-text); text-decoration: none; font-size: var(--fs-2); }
.ms-h .ico { width: 24px; height: 24px; color: var(--accent); }
.ms-pages { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 4px 6px; }
.ms-pages a { display: inline-flex; align-items: center; min-height: 40px; padding: 2px 14px; border-radius: 999px; color: var(--surface-text); text-decoration: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-0); }
.ms-pages a[aria-current] { background: var(--accent); color: var(--accent-text); box-shadow: none; }

/* ---------- the Ask box, open ---------- */
.cmdk { width: min(700px, 100vw - 24px); max-width: none; max-height: min(78dvh, 720px); margin: 10vh auto auto; padding: 0; color: var(--surface-text); background: var(--sheet-bg); border-radius: calc(var(--sheet-radius) + 4px); box-shadow: 0 0 0 1px var(--line), 0 40px 100px -20px rgba(0, 0, 0, .6); overflow: hidden; }
.cmdk[open] { display: flex; }
html[data-fx="on"] .cmdk[open] { animation: cmd-in .38s var(--ease-spring); }
@keyframes cmd-in { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
.cmdk-wrap { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.cmdk-in { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--line); }
.cmdk-in .ico { width: 22px; height: 22px; color: var(--accent); flex: none; }
.cmdk-in input { flex: 1; min-height: 52px; padding: 0; font-size: max(18px, var(--fs-2)); background: none; box-shadow: none !important; }
.cmdk-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.ck-g { margin: 10px 12px 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ck { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 6px 12px; border: 0; border-radius: 12px; color: inherit; text-decoration: none; font: inherit; text-align: left; background: none; cursor: pointer; }
.ck .ico { width: 20px; height: 20px; flex: none; color: var(--muted); }
.ck-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ck-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-t small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-k { font-size: 12px; color: var(--muted); }
.ck[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 15%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.ck[aria-selected="true"] .ico { color: var(--accent); }
.ck.ask { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ck.ask .ico { color: var(--accent); }
.ck-empty { padding: 18px; color: var(--muted); text-align: center; }
.cmdk-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.cmdk-foot kbd { margin-right: 3px; }
@media (max-width: 899px) { .cmdk { margin-top: calc(10px + var(--safe-t)); max-height: 70dvh; } .cmdk-foot { display: none; } }

/* Look */
.lk-sec { padding: 16px 22px 6px; }
.lk-sec h3 { font-size: var(--fs-1); color: var(--muted); margin: 0 0 10px; }
.lk-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lk-theme, .lk-scene { position: relative; margin: 0; cursor: pointer; }
.lk-theme input, .lk-scene input { position: absolute; opacity: 0; pointer-events: none; }
.lk-card { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 8px 8px 10px; border-radius: var(--radius); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--t-fast), transform var(--t-fast); }
.lk-card b { font-size: var(--fs-1); line-height: 1.2; padding: 4px 2px 0; }
.lk-card small { color: var(--muted); font-size: 12.5px; line-height: 1.3; padding: 0 2px; }
.lk-sw { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; height: 54px; border-radius: calc(var(--radius) - 4px); overflow: hidden; }
.lk-sw i:nth-child(1) { background: var(--c1); } .lk-sw i:nth-child(2) { background: var(--c2); } .lk-sw i:nth-child(3) { background: var(--c3); } .lk-sw i:nth-child(4) { background: var(--c4); }
.lk-theme:hover .lk-card { transform: translateY(-2px); }
.lk-theme input:checked + .lk-card, .lk-scene input:checked + .lk-pic { box-shadow: 0 0 0 3px var(--accent); }
.lk-theme input:focus-visible + .lk-card, .lk-scene input:focus-visible + .lk-pic { outline: 2px solid var(--accent); outline-offset: 3px; }
.lk-scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.lk-scene b { display: block; padding: 6px 2px 0; font-size: 13px; font-weight: 600; line-height: 1.25; }
.lk-pic { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); background: var(--surface-2) center / cover no-repeat; box-shadow: inset 0 0 0 1px var(--line); font-size: 28px; color: var(--muted); }
.lk-pic.lk-drawn { background: conic-gradient(from 210deg, var(--accent), var(--accent-2), var(--accent)); color: var(--accent-text); }
.lk-credits { margin: 12px 0 0; color: var(--muted); }
.lk-credits ul { margin: 6px 0 0; padding-left: 18px; }
.lk-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0 16px; }
.lk-two fieldset { margin: 0 0 10px; }
.look-dlg.is-busy .lk-themes { opacity: .6; pointer-events: none; }

/* tool sheets (Photo Viewer, Upload, New folder, Help) */
.tool-dlg { width: min(640px, 100vw - 32px); }
.tool-dlg.is-viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; background: #0d0d0d; color: #eee; }
.tool-dlg .tool-body { padding: 16px 22px 22px; min-height: 0; overflow: auto; }
.tool-dlg.is-viewer .tool-body { flex: 1; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.tool-dlg.is-viewer .sd-head { background: #0d0d0d; border-color: #2a2a2a; color: #eee; padding: calc(10px + var(--safe-t)) 12px 10px 18px; }
.tool-dlg.is-viewer .sd-head h2 { font-size: var(--fs-1); font-family: var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-dlg.is-viewer .sd-x { background: #262626; color: #eee; }
.tool-dlg.is-viewer .sd-head::before { display: none; }
@media (max-width: 899px) { .tool-dlg.is-viewer { border-radius: 0; max-height: none; } html[data-fx="on"] .tool-dlg.is-viewer[open] { animation: fade-in .25s ease; } }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(18px + var(--tabbar-h)); z-index: 9500; display: flex; flex-direction: column; gap: 8px; transform: translateX(-50%); width: min(460px, calc(100vw - 24px)); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: var(--radius); background: var(--toast-bg, var(--surface)); color: var(--toast-text, var(--surface-text)); box-shadow: var(--shadow-lg); font-size: var(--fs-1); pointer-events: auto; }
html[data-fx="on"] .toast { animation: dlg-in .35s var(--ease-spring); }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }

/* the egg: nine little lights */
.egg-candles { position: fixed; left: 50%; bottom: calc(24px + var(--tabbar-h)); z-index: 9600; display: flex; align-items: flex-end; gap: 10px; padding: 14px 18px; transform: translateX(-50%); border-radius: var(--radius); background: rgba(15, 10, 6, .82); color: #ffe6b0; box-shadow: var(--shadow-lg); }
.egg-candles i { position: relative; width: 6px; height: 26px; border-radius: 2px; background: #f3ead8; opacity: 0; animation: candle-on .4s var(--d) forwards; }
.egg-candles i.shamash { height: 36px; }
.egg-candles i::after { content: ""; position: absolute; left: 50%; top: -12px; width: 8px; height: 12px; margin-left: -4px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(#fff6c8, #ffb02e 60%, transparent 70%); }
.egg-candles span { margin-left: 8px; font-size: var(--fs-0); }
@keyframes candle-on { to { opacity: 1; } }

/* ---------- the front page (visitors) ---------- */
.front { position: relative; z-index: 2; display: grid; place-items: center; min-height: calc(100dvh - 70px); padding: calc(28px + var(--safe-t)) 18px 28px; outline: 0; }
.front-card { width: min(640px, 100%); padding: clamp(26px, 6vw, 56px); border-radius: calc(var(--sheet-radius) + 8px); background: var(--front-bg, color-mix(in srgb, var(--sheet-bg) 86%, transparent)); color: var(--surface-text); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); box-shadow: var(--sheet-shadow); text-align: center; view-transition-name: sheet; }
html[data-fx="on"] .front-card { animation: front-in 1s var(--ease-spring) both; }
@keyframes front-in { from { opacity: 0; transform: translateY(26px) scale(.97); } }
.hello { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hello-pic, .hello-mark { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; margin-bottom: 14px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent), 0 14px 40px -10px var(--glow); }
.hello-mark { display: grid; place-items: center; background: var(--accent); color: var(--accent-text); }
.hello-mark .ff-mark { width: 46%; height: auto; }
.hello-eyebrow { margin: 0; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-size: var(--fs-0); font-weight: 600; }
.hello-name { margin: 0; font-size: clamp(2.4rem, 9vw, 4.4rem); line-height: 1.02; }
.hello-head { margin: 8px 0 0; font-size: var(--fs-2); color: var(--muted); }
.hello-bio { margin: 16px auto 0; max-width: 46ch; line-height: 1.65; }
html[data-fx="on"] .hello > * { animation: rise .8s var(--ease-spring) both; }
html[data-fx="on"] .hello > :nth-child(2) { animation-delay: .08s; } html[data-fx="on"] .hello > :nth-child(3) { animation-delay: .14s; } html[data-fx="on"] .hello > :nth-child(4) { animation-delay: .2s; } html[data-fx="on"] .hello > :nth-child(5) { animation-delay: .26s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.front-progs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 24px 0 0; }
.front-progs a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; color: var(--surface-text); text-decoration: none; font-weight: 600; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); --ico-ink: var(--accent); }
.front-progs a:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.front-actions { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.front-actions .btn .ico { width: 20px; height: 20px; }
.front-foot { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 20px; padding: 0 18px calc(20px + var(--safe-b)); color: var(--ink-soft); font-size: var(--fs-0); text-shadow: var(--ink-shadow, none); }
.front-home { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.front-home .ff-mark { width: 16px; height: auto; color: var(--brand-ink, var(--accent)); }
.front-look { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; font: inherit; cursor: pointer; }
.front-look .ico { width: 18px; height: 18px; }
/* sign-in and other small pages in the front card */
.front-card .logon, .front-card .pane, .front-card .doc { text-align: left; }
.front-card .logon { max-width: none; }

/* ==========================================================================
   Motion. Everything below runs only with animations on (html[data-fx="on"]).
   ========================================================================== */

/* side bar: the current icon draws its lines in */
html[data-fx="on"] .rl.is-on .ico :is(path, circle, rect), html[data-fx="on"] .tabbar [aria-current] .ico :is(path, circle, rect) { stroke-dasharray: 1; animation: draw .9s .12s var(--ease-out) both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
html[data-fx="on"] .rl:hover .rl-ico { animation: nudge .5s var(--ease-spring); }
@keyframes nudge { 40% { transform: translateY(-2px) scale(1.08); } }

/* Today: boxes arrive one after another */
html[data-fx="on"] .home-boxes .card { animation: card-in .7s var(--ease-spring) both; animation-delay: calc(min(var(--i, 0), 14) * 45ms + 60ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(22px) scale(.97); } }
html.vt-grow .home-boxes .card { animation: none; }

/* light that follows the pointer across a box */
.card { --mx: 50%; --my: 0%; }
@media (hover: hover) {
  html[data-fx="on"] .card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px circle at var(--mx) var(--my), var(--sheen), transparent 45%); opacity: 0; transition: opacity .35s; }
  html[data-fx="on"] .card:hover::after { opacity: 1; }
}

/* charts draw themselves */
html[data-fx="on"] .chart polyline.draw, html[data-fx="on"] .spark polyline.draw { stroke-dasharray: 1; animation: draw 1.4s .15s var(--ease-out) both; }
html[data-fx="on"] .chart .area { transform-box: fill-box; transform-origin: 50% 100%; animation: grow-y .9s .1s var(--ease-out) both; }
html[data-fx="on"] .chart .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: grow-y .8s var(--ease-spring) both; animation-delay: calc(min(var(--bi, 0), 24) * 28ms); }
@keyframes grow-y { from { transform: scaleY(0); opacity: .3; } }
html[data-fx="on"] .donut svg, html[data-fx="on"] .ring svg { animation: spin-in 1.1s var(--ease-spring) both; }
@keyframes spin-in { from { transform: rotate(-120deg) scale(.6); opacity: 0; } }
html[data-fx="on"] .chart circle { animation: fade-in .6s 1s both; }

/* ---------- page transitions (View Transitions between pages) ---------- */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: var(--dur); animation-timing-function: var(--ease-spring); }
::view-transition-group(rail), ::view-transition-group(tabbar), ::view-transition-group(askbox) { animation-duration: .3s; }
::view-transition-old(rail), ::view-transition-new(rail), ::view-transition-old(tabbar), ::view-transition-new(tabbar) { animation: none; }
::view-transition-group(rail-pill), ::view-transition-group(tab-pill) { animation-duration: .6s; }
::view-transition-old(sec-title) { animation: title-out .25s ease both; }
::view-transition-new(sec-title) { animation: title-in .5s .05s var(--ease-spring) both; }
@keyframes title-out { to { opacity: 0; transform: translateY(-8px); filter: blur(4px); } }
@keyframes title-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }

/* the sheet moves the way you went: down the side bar slides up, up slides down, tabs slide sideways */
::view-transition-old(sheet) { animation: var(--vt-out, var(--vt-theme-out, sheet-fade-out)) .3s var(--ease-out) both; }
::view-transition-new(sheet) { animation: var(--vt-in, var(--vt-theme-in, sheet-fade-in)) var(--dur) var(--ease-spring) both; }
html.vt-down { --vt-out: sheet-out-up; --vt-in: sheet-in-up; }
html.vt-up { --vt-out: sheet-out-down; --vt-in: sheet-in-down; }
html.vt-right { --vt-out: sheet-out-left; --vt-in: sheet-in-left; }
html.vt-left { --vt-out: sheet-out-right; --vt-in: sheet-in-right; }
@keyframes sheet-fade-out { to { opacity: 0; transform: scale(.985); } }
@keyframes sheet-fade-in { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes sheet-out-up { to { opacity: 0; transform: translateY(-60px) scale(.97); } }
@keyframes sheet-in-up { from { opacity: 0; transform: translateY(90px); } }
@keyframes sheet-out-down { to { opacity: 0; transform: translateY(60px) scale(.97); } }
@keyframes sheet-in-down { from { opacity: 0; transform: translateY(-90px); } }
@keyframes sheet-out-left { to { opacity: 0; transform: translateX(-70px); } }
@keyframes sheet-in-left { from { opacity: 0; transform: translateX(90px); } }
@keyframes sheet-out-right { to { opacity: 0; transform: translateX(70px); } }
@keyframes sheet-in-right { from { opacity: 0; transform: translateX(-90px); } }
/* a box on Today grows into its page (and shrinks back) */
html.vt-grow::view-transition-group(sheet) { animation-duration: .65s; }
html.vt-grow::view-transition-old(sheet) { animation: sheet-fade-out .25s ease both; height: 100%; object-fit: cover; object-position: top; }
html.vt-grow::view-transition-new(sheet) { animation: grow-in .55s .08s ease both; height: 100%; object-fit: cover; object-position: top; }
@keyframes grow-in { from { opacity: 0; } }

html[data-fx="off"]::view-transition-group(*), html[data-fx="off"]::view-transition-old(*), html[data-fx="off"]::view-transition-new(*) { animation: none !important; }
@media (prefers-reduced-motion: reduce) { html:not([data-effects="on"])::view-transition-group(*), html:not([data-effects="on"])::view-transition-old(*), html:not([data-effects="on"])::view-transition-new(*) { animation: none !important; } }
@supports not (view-transition-name: none) { html[data-fx="on"] .sheet { animation: sheet-fade-in .55s var(--ease-spring) both; } }

/* FF's calendar cards (CalendarTalk): an entry to confirm, and days as short lists */
.ff-cal { display: flex; flex-direction: column; gap: 8px; }
.ff-cal > p { margin: 0; }
.ff-ev { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.ff-ev b { font-size: 1.05em; }
.ff-ev span { color: var(--text-dim, inherit); font-size: .92em; }
.ff-done { margin: 6px 0 0; color: var(--ok, inherit); }
.ff-done a { margin-left: 4px; }
.am .ff-day { margin: 8px 0 2px; }
.am .ff-day:first-child { margin-top: 0; }
.ff-list { margin: 0 0 4px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.ff-list .t { color: var(--text-dim, inherit); font-variant-numeric: tabular-nums; }
.ff-list .ce > i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--cc, var(--accent)); vertical-align: 1px; }
.ff-list .ch { font-style: italic; opacity: .85; }
