/* Perfume collection — shared chrome and components.
 *
 * Every value comes from tokens.css. Depth is layered shadow, never a border
 * pretending to be elevation: borders here mean structure (the app bar, a
 * divider) or state (focus, selected). Motion always names its properties, so
 * transitions stay interruptible.
 */
* { box-sizing: border-box; }
/* A component that sets `display` would otherwise defeat the `hidden`
   attribute, which is how the grid marks a card the filter excluded. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 15% -10%, var(--surface-2) 0, var(--bg) 60%);
  color: var(--text);
  font: var(--t-base) / 1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

a { color: inherit; text-decoration: none; }
h1 { font-family: var(--font-display); font-size: var(--t-2xl); font-weight: 600;
  margin: var(--sp-1) 0 var(--sp-3); letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: var(--t-sm); margin: var(--sp-5) 0 var(--sp-3); text-transform: uppercase;
  letter-spacing: .09em; color: var(--muted); }
h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.display { font-family: var(--font-display); letter-spacing: -.01em; }
.muted { color: var(--muted); }
.muted.small { font-size: var(--t-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --------------------------------------------------------------- app bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  flex-wrap: wrap; padding: var(--sp-3) var(--sp-4);
  position: sticky; top: 0; z-index: 20;
  background: var(--scrim);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.topbar .brand { display: inline-flex; align-items: center; gap: var(--sp-2);
  font-weight: 600; font-size: var(--t-lg); letter-spacing: .01em; min-height: var(--tap); }
.topbar .drop { color: var(--accent); font-size: 1.1em; }
.topbar nav { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--t-sm);
  flex-wrap: wrap; }
.topbar nav a { min-height: var(--tap); display: inline-flex; align-items: center; }
.whoami { color: var(--muted); font-size: var(--t-xs); }
.logoutform { display: inline; margin: 0; }
.logoutform button { background: none; border: 1px solid var(--line); color: var(--muted);
  padding: 0 var(--sp-3); min-height: var(--tap); border-radius: var(--r-sm); font-size: var(--t-xs);
  cursor: pointer; transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.logoutform button:hover { border-color: var(--accent); color: var(--text); }

main { max-width: 1180px; margin: 0 auto; padding: var(--sp-4); }
footer { max-width: 1180px; margin: var(--sp-5) auto var(--sp-6); padding: 0 var(--sp-4);
  font-size: var(--t-xs); }
footer a { display: inline-flex; align-items: center; min-height: var(--tap);
  padding: 0 var(--sp-2); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--tap); padding: 0 var(--sp-4);
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer;
  font: inherit; font-size: var(--t-sm); box-shadow: var(--shadow-1);
  transition: border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease),
              background-color var(--dur-1) var(--ease);
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.96); }
.btn.small, .btn.ghost.small { min-height: var(--tap); padding: 0 var(--sp-3); font-size: var(--t-xs); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { border-color: var(--danger-line); color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }

/* --------------------------------------------------------------- controls */
input, select, textarea, button {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3);
  min-height: var(--tap);
}
input[type=search] { flex: 1 1 260px; min-width: 200px; }
textarea { width: 100%; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}

/* --------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2);
  margin: var(--sp-1) 0 var(--sp-4); }
.stats > div { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-3);
  display: flex; flex-direction: column; box-shadow: var(--shadow-1); }
.stats b { font-size: var(--t-xl); font-variant-numeric: tabular-nums; }
.stats span { font-size: var(--t-xs); color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; }
/* the phone form of the same four numbers: one muted line */
.statsline { margin: var(--sp-1) 0 var(--sp-3); font-size: var(--t-sm); color: var(--muted);
  font-variant-numeric: tabular-nums; }
.count { margin: var(--sp-2) 0 var(--sp-3); font-size: var(--t-sm); color: var(--muted);
  font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- filters */
.toolbar { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center;
  margin-bottom: var(--sp-2); }
.quicklinks { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin: var(--sp-1) 0 var(--sp-4); }
.chipbtn { font-size: var(--t-xs); padding: 0 var(--sp-3); min-height: var(--tap);
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: var(--r-pill); background: var(--surface); color: var(--muted);
  transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.chipbtn:hover { border-color: var(--accent); color: var(--text); }
.chipbtn.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent);
  font-weight: 600; }

.chips { margin: 0; display: flex; gap: var(--sp-1) var(--sp-2); flex-wrap: wrap; }
.chip { font-size: var(--t-xs); padding: 2px var(--sp-2); border: 1px solid var(--line);
  border-radius: var(--r-pill); color: var(--muted); }
.chip.seg { color: var(--accent); border-color: var(--accent-line); }
.chip.fam { color: var(--muted); border-color: var(--line); }

/* --------------------------------------------------------------- grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-3); }
.smallgrid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.card { background: var(--surface); border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column; position: relative; box-shadow: var(--shadow-1);
  transition: transform var(--dur-2) var(--ease);
  /* 324 cards is a long page: let the browser skip rendering the off-screen ones.
     contain-intrinsic-size keeps the scrollbar honest while it does. */
  content-visibility: auto; contain-intrinsic-size: auto 280px; }
.card:hover { transform: translateY(-2px); }
.thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4;
  /* The bottle's own accord colours (--sig1/--sig2, set per card on the server)
     with the surface tokens as the fallback for a bottle without accord data. */
  background: linear-gradient(160deg, var(--sig1, var(--surface-2)), var(--sig2, var(--bg)));
  position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: var(--sp-2); }
.ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-size: 2.4rem; font-weight: 700; color: var(--line); text-transform: uppercase; }
.ph.big { aspect-ratio: 3 / 4; font-size: 5rem; }
.cardbody { padding: var(--sp-2) var(--sp-3) var(--sp-3); display: flex; flex-direction: column;
  gap: var(--sp-1); }
.brandline { margin: 0; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .07em;
  color: var(--accent); }
.card h3 { margin: 0; font-size: var(--t-base); font-weight: 600; line-height: 1.3; }
.card h3 a { display: flex; align-items: center; min-height: var(--tap); }
.fam { margin: 0; font-size: var(--t-sm); color: var(--muted); }
.notes { margin: 0; font-size: var(--t-sm); color: var(--faint);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.star { color: var(--accent); }

.favform { position: absolute; top: 0; left: 0; margin: 0; padding: 0; z-index: 3; }
.favtoggle { width: var(--tap); height: var(--tap); position: relative; padding: 0; display: flex;
  align-items: center; justify-content: center; border: 0; background: transparent;
  color: var(--faint); font-size: 1.15rem; line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
.favtoggle::before { content: ""; position: absolute; inset: 6px; border-radius: var(--r-pill);
  background: var(--scrim-strong); border: 1px solid var(--line); z-index: -1; }
.favtoggle:hover { color: var(--accent); }
.favtoggle.on { color: var(--accent-ink); }
.favtoggle.on::before { background: var(--accent); border-color: var(--accent); }
.favtoggle.busy { opacity: .45; }
.favtoggle.pop { animation: pop var(--dur-3) var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.25); } 100% { transform: scale(1); } }

.warn { position: absolute; top: var(--sp-2); right: var(--sp-2); width: 1.35rem; height: 1.35rem;
  border-radius: 50%; background: var(--warn); color: var(--accent-ink); font-weight: 700;
  font-size: var(--t-sm); display: flex; align-items: center; justify-content: center; }
.verify { margin: var(--sp-2) 0 0; font-size: var(--t-xs); color: var(--warn); line-height: 1.4; }
.empty { color: var(--muted); padding: var(--sp-6) var(--sp-3); text-align: center; }
.empty .display { display: block; font-size: var(--t-xl); color: var(--text);
  margin-bottom: var(--sp-2); }

/* --------------------------------------------------------------- detail */
.crumbs { font-size: var(--t-sm); margin: var(--sp-1) 0 var(--sp-3); }
.crumbs a { color: var(--muted); display: inline-flex; align-items: center; min-height: var(--tap); }
.hero { display: grid; grid-template-columns: 300px 1fr; gap: var(--sp-5); align-items: start;
  background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-4);
  box-shadow: var(--shadow-1); }
.heroimg img { width: 100%; border-radius: var(--r-md); background: var(--bg); }
.upload { margin-top: var(--sp-3); text-align: center; }
.upload input[type=file] { display: none; }
.facts { display: grid; grid-template-columns: 130px 1fr; gap: var(--sp-1) var(--sp-3);
  margin: var(--sp-4) 0; font-size: var(--t-sm); }
.facts dt { color: var(--muted); font-size: var(--t-xs); text-transform: uppercase;
  letter-spacing: .05em; align-self: center; }
.facts dd { margin: 0; }
.facts.wide { grid-template-columns: auto 1fr; column-gap: var(--sp-4); }
.actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.inlineform { display: inline; margin: 0; }
.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.layer { background: var(--surface); border-radius: var(--r-md); padding: var(--sp-3);
  border-top: 3px solid var(--line); box-shadow: var(--shadow-1); }
.layer.top { border-top-color: var(--note-top); }
.layer.heart { border-top-color: var(--note-heart); }
.layer.base { border-top-color: var(--accent); }
.layer h4 { margin: 0 0 var(--sp-1); font-size: var(--t-xs); text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); }
.layer p { margin: 0; font-size: var(--t-sm); }
.personal form { background: var(--surface); border-radius: var(--r-md); padding: var(--sp-3);
  box-shadow: var(--shadow-1); }
.personal .row { display: flex; gap: var(--sp-3); align-items: center; margin-top: var(--sp-2);
  flex-wrap: wrap; }

/* --------------------------------------------------------------- forms */
.form { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-3); box-shadow: var(--shadow-1); }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-3); }
.form label, .imagefield label { display: flex; flex-direction: column; gap: var(--sp-1);
  font-size: var(--t-xs); color: var(--muted); }
.form input, .form textarea { width: 100%; }
.imagefield { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-3); }
.imagefield legend { color: var(--muted); font-size: var(--t-xs); text-transform: uppercase;
  letter-spacing: .07em; }
.imgrow { display: flex; gap: var(--sp-4); align-items: flex-start; flex-wrap: wrap; }
.preview { width: 150px; border-radius: var(--r-sm); background: var(--bg); }
.imgopts { display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; min-width: 220px; }
.check { flex-direction: row !important; align-items: center; gap: var(--sp-2) !important;
  color: var(--text) !important; }
.check input { min-height: 0; }

/* ------------------------------------------------- fragrance profile card */
.frag { margin: var(--sp-5) 0; padding: var(--sp-4); background: var(--surface);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.frag h2 { margin: 0; }
.frag h3 { margin: var(--sp-5) 0 var(--sp-3); font-size: var(--t-sm); letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); }
.fraghead { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3);
  flex-wrap: wrap; }
.srcbadge { font-size: var(--t-xs); color: var(--muted); }
.srcbadge a { color: var(--accent); }
.okmsg { margin: var(--sp-3) 0 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  background: var(--ok-fill); border: 1px solid var(--ok-line); color: var(--ok);
  font-size: var(--t-sm); }
.fragtop { display: flex; gap: var(--sp-5); flex-wrap: wrap; align-items: flex-start;
  margin-top: var(--sp-4); }
.scorebox { min-width: 150px; padding: var(--sp-3); border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface-2); }
.bigscore { font-size: 2.3rem; font-weight: 700; line-height: 1.05;
  font-variant-numeric: tabular-nums; }
.bigscore span { font-size: var(--t-base); color: var(--muted); font-weight: 500; }
.scoremeta { margin-top: var(--sp-1); font-size: var(--t-xs); color: var(--muted); line-height: 1.45;
  font-variant-numeric: tabular-nums; }
.aspects { flex: 1 1 320px; min-width: 280px; }
.aspect { display: grid; grid-template-columns: 5.6rem 1fr 2.4rem 4.6rem; gap: var(--sp-2);
  align-items: center; margin: var(--sp-2) 0; font-size: var(--t-xs); }
.alabel { color: var(--muted); }
.abar { height: 7px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; }
.abar i { display: block; height: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-soft)); }
.aval { text-align: right; font-variant-numeric: tabular-nums; }
.avotes { color: var(--faint); font-size: var(--t-xs); text-align: right;
  font-variant-numeric: tabular-nums; }
.accords { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.accord { display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line);
  font-size: var(--t-xs); }
.accord i { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--faint));
  box-shadow: 0 0 0 2px var(--ring); }
.accord.s-high { font-weight: 600; }
.accord.s-high i { width: 15px; height: 15px; }
.accord.s-low { opacity: .8; }
.accord.s-low i { width: 9px; height: 9px; }
.layers.rich .layer { background: var(--surface-2); }
.notelist { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); margin: 0; }
.note { display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line);
  font-size: var(--t-xs); }
.note img { width: 18px; height: 18px; border-radius: 50%; object-fit: contain;
  background: var(--ring); }
.fragdesc { margin: var(--sp-3) 0 0; font-size: var(--t-sm); color: var(--muted); line-height: 1.6; }
.similarwrap { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.simchip { display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-pill); font-size: var(--t-xs); background: var(--surface-2);
  border: 1px solid var(--line); color: var(--muted);
  transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.simchip:hover { border-color: var(--accent); color: var(--text); }
.simchip.owned { border-color: var(--ok-line); background: var(--ok-fill); color: var(--ok); }
.simchip b { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .03em; opacity: .9; }
.inspired { margin: var(--sp-3) 0 0; padding: var(--sp-3); border-radius: var(--r-md);
  font-size: var(--t-sm); line-height: 1.55; background: var(--warn-fill);
  border: 1px solid var(--warn-line); color: var(--warn-text); }
.inspired a { color: var(--accent); }

/* --------------------------------------------------------------- login */
.loginpage { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.loginbox { width: 100%; max-width: 22rem; background: var(--surface); border-radius: var(--r-lg);
  padding: var(--sp-5); margin: var(--sp-5); box-shadow: var(--shadow-2); }
.loginbox h1 { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--t-xl);
  margin-bottom: var(--sp-4); }
.loginbox form { display: flex; flex-direction: column; gap: var(--sp-3); }
.loginbox label { display: flex; flex-direction: column; gap: var(--sp-1); font-size: var(--t-xs);
  color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.loginbox .btn { width: 100%; }
.loginerror { margin: 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  font-size: var(--t-sm); background: var(--danger-fill); border: 1px solid var(--danger-line);
  color: var(--danger-text); }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .layers { grid-template-columns: 1fr; }
  .stats { display: none; }          /* the phone shows .statsline instead */
  main { padding: var(--sp-3); }
  .topbar { padding: var(--sp-2) var(--sp-3); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover, .btn:active { transform: none; }
}

/* --------------------------------------------------------------- browse */
.browsebar { padding: var(--sp-1) 0 var(--sp-3); }
.sortwrap { display: inline-flex; align-items: center; }
.sortwrap select { min-height: var(--tap); font-size: var(--t-xs); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.3rem;
  height: 1.3rem; margin-left: var(--sp-2); padding: 0 5px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink); font-size: var(--t-xs); font-weight: 700;
  font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------- facet pickers */
/* Four compact multi-select dropdowns. The chip rows they replace were 2,072px
   tall (family alone 1,760px for 56 values) and pushed the grid to 2,573px. */
.facettoolbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-4); }
.facetpick { position: relative; }
.facetbtn { display: inline-flex; align-items: center; gap: var(--sp-2); }
.facetbtn .caret { font-size: .75em; color: var(--muted); }
.facetpanel { position: absolute; z-index: 30; top: calc(100% + var(--sp-1)); left: 0;
  min-width: 13rem; max-width: min(22rem, calc(100vw - var(--sp-6)));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-2); padding: var(--sp-2); }
.facetsearch { width: 100%; margin-bottom: var(--sp-2); min-height: 36px; font-size: var(--t-sm); }
.facetopts { display: flex; flex-direction: column; max-height: min(52vh, 20rem); overflow-y: auto; }
.facetopt { display: flex; align-items: center; gap: var(--sp-2); min-height: var(--tap);
  padding: 0 var(--sp-1); border-radius: var(--r-sm); cursor: pointer; font-size: var(--t-sm); }
.facetopt:hover { background: var(--surface-2); }
.facetopt input { width: 1.1rem; height: 1.1rem; min-height: 0; accent-color: var(--accent); }
.facetopt .optname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.facetopt .cnt { color: var(--faint); font-variant-numeric: tabular-nums; }
.facetopt.none { opacity: .5; }
.facetempty { margin: var(--sp-2) 0 0; }

@media (max-width: 720px) {
  /* On a phone the panel opens into the viewport instead of hanging off the
     picker that owns it: the rightmost picker sits near the edge, and a 300px
     panel anchored to it overflowed by 42px at 360px (measured). Bottom-anchored
     also means it lands under the thumb. */
  .facetpanel { position: fixed; top: auto; bottom: var(--sp-3);
    left: var(--sp-3); right: var(--sp-3); min-width: 0; max-width: none;
    max-height: 72vh; overflow-y: auto; }
  .facetopts { max-height: none; }
}

/* Today's picks: the dialog that replaced the one-card pick bar. A sheet on a phone,
   a card on a desktop; the picks are image-led like the grid they came from. */
.today { display: flex; flex-direction: column; gap: var(--sp-3); }
.today .weather { margin: 0; font-size: var(--t-sm); line-height: 1.5; color: var(--muted); }
.today .weather b { color: var(--text); }
.today .window { display: flex; flex-direction: column; gap: var(--sp-2); }
.today .window h3 { margin: 0; font-size: var(--t-sm); text-transform: uppercase;
  letter-spacing: .08em; color: var(--accent); }
.today .pick a { display: flex; align-items: center; gap: var(--sp-3);
  min-height: var(--tap); padding: var(--sp-2); border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface-2); color: inherit;
  text-decoration: none; }
.today .pick img { width: 56px; height: 56px; border-radius: var(--r-sm); object-fit: cover;
  background: var(--surface); flex: none; }
.today .pick .pname { font-size: var(--t-base); line-height: 1.35; }
.today .pick .why { display: block; font-size: var(--t-sm); color: var(--muted); margin-top: 2px; }
.today .insight { margin: 0; font-size: var(--t-base); line-height: 1.55; }
.today .fixture { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; align-items: center; }
.today[data-pending]::after { content: "checking the model…"; font-size: var(--t-sm);
  color: var(--faint); }

dialog#todaydlg { padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); color: var(--text); width: min(34rem, calc(100vw - var(--sp-4))); }
dialog#todaydlg::backdrop { background: rgb(0 0 0 / .55); }
.todayhead { display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
.todayhead h2 { margin: 0; font-size: var(--t-lg); }
.todayhead [data-today-close] { min-width: var(--tap); min-height: var(--tap); padding: 0; }
.todaybody { padding: var(--sp-4); max-height: min(78vh, 44rem); overflow-y: auto; }

@media (max-width: 720px) {
  /* A sheet on a phone, where the thumb is, with the safe area respected. */
  dialog#todaydlg { width: 100%; max-width: none; margin: 0; border: 0; border-radius: 0;
    position: fixed; inset: 0; height: 100%; }
  .todaybody { max-height: none; height: calc(100% - 3.5rem); }
  .today .pick a { align-items: flex-start; }
}
