/* ============================================================
   Door B — "Start From a Thing You Hold" (/hold/), task-038 Phase 2.
   Ported from the task-034 concept-b mock; every colour consumes the
   token set defined in layouts/_default/baseof.html (palette.md):
   no raw hex anywhere in this file, light+dark ride the token swap.
   Chamfer grammar (design-system-chamfer): 4 corners = container,
   2 corners = affordance.
   Everything is .dh- scoped so it cannot collide with the global
   chrome (.chip/.card/.btn in baseof) or the other doors.
   ============================================================ */

.dh {
  /* Door-scoped derived tokens — composition only, no new colours. */
  --dh-hatch: var(--ui-border);
  --dh-shadow: var(--ui-border-strong);
  font-weight: 300;
}

/* The door/stand swap rides the hidden attribute; display rules must not win. */
.dh [hidden] { display: none !important; }

.dh .dh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dh .dh-lbl { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-ink-faded); }
.dh .dh-hole { color: var(--color-ink-faded); font-style: normal; font-weight: 300; }
.dh .dh-hole-chip {
  display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--color-ink-faded); border: 1px dashed var(--ui-border-strong);
  padding: 2px 8px; clip-path: var(--chamfer-container-sm);
}
.dh .dh-hole-chip.dh-solid { border-style: solid; }

.dh button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; margin: 0; padding: 0; }
.dh button:focus-visible, .dh input:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }

/* ---------- shared chamfered pieces ---------- */
.dh .dh-btn {
  clip-path: var(--chamfer-affordance-md); font-weight: 700; font-size: 1rem;
  padding: 12px 20px; display: inline-flex; align-items: center; gap: 8px;
  background: var(--ui-logo); color: var(--ui-on-brand); white-space: nowrap;
}
.dh .dh-btn-quiet { background: var(--ui-paper); color: var(--ui-text); box-shadow: inset 0 0 0 1px var(--ui-border-strong); }
.dh .dh-chip {
  clip-path: var(--chamfer-affordance-sm); font-weight: 600; font-size: 0.875rem;
  padding: 6px 12px; background: var(--ui-paper);
  box-shadow: inset 0 0 0 1px var(--ui-border-strong);
  display: inline-flex; align-items: center; gap: 6px;
}
.dh .dh-chip[aria-pressed="true"] { background: var(--ui-logo); color: var(--ui-on-brand); box-shadow: none; }
/* A diet the data can't yet be honest about: greyed, never hidden. */
.dh .dh-chip[disabled] { color: var(--color-ink-faded); opacity: 0.55; cursor: not-allowed; }
/* The guidance diets' fixed honesty line (diets.js GUIDANCE_LINE). */
.dh .dh-dietnote { margin: 6px 0 0; font-size: 0.8125rem; color: var(--color-ink-faded); }

/* photo slot — real photography arrives with task-035; the slot is designed in now */
.dh .dh-photo {
  background: repeating-linear-gradient(45deg, transparent 0 7px, var(--dh-hatch) 7px 8px);
  clip-path: var(--chamfer-container-sm);
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 6px 8px;
}
.dh .dh-photo span { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-ink-faded); }

/* ============================ THE DOOR ============================ */
.dh-door { max-width: 640px; margin: 0 auto; padding: 40px 20px 64px; display: flex; flex-direction: column; }
.dh .dh-h1 { font-size: clamp(2rem, 7.5vw, 2.75rem); margin: 0 0 14px; color: var(--ui-logo); font-weight: 400; letter-spacing: -0.02em; line-height: 1.2; }
.dh .dh-lede { font-weight: 500; font-size: 1.25rem; line-height: 1.6; color: var(--ui-text); max-width: 34ch; margin: 0 0 28px; }

.dh .dh-searchwrap { position: relative; margin-bottom: 14px; }
.dh #dhQ {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 1.125rem; font-weight: 400; color: var(--ui-text);
  background: var(--ui-paper); border: 0; box-shadow: inset 0 0 0 1px var(--ui-border-strong);
  clip-path: var(--chamfer-container-md); padding: 16px 16px 16px 46px;
}
.dh #dhQ::placeholder { color: var(--color-ink-faded); font-weight: 300; }
.dh .dh-searchicon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--color-ink-faded); }
.dh .dh-results {
  list-style: none; margin: 6px 0 0; padding: 0; background: var(--ui-paper); clip-path: var(--chamfer-container-md);
  position: absolute; left: 0; right: 0; z-index: 30;
  box-shadow: inset 0 0 0 1px var(--ui-border-strong);
}
.dh .dh-results:empty { display: none; }
.dh .dh-results button {
  display: flex; width: 100%; text-align: left; padding: 11px 14px; gap: 10px; align-items: baseline;
  border-bottom: 1px solid var(--ui-border); font-weight: 400; font-size: 1rem;
}
.dh .dh-results li:last-child button { border-bottom: 0; }
.dh .dh-results button:hover, .dh .dh-results button.dh-hot { background: var(--ui-bg); }
.dh .dh-results button.dh-empty { color: var(--color-ink-faded); cursor: default; }
.dh .dh-results .dh-where { margin-left: auto; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-ink-faded); flex: none; }
/* Prominence (task-040): a record folded behind a headword reads quieter
   in the suggestions — ranked below, still findable, never gone. */
.dh .dh-results button.dh-behind { color: var(--color-ink-faded); font-size: 0.92rem; }

.dh .dh-scanrow { display: flex; gap: 10px; align-items: center; margin-bottom: 34px; }
.dh .dh-or { color: var(--color-ink-faded); font-size: 0.875rem; }
.dh .dh-suggs { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 30px; }
@media (min-width: 560px) { .dh .dh-suggs { grid-template-columns: 1fr 1fr 1fr; } }
.dh .dh-sugg {
  text-align: left; background: var(--ui-paper); clip-path: var(--chamfer-affordance-md);
  box-shadow: inset 0 0 0 1px var(--ui-border);
  padding: 12px; display: flex; gap: 12px; align-items: center;
}
@media (min-width: 560px) { .dh .dh-sugg { flex-direction: column; align-items: stretch; } }
.dh .dh-sugg:hover { box-shadow: inset 0 0 0 1px var(--ui-border-strong); }
.dh .dh-sugg .dh-photo { width: 56px; height: 56px; flex: none; }
@media (min-width: 560px) { .dh .dh-sugg .dh-photo { width: 100%; height: 72px; } }
.dh .dh-sugg b { display: block; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.dh .dh-sugg small { display: block; font-size: 0.8125rem; color: var(--color-ink-faded); line-height: 1.45; margin-top: 3px; }

.dh .dh-eatrow { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.dh .dh-honesty { font-size: 0.875rem; color: var(--color-ink-faded); max-width: 44ch; line-height: 1.6; border-top: 1px solid var(--ui-border); padding-top: 16px; margin: 18px 0 0; }

/* ============================ THE STAND ============================ */
.dh-stand { display: flex; min-height: 70vh; flex-direction: column; }
.dh .dh-topbar {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  max-width: 760px; margin: 0 auto; width: 100%; box-sizing: border-box; flex-wrap: wrap;
}
.dh .dh-home { clip-path: var(--chamfer-affordance-sm); font-weight: 600; font-size: 0.9375rem; color: var(--ui-logo); padding: 6px 10px; display: inline-flex; gap: 8px; align-items: center; }
.dh .dh-home:hover { background: var(--ui-paper); }
.dh .dh-spacer { flex: 1; }
.dh .dh-chipwrap { margin-top: 0; }
.dh .dh-stage { flex: 1; max-width: 760px; margin: 0 auto; width: 100%; box-sizing: border-box; padding: 4px 12px 140px; overflow-x: hidden; }
.dh .dh-stageinner { display: flex; flex-direction: column; }

/* travel animation — the graph feels continuous, not paginated */
@media (prefers-reduced-motion: no-preference) {
  .dh .dh-stageinner.dh-t-up { animation: dh-from-top 0.26s ease-out; }
  .dh .dh-stageinner.dh-t-down { animation: dh-from-bottom 0.26s ease-out; }
  .dh .dh-stageinner.dh-t-left { animation: dh-from-right 0.26s ease-out; }
  .dh .dh-stageinner.dh-t-right { animation: dh-from-left 0.26s ease-out; }
  .dh .dh-stageinner.dh-t-fade { animation: dh-just-fade 0.26s ease-out; }
}
@keyframes dh-from-top { from { opacity: 0; transform: translateY(-26px); } to { opacity: 1; transform: none; } }
@keyframes dh-from-bottom { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes dh-from-left { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
@keyframes dh-from-right { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes dh-just-fade { from { opacity: 0; } to { opacity: 1; } }

/* provenance rail (upward) */
.dh .dh-updir { display: flex; justify-content: center; margin: 6px 0 2px; }
.dh .dh-prov { display: flex; flex-direction: column; align-items: center; }
.dh .dh-prov .dh-tile {
  clip-path: var(--chamfer-affordance-sm); background: var(--ui-paper);
  box-shadow: inset 0 0 0 1px var(--ui-border-strong);
  font-weight: 600; font-size: 0.875rem; padding: 7px 14px; max-width: 88vw;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dh .dh-prov .dh-tile:hover { box-shadow: inset 0 0 0 1px var(--ui-logo); }
.dh .dh-prov .dh-link {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  color: var(--color-ink-faded); font-size: 0.75rem; padding: 2px 0;
}
.dh .dh-prov .dh-link::before, .dh .dh-prov .dh-link::after { content: ""; width: 2px; height: 8px; background: var(--ui-border-strong); }
.dh .dh-prov .dh-link em { font-style: normal; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600; font-size: 0.6875rem; text-align: center; max-width: min(84vw, 440px); }
.dh .dh-rootnote { font-size: 0.8125rem; color: var(--color-ink-faded); text-align: center; padding: 4px 0 2px; margin: 0; }

/* across row: side tabs flank the focus card */
.dh .dh-acrossgrid { display: grid; grid-template-columns: 30px 1fr 30px; gap: 8px; align-items: stretch; margin: 10px 0; }
@media (min-width: 720px) { .dh .dh-acrossgrid { grid-template-columns: 120px 1fr 120px; gap: 12px; } }
.dh .dh-side {
  clip-path: var(--chamfer-affordance-sm); background: var(--ui-paper);
  box-shadow: inset 0 0 0 1px var(--ui-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-ink-faded); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.04em;
  padding: 8px 2px; min-height: 120px;
}
.dh .dh-side:hover { box-shadow: inset 0 0 0 1px var(--ui-border-strong); color: var(--ui-text); }
.dh .dh-side span { writing-mode: vertical-rl; max-height: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh .dh-side.dh-next span { transform: rotate(180deg); }
@media (min-width: 720px) {
  .dh .dh-side span { writing-mode: horizontal-tb; white-space: normal; max-height: none; text-align: center; padding: 0 8px; line-height: 1.4; }
  .dh .dh-side.dh-next span { transform: none; }
}
.dh .dh-side.dh-void { visibility: hidden; }

/* the focus card */
.dh .dh-focus {
  background: var(--ui-paper); clip-path: var(--chamfer-container-lg);
  padding: 18px 18px 16px; position: relative;
  filter: drop-shadow(0 1px 2px var(--dh-shadow));
}
.dh .dh-focus .dh-kicker { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.dh .dh-focus h2 { font-size: clamp(1.5rem, 5.5vw, 2rem); margin: 0 0 2px; overflow-wrap: anywhere; color: var(--ui-text); font-weight: 400; letter-spacing: -0.02em; line-height: 1.2; }
.dh .dh-focus h2:focus { outline: none; }
.dh .dh-clinical { font-size: 0.875rem; color: var(--color-ink-faded); margin: 0 0 14px; }
.dh .dh-focushero { display: flex; gap: 14px; align-items: stretch; }
.dh .dh-focus .dh-photo { width: 96px; min-height: 96px; flex: none; }
@media (min-width: 560px) { .dh .dh-focus .dh-photo { width: 128px; } }
@media (max-width: 419px) { .dh .dh-focushero { flex-direction: column; gap: 10px; } .dh .dh-focus .dh-photo { width: 100%; min-height: 64px; } }
.dh .dh-metric { flex: 1; min-width: 0; }
.dh .dh-metric .dh-num { font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
.dh .dh-metric .dh-num .dh-unit { font-size: 0.9375rem; color: var(--color-ink-faded); font-weight: 300; letter-spacing: 0; white-space: nowrap; }
.dh .dh-metric .dh-holebig { font-size: 1.15rem; font-weight: 400; color: var(--color-ink-faded); line-height: 1.35; padding-top: 6px; }
.dh .dh-metric .dh-basis { font-size: 0.8125rem; color: var(--color-ink-faded); margin: 4px 0 0; line-height: 1.45; }
.dh .dh-metricbar { height: 4px; background: var(--color-chart-cast-iron); clip-path: var(--chamfer-container-sm); margin: 8px 0 6px; max-width: 180px; }
.dh .dh-metricbar.dh-dim { opacity: 0.35; }
.dh .dh-leanrow { display: flex; justify-content: flex-end; margin-top: 12px; }

/* leaned-in detail */
.dh .dh-detail { border-top: 1px solid var(--ui-border); margin-top: 14px; padding-top: 14px; display: none; }
.dh .dh-detail.dh-open { display: block; }
.dh .dh-detail h3 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-ink-faded); margin: 16px 0 8px; }
.dh .dh-detail h3:first-child { margin-top: 0; }
.dh .dh-detail p { max-width: 60ch; margin: 0 0 8px; }
.dh .dh-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.dh .dh-fact { background: var(--ui-bg); clip-path: var(--chamfer-container-sm); padding: 9px 10px; border-left: 3px solid transparent; }
.dh .dh-fact b { display: block; font-weight: 600; font-size: 1rem; }
.dh .dh-fact b.dh-hole { font-weight: 300; }
.dh .dh-fact span { font-size: 0.75rem; color: var(--color-ink-faded); display: block; line-height: 1.4; }
.dh .dh-fact.dh-c-carbon { border-left-color: var(--color-chart-cast-iron); }
.dh .dh-fact.dh-c-water { border-left-color: var(--color-chart-patina); }
.dh .dh-fact.dh-c-land { border-left-color: var(--color-chart-sage); }
.dh .dh-dietrow { display: flex; gap: 6px; flex-wrap: wrap; }
.dh .dh-diet { font-size: 0.8125rem; font-weight: 600; padding: 4px 10px; clip-path: var(--chamfer-container-sm); background: var(--ui-bg); }
.dh .dh-diet.dh-in { color: var(--ui-success); }
.dh .dh-diet.dh-out { color: var(--color-ink-faded); text-decoration: line-through; }
.dh .dh-diet.dh-check::after { content: " — check"; font-weight: 300; color: var(--color-ink-faded); }
.dh .dh-journey { list-style: none; margin: 0; padding: 0; }
.dh .dh-journey li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--ui-border); font-size: 0.9375rem; align-items: baseline; }
.dh .dh-journey li:last-child { border-bottom: 0; }
.dh .dh-journey .dh-step { font-weight: 600; flex: none; color: var(--color-ink-faded); font-size: 0.8125rem; width: 1.4em; text-align: right; }
.dh .dh-journey .dh-yield { margin-left: auto; flex: none; font-size: 0.8125rem; color: var(--color-ink-faded); }
.dh .dh-srcline { font-size: 0.8125rem; color: var(--color-ink-faded); line-height: 1.6; }

/* downward rail */
.dh .dh-downdir { margin: 16px 2px 8px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dh .dh-more { font-size: 0.8125rem; color: var(--color-ink-faded); font-weight: 300; text-transform: none; letter-spacing: 0; }
.dh .dh-kids { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.dh .dh-kids::-webkit-scrollbar { height: 6px; }
.dh .dh-kids::-webkit-scrollbar-thumb { background: var(--ui-border-strong); }
.dh .dh-kid {
  flex: 0 0 148px; scroll-snap-align: start; text-align: left;
  background: var(--ui-paper); clip-path: var(--chamfer-affordance-md);
  box-shadow: inset 0 0 0 1px var(--ui-border);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-height: 84px;
}
.dh .dh-kid:hover { box-shadow: inset 0 0 0 1px var(--ui-border-strong); }
.dh .dh-kid b { font-weight: 600; font-size: 0.875rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dh .dh-kid small { margin-top: auto; font-size: 0.75rem; color: var(--color-ink-faded); }
.dh .dh-leafnote { font-size: 0.875rem; color: var(--color-ink-faded); padding: 6px 2px 14px; max-width: 46ch; line-height: 1.6; margin: 0; }
.dh .dh-morecard {
  flex: 0 0 120px; background: transparent; clip-path: var(--chamfer-container-md);
  border: 1px dashed var(--ui-border-strong); display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem; color: var(--color-ink-faded); text-align: center; padding: 10px; line-height: 1.5;
}
.dh .dh-keyhints { display: none; font-size: 0.75rem; color: var(--color-ink-faded); letter-spacing: 0.03em; text-align: center; padding: 10px 0 0; margin: 0; }
@media (min-width: 720px) { .dh .dh-keyhints { display: block; } }

/* ============================ THE WALK LEDGER ============================ */
.dh .dh-ledger {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--ui-paper);
  filter: drop-shadow(0 -2px 6px var(--dh-shadow));
  clip-path: polygon(10px 0%, calc(100% - 10px) 0%, 100% 10px, 100% 100%, 0% 100%, 0% 10px);
}
.dh .dh-ledger-inner { max-width: 760px; margin: 0 auto; padding: 10px 16px 12px; }
.dh #dhLedgerBtn { display: flex; width: 100%; align-items: center; gap: 10px; text-align: left; }
.dh #dhLedgerBtn .dh-lbl { white-space: nowrap; flex: none; }
.dh .dh-walksum { margin-left: auto; font-weight: 600; font-size: 0.9375rem; white-space: nowrap; }
.dh .dh-walksum small { font-weight: 300; color: var(--color-ink-faded); }
@media (max-width: 479px) { .dh .dh-walksum small { display: none; } .dh .dh-walksum { font-size: 0.875rem; } }
.dh .dh-walkbar { display: flex; gap: 2px; height: 10px; flex: 1; min-width: 36px; max-width: 300px; background: var(--ui-bg); clip-path: var(--chamfer-container-sm); overflow: hidden; }
.dh .dh-walkbar i { display: block; height: 100%; }
/* Segment size carries the data: JS sets --dh-grow (a ratio, not chrome). */
.dh .dh-walkbar i.dh-seg { flex: var(--dh-grow, 1) 1 6px; background: var(--dh-hue, var(--ui-border-strong)); }
.dh .dh-walkbar i.dh-unk {
  flex: 0 0 16px;
  background: repeating-linear-gradient(45deg, transparent 0 3px, var(--ui-border-strong) 3px 5px);
}
.dh .dh-ledger-more { display: none; border-top: 1px solid var(--ui-border); margin-top: 10px; padding-top: 10px; }
.dh .dh-ledger-more.dh-open { display: block; }
.dh .dh-assume { font-size: 0.8125rem; color: var(--color-ink-faded); margin: 0 0 8px; line-height: 1.55; }
.dh .dh-walklist { list-style: none; max-height: 200px; overflow-y: auto; margin: 0; padding: 0; }
.dh .dh-walklist li { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--ui-border); font-size: 0.875rem; }
.dh .dh-walklist li:last-child { border-bottom: 0; }
.dh .dh-walklist .dh-dot { width: 10px; height: 10px; flex: none; clip-path: var(--chamfer-container-sm); align-self: center; background: var(--dh-hue, var(--ui-border-strong)); }
.dh .dh-walklist .dh-dot.dh-unk { background: repeating-linear-gradient(45deg, transparent 0 2px, var(--ui-border-strong) 2px 4px); }
.dh .dh-walklist .dh-ground-note { font-size: 0.75rem; color: var(--color-ink-faded); }
.dh .dh-walklist .dh-val { margin-left: auto; font-weight: 600; white-space: nowrap; }
.dh .dh-walklist .dh-val.dh-hole { font-weight: 300; }
.dh .dh-ledgerfoot { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.dh .dh-legend { display: flex; gap: 12px; font-size: 0.75rem; color: var(--color-ink-faded); margin-left: auto; flex-wrap: wrap; }
.dh .dh-legend i { display: inline-block; width: 9px; height: 9px; clip-path: var(--chamfer-container-sm); margin-right: 4px; vertical-align: baseline; background: var(--dh-hue, var(--ui-border-strong)); }
.dh .dh-legend i.dh-unk { background: repeating-linear-gradient(45deg, transparent 0 2px, var(--ui-border-strong) 2px 4px); }
.dh .dh-metricdot { width: 9px; height: 9px; clip-path: var(--chamfer-container-sm); display: inline-block; }
.dh .dh-metricdot-carbon { background: var(--color-chart-cast-iron); }
.dh .dh-metricdot-protein { background: var(--color-chart-fig); }

/* The data ramp follows the entity (its subtree), never chrome. */
.dh .dh-hue-rice { --dh-hue: var(--color-chart-cedar); }
.dh .dh-hue-beef { --dh-hue: var(--color-chart-rhubarb); }
.dh .dh-hue-dairy { --dh-hue: var(--color-chart-enamel); }

/* toast + scan sheet */
.dh .dh-toast {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--ui-paper); clip-path: var(--chamfer-container-md);
  box-shadow: inset 0 0 0 1px var(--color-action-terracotta);
  padding: 10px 16px; font-size: 0.875rem; font-weight: 400; max-width: 88vw;
  opacity: 0; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) { .dh .dh-toast { transition: opacity 0.2s; } }
.dh .dh-toast.dh-show { opacity: 1; }
.dh .dh-toast.dh-calm { box-shadow: inset 0 0 0 1px var(--ui-border-strong); }
.dh .dh-scansheet {
  position: fixed; inset: 0; z-index: 50; display: none; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, 0.4);
}
.dh .dh-scansheet.dh-open { display: flex; }
.dh .dh-sheet {
  background: var(--ui-paper); clip-path: var(--chamfer-container-lg);
  margin: 0 12px 18px; padding: 20px; max-width: 480px;
}
.dh .dh-sheet h2 { font-size: 1.25rem; margin: 0 0 8px; color: var(--ui-text); }
.dh .dh-sheet p { margin: 0 0 16px; color: var(--ui-text); }
