/* DASHBOARD1 V0.6.3 local styles (the phone layer is the last block). Loaded after the shared momentum.css and app.css, which stay
   untouched. Nothing here touches the first screen (00 to 06): every rule is scoped to the
   d1- sections 07 to 10, the A to Z drawer or the header search results.
   Rule for every grid below: the column count divides the item count, so rows are always full. */

:root { --d1-gap: 16px; --d1-gold: #fabd59; }

.d1-sec-intro { margin: 0 0 var(--d1-gap); font-size: 13px; color: var(--mom-text-dim, #b8ae9c); }
.d1-sec-foot { margin-top: var(--d1-gap); display: flex; justify-content: flex-end; }
.d1-all-btn { cursor: pointer; }

/* Placeholder layer: the item's own name, shown on a panel-style background until the image paints over it. */
.d1-media { position: relative; overflow: hidden; background: linear-gradient(145deg, rgba(240, 193, 115, 0.10), rgba(0, 0, 0, 0.55)); }
.d1-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center;
  font-family: var(--mom-font-head); font-weight: var(--mom-font-head-weight, 400); font-size: 12px; letter-spacing: 0.4px; line-height: 1.25; color: var(--mom-gold, #f0c173); text-transform: uppercase; }
.d1-media.is-loaded .d1-ph { visibility: hidden; }
.d1-media img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* 07 tool tiles: 16 = 4x4 (8x2 on very wide screens, 2x8, 1x16). The tile is a div; the name link covers it. */
.d1-tool-grid { display: grid; grid-auto-rows: 1fr; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--d1-gap); }
.d1-tile {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: start; min-width: 0;
  padding: 12px; color: inherit;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--mom-border-soft); border-radius: var(--mom-radius-xs, 6px);
}
.d1-tile:hover, .d1-tile:focus-within { border-color: var(--mom-gold, #f0c173); background: var(--mom-gold-dim, rgba(240,193,115,0.08)); }
.d1-tile-icon { width: 56px; height: 56px; aspect-ratio: 1 / 1; border-radius: var(--mom-radius-xs, 6px); border: 1px solid var(--mom-border-soft); display: flex; align-items: center; justify-content: center; color: var(--mom-gold, #f0c173); }
.d1-tile-icon img { object-fit: cover; }
.d1-ico { display: block; position: relative; }
.d1-tile-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; height: 100%; }
.d1-tile-name { font-family: var(--mom-font-head); font-weight: var(--mom-font-head-weight, 400); font-size: 14px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--mom-gold, #f0c173); text-decoration: none; }
.d1-tile-name::after { content: ''; position: absolute; inset: 0; }
.d1-tile-line { font-size: 12.5px; line-height: 1.4; color: var(--mom-text, #e8e2d4); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; min-height: 5.6em; }
.d1-tile-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; min-height: 44px; align-content: flex-start; }
.d1-tag, .d1-state { position: relative; font-family: var(--mom-font-mono); font-size: 10px; letter-spacing: 0.6px; line-height: 1.3; padding: 2px 6px; border-radius: 3px; border: 1px solid var(--mom-border-strong, #5a4a2a); color: var(--mom-text-dim, #b8ae9c); text-decoration: none; }
.d1-writes { border-style: dashed; }
.d1-state--ready { color: #07140b; background: var(--mom-green, #4ade80); border-color: var(--mom-green, #4ade80); font-weight: 700; }
.d1-state--needs { color: #1a1a1a; background: var(--d1-gold); border-color: var(--d1-gold); font-weight: 700; z-index: 1; }
a.d1-state--needs:hover, a.d1-state--needs:focus-visible { background: #ffd27f; }

/* Star ratings: reserve the row's height always, hide it (not remove it) until the API has answered. */
.d1-rate { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; min-height: 28px; visibility: hidden; }
.d1-rate.is-live { visibility: visible; }
.d1-stars { display: inline-flex; gap: 2px; }
.d1-star { appearance: none; background: transparent; border: 0; margin: 0; padding: 2px; width: 24px; height: 24px; border-radius: 0; cursor: pointer; color: var(--d1-gold); line-height: 0; }
.d1-star svg { display: block; fill: transparent; stroke: var(--d1-gold); }
.d1-star.is-on svg { fill: var(--d1-gold); }
.d1-star.is-mine { outline: 2px solid #fff; outline-offset: -1px; }
.d1-stars:hover .d1-star svg { fill: var(--d1-gold); }
.d1-stars .d1-star:hover ~ .d1-star svg { fill: transparent; }
.d1-star:focus-visible { outline: 2px solid var(--d1-gold); outline-offset: 1px; }
.d1-rate-text { font-size: 11.5px; line-height: 1.2; color: var(--mom-text-dim, #b8ae9c); min-width: 0; }
.d1-rate-avg { color: var(--d1-gold); font-weight: 700; font-size: 13px; }
.d1-rate-mine { margin-left: 4px; font-family: var(--mom-font-mono); font-size: 10px; letter-spacing: 0.6px; color: #fff; }

/* 08 programs and videos: 12 cards = 6x2 (4x3, 3x4, 2x6, 1x12). 09 events: 8 cards = 4x2 (2x4, 1x8). */
.d1-card-grid, .d1-event-grid { display: grid; grid-auto-rows: 1fr; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--d1-gap); }
.d1-event-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.d1-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px; color: inherit; text-decoration: none; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--mom-border-soft); border-radius: var(--mom-radius-xs, 6px); }
.d1-card:hover, .d1-card:focus-visible { border-color: var(--mom-gold, #f0c173); }
.d1-card-img { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; }
.d1-card-pic { object-fit: cover; }
.d1-event-grid .d1-card-pic { object-position: 50% 30%; }
.d1-card-img--text { display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, rgba(240, 193, 115, 0.10), rgba(0, 0, 0, 0.55)); border: 1px solid var(--mom-border-soft); }
.d1-kicker { font-family: var(--mom-font-mono); font-size: 12px; letter-spacing: 1.4px; color: var(--mom-gold, #f0c173); text-align: center; padding: 0 10px; }
.d1-card-name { font-family: var(--mom-font-head); font-weight: var(--mom-font-head-weight, 400); font-size: 14px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--mom-gold, #f0c173); line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d1-card-line { font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 4.2em; }

/* Today's Wisdom, inline at the end of the quick links panel. */
.d1-wisdom-row { display: flex; justify-content: flex-end; margin-top: var(--d1-gap); }
#wisdom-btn-mount { display: flex; justify-content: flex-end; }

/* 10 library: two shelves of 14 = 14x1 (7x2, 2x7). */
.d1-hub { margin-left: auto; font-family: var(--mom-font-mono); font-size: 11px; letter-spacing: 0.8px; color: var(--mom-gold, #f0c173); }
.d1-shelf-head { margin: 0 0 8px; font-family: var(--mom-font-mono); font-size: 11px; letter-spacing: 1px; color: var(--mom-text-dim, #b8ae9c); }
.d1-shelf-head:not(:first-of-type) { margin-top: var(--d1-gap); }
.d1-shelf-note { margin-left: 8px; opacity: 0.8; }
.d1-cover-strip { display: grid; grid-auto-rows: 1fr; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: var(--d1-gap) 12px; }
.d1-book { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: inherit; text-decoration: none; }
.d1-book-cover { display: block; position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 4px; border: 1px solid var(--mom-border-soft); overflow: hidden; }
.d1-book-pic { object-fit: cover; }
.d1-book-cover--text { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 10px 26px; text-align: center; position: relative; border: 2px solid var(--mom-gold, #f0c173);
  background: radial-gradient(120% 90% at 50% 0%, rgba(240, 193, 115, 0.22), rgba(26, 26, 26, 0.96) 62%), linear-gradient(160deg, #1a1a1a, #000); box-shadow: inset 0 0 0 4px #000, inset 0 0 0 5px rgba(240, 193, 115, 0.45); }
.d1-book-cover--text .d1-book-title { font-size: 13px; line-height: 1.25; }
.d1-book-mark { position: absolute; left: 0; right: 0; bottom: 10px; font-family: var(--mom-font-mono); font-size: 7.5px; letter-spacing: 1.6px; color: var(--mom-gold, #f0c173); opacity: 0.8; }
.d1-book-title { font-family: var(--mom-font-head); font-weight: var(--mom-font-head-weight, 400); font-size: 12px; letter-spacing: 0.4px; line-height: 1.25; color: var(--mom-gold, #f0c173); text-transform: uppercase; overflow-wrap: anywhere; }
.d1-book:hover .d1-book-cover, .d1-book:focus-visible .d1-book-cover { border-color: var(--mom-gold, #f0c173); }
.d1-book-name { font-size: 11.5px; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Header search results and the A to Z drawer. */
a.sr-item, a.sr-item:hover, a.sr-item:visited { color: inherit; text-decoration: none; }
.sr-item.d1-sr { cursor: pointer; }
.sr-item .d1-sr-note { display: block; font-size: 0.85em; opacity: 0.7; }
.d1-drawer-icon .d1-tile-img { width: 22px; height: 22px; border-radius: 4px; position: static; }

/* ---- Responsive: every step keeps column counts that divide the item counts. */
@media (min-width: 2200px) {
  .d1-tool-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .d1-tile { grid-template-columns: 1fr; justify-items: start; }
  .d1-event-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 1799px) { .d1-cover-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (max-width: 1499px) { .d1-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* The shared sheet orders the first-screen panels with flex order at 900px and below. Sections 07 to 10 follow them in their own order. */
@media (max-width: 900px) { #d1-tools, #d1-programs, #d1-events, #d1-library { order: 9; } }
@media (max-width: 1099px) {
  .d1-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d1-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .d1-event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
  .d1-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d1-cover-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  .d1-tool-grid { grid-template-columns: 1fr; }
  .d1-card-grid { grid-template-columns: 1fr; }
  .d1-event-grid { grid-template-columns: 1fr; }
}

/* ---- HIGHLIGHTED TOOLS band: the original START HERE look, four cards in the row. ---- */
.start-band.d1-feature { grid-template-columns: auto repeat(4, minmax(0, 1fr)); }
.d1-feat { position: relative; }
.d1-feat .nav-icon { overflow: hidden; }
.d1-feat .nav-icon .d1-ico { width: 20px; height: 20px; }
.d1-feat .nav-icon img { object-fit: cover; }
.d1-feat-link { color: inherit; text-decoration: none; }
.d1-feat-link::after { content: ''; position: absolute; inset: 0; }
.d1-feat-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d1-rate--feat { min-height: 26px; }
.d1-rate--feat .d1-star { padding: 1px; width: 22px; height: 22px; }
.d1-rate--feat .d1-star svg { width: 16px; height: 16px; }
@media (max-width: 1180px) { .start-band.d1-feature { grid-template-columns: repeat(2, minmax(0, 1fr)); } .start-band.d1-feature .start-band-label { grid-column: 1 / -1; } }
@media (max-width: 640px) { .start-band.d1-feature { grid-template-columns: minmax(0, 1fr); } }

/* ---- 01 PORTALS rail: dashboard1 mapping. Rows are the shared .mom-nav-item, unchanged. ---- */
.d1-rail-az { flex: 0 0 auto; margin-top: 12px; width: 100%; cursor: pointer; }
.d1-drow { margin-bottom: 6px; }
.d1-drow .drawer-item { margin-bottom: 0; }
.d1-rate--row { min-height: 28px; padding-left: 44px; }
.d1-vl-cta { display: block; text-decoration: none; margin-bottom: 8px; }
.portal-rail .mom-portal-list { justify-content: space-between; }
@media (max-width: 1180px) { .portal-rail .mom-portal-list { justify-content: flex-start; } }

/* PROGRESS: NEXT is a link. */
.live-progress-value a { color: var(--mom-gold, #fabd59); text-decoration: underline; text-underline-offset: 2px; }

/* Drawers fit the viewport on a phone, and a CLOSE button ends every drawer. */
.d1-drawer-foot { display: none; }
@media (max-width: 760px) {
  .drawer-overlay { left: auto; right: 0; width: 100vw; max-width: 100%; box-sizing: border-box; }
  .d1-drawer-foot { display: block; position: sticky; bottom: 0; padding: 12px 0 4px; background: var(--mom-bg-modal, #141210); }
  .d1-drawer-closebtn { width: 100%; cursor: pointer; }
}
/* ---- V0.6.3: compact tool tiles (8 x 2 at 1920, 4 x 4 at 1440) and the gold ALL buttons. ---- */
.d1-allbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 8px 14px; border: 0; border-radius: 7px; background: #fabd59; color: #000;
  font-family: var(--mom-font-head); font-weight: 400; font-size: 12px; letter-spacing: 0.8px; line-height: 1; text-transform: uppercase; white-space: nowrap; text-decoration: none; cursor: pointer; }
.d1-allbtn:hover, .d1-allbtn:focus-visible { background: #ffd27f; color: #000; }
.d1-allbtn svg { flex: none; display: block; }
.d1-head-btn { margin-left: auto; }
.d1-hub + .d1-head-btn { margin-left: 14px; }
.d1-rail-az { flex: 0 0 auto; width: 100%; margin-top: 12px; }
@media (min-width: 1700px) { .d1-tool-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (min-width: 768px) {
  .d1-tool-grid { gap: 12px; }
  .d1-tile { display: flex; flex-direction: column; align-items: stretch; justify-items: stretch; gap: 0; padding: 10px 10px 8px; }
  .d1-tile-icon { position: absolute; top: 10px; left: 10px; width: 32px; height: 32px; }
  .d1-tile-icon .d1-ico { width: 20px; height: 20px; }
  .d1-tile-body { flex: 1 1 auto; height: auto; gap: 5px; }
  .d1-tile-name { display: flex; align-items: center; min-height: 32px; padding-left: 40px; font-size: 12px; line-height: 1.2; }
  .d1-tile-line { font-size: 12px; line-height: 1.35; -webkit-line-clamp: 2; min-height: 0; }
  .d1-tile-meta { flex-wrap: nowrap; gap: 4px; min-height: 0; margin-top: auto; align-content: normal; }
  .d1-tile-meta .d1-tag, .d1-tile-meta .d1-state { min-width: 0; padding: 1px 4px; font-size: 9px; letter-spacing: 0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .d1-tile-meta .d1-state { flex: none; }
  .d1-tile-meta .d1-tag { flex: 0 1 auto; }
  .d1-tile-line + .d1-rate, .d1-tile-meta + .d1-rate { margin-top: 0; }
  .d1-tile-line + .d1-rate { margin-top: auto; }
  .d1-tile .d1-rate { min-height: 22px; gap: 6px; }
  .d1-tile .d1-star { width: 18px; height: 18px; padding: 2px; }
  .d1-tile .d1-star svg { width: 14px; height: 14px; }
  .d1-tile .d1-rate-avg { font-size: 11px; }
  .d1-sec-intro { margin-bottom: 12px; }
}

/* =====================================================================================================
   V0.6.1 PHONE LAYER. Everything below applies at 767px and below only. At 768px and up the only rules
   that exist are the five display:none lines directly below, which hide markup that only phones use.
   Momentum rules hold: gold on black, Russo One headings, Inter body, squared corners (6 to 10px),
   no italics, no round controls. Every control is at least 44px in both directions.
   ===================================================================================================== */
.d1-m-vault, .d1-m-live, #d1-bottombar, .d1-m-more, .d1-m-sheet, .d1-rate-open { display: none; }

@media (max-width: 767px) {
  :root { --d1-bar-h: 60px; --d1-pad: 16px; }
  body { padding-bottom: calc(var(--d1-bar-h) + env(safe-area-inset-bottom, 0px) + 12px); }
  html.d1-m-noscroll, html.d1-m-noscroll body { overflow: hidden; }

  /* V0.6.3: the bottom bar is fully opaque and sits above content; the page clears it exactly. */
  body { padding-bottom: calc(var(--d1-bar-h) + env(safe-area-inset-bottom, 0px)); }
  html body #d1-bottombar { box-sizing: border-box; background: #000 !important; background-color: #000 !important; z-index: 9990; isolation: isolate; }
  html body #d1-bottombar .d1-bb { background-color: #000; }
  html body #d1-bottombar .d1-bb.is-current { background: linear-gradient(rgba(250, 189, 89, 0.12), rgba(250, 189, 89, 0.12)), #000; }
  .d1-allbtn { min-height: 44px; padding: 0 14px; }
  #d1-tools .mom-section-label, #d1-programs .mom-section-label, #d1-library .mom-section-label { flex-wrap: wrap; gap: 8px; }
  .d1-head-btn { margin-left: 0; }
  /* ---- Page frame: 16px gutter, panels full width, one column. ---- */
  main { padding: 10px var(--d1-pad) 12px; gap: 8px; }
  .mom-panel { padding: 12px 14px 14px; }
  main > section, main > div { min-width: 0; }

  /* ---- Header (V0.6.1): two rows, nothing overlaps at 320 to 430. The grid places each piece itself:
     row 1 logo, version chip, avatar, OrO; row 2 search and Feedback. VAULT, OrO and LIVE buttons are dropped on a
     phone because the bottom bar, the OrO circle in row 1 and the red LIVE button below the header cover them. ---- */
  html body #mn-bar { position: relative; padding: 8px var(--d1-pad); }
  html body #mn-wrap { display: grid !important; grid-template-columns: 44px minmax(0, 1fr) 44px 44px; grid-template-areas: none; gap: 8px; align-items: center; }
  html body #mn-lead, html body #mn-centre, html body #mn-trail, html body #mn-btns, html body #mn-user { display: contents !important; }
  html body #mn-logo { grid-column: 1; grid-row: 1; min-height: 44px; min-width: 44px; width: 44px; gap: 0; }
  html body #mn-logo .mn-logo-mark { width: 44px; height: 44px; }
  html body #mn-preview-chip { grid-column: 2; grid-row: 1; justify-self: start; min-height: 44px; padding: 0 8px; font-size: 9px; letter-spacing: 0.6px; white-space: nowrap; }
  html body #mn-avatar { grid-column: 3; grid-row: 1; width: 44px; height: 44px; }
  html body #oro-launcher-btn { grid-column: 4; grid-row: 1; }
  html body #mn-bar .search-wrap { grid-column: 1 / 4; grid-row: 2; max-width: none; min-width: 0; width: 100%; }
  html body #mn-bar #search-input { height: 44px; min-height: 44px; font-size: 16px; width: 100%; }
  html body #mn-feedback { grid-column: 4; grid-row: 2; min-width: 44px; min-height: 44px; justify-content: center; padding: 0; }
  html body #mn-vault, html body #mn-oro, html body #mn-live, html body #mn-readouts { display: none !important; }

  /* ---- Reading order. The orb is replaced by the YOUR VAULT step list, which follows the orb order. ---- */
  #orb-col { display: none; }
  main > #d1-m-vault { order: 1; }
  #live-sessions-panel { order: 2; }
  #live-progress-panel { order: 3; }
  #note-panel { order: 4; }
  #portal-rail { order: 5; }
  #start-band { order: 6; }
  #d1-tools { order: 7; }
  #d1-programs { order: 8; }
  #d1-events { order: 9; }
  #d1-library { order: 10; }
  #release-feed-panel { order: 11; }
  #replays-panel { order: 12; }
  #quick-links-panel { order: 13; }
  #telemetry-panel { order: 14; }
  #topic-browser-panel { order: 15; }
  #video-library-panel { order: 16; }
  html body .mom-panel { scroll-margin-top: 8px; }

  /* ---- Red LIVE button, first thing under the header ---- */
  main > #d1-m-live { order: 0; }
  .d1-m-live { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 12px; text-decoration: none;
    background: #DC143C; color: #fff; border-radius: 8px; box-shadow: 0 6px 18px rgba(220, 20, 60, 0.35); font-family: var(--mom-font-head); font-weight: var(--mom-font-head-weight, 400); }
  .d1-m-live-k { font-size: 22px; letter-spacing: 3px; line-height: 1.1; }
  .d1-m-live-sub { font-family: var(--mom-font-mono); font-size: 11px; letter-spacing: 0.6px; line-height: 1.2; color: #fff; text-align: center; }
  .d1-m-live-sub:empty { display: none; }
  .d1-m-live:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

  /* ---- YOUR VAULT step list ---- */
  .d1-m-vault { display: block; }
  .d1-m-continue { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; margin: 4px 0 12px; padding: 0 16px;
    background: var(--d1-gold); color: #1a1a1a; border-radius: 8px; text-decoration: none; font-family: var(--mom-font-head); font-weight: var(--mom-font-head-weight, 400); letter-spacing: 1px; }
  .d1-m-continue-k { font-size: 14px; }
  .d1-m-continue-v { font-size: 13px; text-align: right; text-transform: uppercase; }
  .d1-m-continue:focus-visible, .d1-m-step:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  .d1-m-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
  .d1-m-step { display: grid; grid-template-columns: 32px minmax(0, 1fr) 20px; gap: 10px; align-items: center; min-height: 67px; padding: 6px 10px; color: inherit; text-decoration: none;
    background: rgba(0, 0, 0, 0.35); border: 1px solid var(--mom-border-soft); border-radius: 8px; }
  .d1-m-step.is-next { border-color: var(--d1-gold); }
  .d1-m-step.is-done { background: rgba(250, 189, 89, 0.08); }
  .d1-m-step-n { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--mom-border-strong, #5a4a2a); border-radius: 6px;
    font-family: var(--mom-font-head); font-size: 15px; color: var(--d1-gold); }
  .d1-m-step.is-next .d1-m-step-n { background: var(--d1-gold); color: #1a1a1a; border-color: var(--d1-gold); }
  .d1-m-step-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .d1-m-step-name { font-family: var(--mom-font-head); font-weight: var(--mom-font-head-weight, 400); font-size: 14px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--d1-gold); }
  .d1-m-step-done { font-family: var(--mom-font-mono); font-size: 10px; letter-spacing: 0.8px; color: var(--mom-green, #4ade80); }
  .d1-m-step-line { font-size: 12px; line-height: 1.3; color: var(--mom-text, #e8e2d4); }
  .d1-m-step-go { display: flex; align-items: center; justify-content: center; color: var(--d1-gold); }

  /* ---- Bottom bar ---- */
  #d1-bottombar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
    height: calc(var(--d1-bar-h) + env(safe-area-inset-bottom, 0px)); padding: 0 0 env(safe-area-inset-bottom, 0px);
    background: #000; border-top: 2px solid var(--d1-gold); box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.6); }
  .d1-bb { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 56px; padding: 6px 2px;
    margin: 0; background: transparent; border: 0; border-radius: 0; color: var(--d1-gold); text-decoration: none; cursor: pointer; font-family: var(--mom-font-body, Inter, sans-serif); -webkit-tap-highlight-color: transparent; }
  .d1-bb svg { display: block; flex: none; }
  .d1-bb span { font-family: var(--mom-font-mono); font-size: 10px; letter-spacing: 0.8px; line-height: 1; text-transform: uppercase; color: var(--mom-text-dim, #b8ae9c); }
  .d1-bb.is-current { background: rgba(250, 189, 89, 0.12); }
  .d1-bb.is-current span { color: var(--d1-gold); font-weight: 700; }
  .d1-bb.is-current::before { content: ''; position: absolute; left: 0; right: 0; top: -2px; height: 3px; background: #fff; }
  .d1-bb:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }

  /* ---- Live: compact, four buttons 2 by 2 ---- */
  #live-sessions-panel .live-rotation { gap: 6px; }
  .live-rotation-row { padding: 6px 10px; gap: 8px; }
  .live-rotation-name { font-size: 13px; line-height: 1.25; }
  .live-rotation-host { margin-top: 1px; font-size: 10.5px; }
  .live-times { margin: 8px 0 0; font-size: 10px; }
  .live-cta-grid { gap: 8px; margin-top: 10px; }
  .live-cta { min-height: 44px; }
  .d1-all-btn, .d1-rail-az { min-height: 44px; }
  .d1-sec-foot .d1-all-btn { width: 100%; }
  .d1-hub { display: inline-flex; align-items: center; min-height: 44px; }

  /* ---- Portals: two columns, rows at 56px, an odd last row spans both ---- */
  .portal-rail .mom-portal-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; justify-content: stretch; }
  .portal-rail .mom-nav-item { min-height: 56px; margin: 0; padding: 8px 10px; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; }
  .portal-rail .mom-nav-item .nav-label { font-size: 12px; letter-spacing: 0.4px; overflow-wrap: anywhere; }
  .portal-rail .mom-portal-list > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .d1-rail-az { margin-top: 8px; }

  /* ---- Show all: a short first set for long secondary blocks ---- */
  .d1-m-more { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin: 12px 0 0; padding: 0 12px; cursor: pointer;
    background: transparent; border: 1px solid var(--mom-border-strong, #5a4a2a); border-radius: 8px; color: var(--d1-gold);
    font-family: var(--mom-font-mono); font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
  .d1-m-more[hidden] { display: none; }
  .d1-m-more:focus-visible { outline: 2px solid var(--d1-gold); outline-offset: 2px; }
  .is-d1-collapsed[data-d1-keep="3"] > :nth-child(n+4),
  .is-d1-collapsed[data-d1-keep="4"] > :nth-child(n+5),
  .is-d1-collapsed[data-d1-keep="6"] > :nth-child(n+7),
  .is-d1-collapsed[data-d1-keep="8"] > :nth-child(n+9) { display: none; }
  #note-panel, #release-feed-panel, #replays-panel { height: auto; max-height: none; flex: none; }
  .notewell-body, .release-body, .replays-body { height: auto; max-height: none; overflow: visible; flex: none; }
  .replay-row { min-height: 44px; }
  #note-body.is-d1-collapsed .note-sec-body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .note-sec { margin-bottom: 8px; }
  .live-progress-panel { padding: 10px 14px; }
  .release-row-body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  #release-body:not(.is-d1-collapsed) .release-row-body { -webkit-line-clamp: unset; display: block; overflow: visible; }

  /* ---- Highlighted tools: 2 by 2 ---- */
  .start-band.d1-feature { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .start-band.d1-feature .start-band-label { grid-column: 1 / -1; flex-wrap: wrap; }
  .start-band.d1-feature { align-items: stretch; grid-template-rows: auto repeat(2, minmax(0, 1fr)); }
  .start-tile.d1-feat { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; padding: 10px; min-width: 0; }
  .d1-feat .nav-icon { position: absolute; top: 12px; left: 10px; width: 28px; height: 28px; }
  .d1-feat .start-tile-text { gap: 6px; flex: 1 1 auto; }
  .d1-feat .start-tile-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
  .d1-feat-link { display: flex; align-items: center; min-height: 44px; padding-left: 36px; font-size: 11.5px; letter-spacing: 0; line-height: 1.2; overflow-wrap: break-word; }
  .d1-feat-line { -webkit-line-clamp: 2; font-size: 12px; line-height: 1.3; }
  .d1-feat .mom-badge { display: inline-block; margin-top: 2px; }

  /* ---- 07 Tools: 2 columns, equal cards ---- */
  .d1-sec { padding: 12px 14px 14px; }
  .d1-sec-intro { display: none; }
  .d1-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .d1-tile { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px; align-content: start; }
  .d1-tile-icon { position: absolute; top: 12px; left: 10px; width: 28px; height: 28px; }
  .d1-tile-icon .d1-ico { width: 20px; height: 20px; }
  .d1-tile-body { gap: 6px; }
  .d1-tile-name { display: flex; align-items: center; min-height: 44px; padding-left: 36px; font-size: 11.5px; letter-spacing: 0; line-height: 1.2; overflow-wrap: break-word; }
  .d1-tile-line { font-size: 12px; -webkit-line-clamp: 2; min-height: 0; }
  .d1-tile-meta { min-height: 0; margin-top: 0; }
  .d1-tag { display: none; }
  .d1-state { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; font-size: 11px; text-align: center; }
  .d1-state--ready { min-height: 32px; }

  /* ---- Ratings: one Rate button per card, the five stars live in the bottom sheet ---- */
  .d1-rate { min-height: 44px; width: 100%; }
  .d1-rate:not(.d1-rate--sheet) .d1-stars, .d1-rate:not(.d1-rate--sheet) .d1-rate-text { display: none; }
  .d1-rate:not(.d1-rate--sheet) .d1-rate-open { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 10px; margin: 0;
    background: transparent; border: 1px solid var(--mom-border-strong, #5a4a2a); border-radius: 6px; color: var(--d1-gold); cursor: pointer;
    font-family: var(--mom-font-mono); font-size: 12px; letter-spacing: 0.6px; }
  .d1-rate-open svg { width: 18px; height: 18px; fill: var(--d1-gold); stroke: var(--d1-gold); flex: none; }
  .d1-rate-open:focus-visible { outline: 2px solid var(--d1-gold); outline-offset: 2px; }
  .d1-rate--row { padding-left: 0; }
  .d1-rate--feat { min-height: 44px; }
  .d1-m-sheet { display: flex; position: fixed; inset: 0; z-index: 10020; align-items: flex-end; }
  .d1-m-sheet[hidden] { display: none; }
  .d1-m-sheet-back { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); }
  .d1-m-sheet-card { position: relative; width: 100%; display: flex; flex-direction: column; gap: 12px; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: #1a1a1a; border-top: 2px solid var(--d1-gold); }
  .d1-m-sheet-title { font-family: var(--mom-font-head); font-size: 15px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--d1-gold); overflow-wrap: anywhere; }
  .d1-m-sheet .d1-rate { min-height: 0; padding: 0; flex-direction: column; align-items: stretch; gap: 8px; visibility: visible; }
  .d1-m-sheet .d1-rate .d1-stars { display: flex; gap: 6px; width: 100%; }
  .d1-m-sheet .d1-rate .d1-star { flex: 1 1 0; min-width: 44px; width: auto; height: 56px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--mom-border-soft); border-radius: 6px; }
  .d1-m-sheet .d1-rate .d1-star svg { width: 30px; height: 30px; }
  .d1-m-sheet .d1-rate .d1-rate-text { display: block; font-size: 13px; }
  .d1-m-sheet .d1-rate .d1-rate-open { display: none; }
  .d1-m-sheet-done { min-height: 48px; width: 100%; background: var(--d1-gold); color: #1a1a1a; border: 0; border-radius: 8px; cursor: pointer;
    font-family: var(--mom-font-head); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }

  /* ---- 08 Programs, 09 Events: 2 columns ---- */
  .d1-card-grid, .d1-event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .d1-card { padding: 8px; gap: 6px; }
  .d1-card-name { font-size: 12.5px; min-height: 2.5em; }
  .d1-card-line { font-size: 12px; min-height: 0; -webkit-line-clamp: 1; }

  /* ---- 10 Library: 2 columns ---- */
  /* Closed: 3 across (6 covers, two full rows). Open: 2 across, so 14 covers fill 7 full rows. */
  .d1-cover-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .d1-cover-strip.is-d1-collapsed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .d1-book { gap: 6px; }
  .d1-book-name { min-height: 0; font-size: 12px; }

  /* ---- Quick links: full width, 2 columns, no sideways scroll ---- */
  .mom-quicklinks-tier--member { flex-direction: column; align-items: stretch; }
  .mom-quicklinks-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow: visible; padding-bottom: 0; }
  .mom-quicklinks-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .mom-quicklinks-grid .ql-tile { min-width: 0; max-width: none; flex: none; min-height: 44px; padding: 4px 10px; flex-direction: row; justify-content: flex-start; gap: 10px; }
  .d1-wisdom-row, #wisdom-btn-mount { display: block; width: 100%; }
  .wisdom-btn { width: 100%; min-height: 48px; justify-content: center; }

  /* ---- 13 and 14: collapsed panels, fields and chips at 44px ---- */
  .topic-browser-summary, .vl-summary { min-height: 56px; }
  .tb-search, .vl-search { min-height: 44px; font-size: 16px; }
  .tb-tag, .tb-tag-more, .vl-chip, .vl-tag { min-height: 44px; }
  .vl-moment, .vl-mod-title { display: flex; align-items: center; min-height: 44px; }
  #site-footer { margin: 0 var(--d1-pad) 12px; }
  #site-footer .mom-qa-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #site-footer .mom-qa { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 6px; min-height: 64px; text-align: center; font-size: 12px; line-height: 1.2; }
  #site-footer .mom-ops-block { padding-top: 0; padding-bottom: 0; }
  #site-footer .mom-ops-grid { gap: 10px; }
  .mom-qa, .mom-ops-feedback-link { display: inline-flex; align-items: center; min-height: 44px; }
  .tb-type-filter { min-height: 44px; gap: 2px; }
  /* The checkbox keeps its 20px square but its box is 44 by 44: the transparent border is the hit area. */
  html body .tb-type-filter input[type="checkbox"] { width: 44px; height: 44px; padding: 1px; border: 12px solid transparent; border-radius: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)) content-box, linear-gradient(rgba(240, 193, 115, 0.55), rgba(240, 193, 115, 0.55)) padding-box; }
  html body .tb-type-filter input[type="checkbox"]:checked { background: linear-gradient(var(--mom-gold), var(--mom-gold)) content-box, linear-gradient(var(--mom-gold), var(--mom-gold)) padding-box; }
  html body .tb-type-filter input[type="checkbox"]:checked::after { left: 5px; top: 1px; width: 5px; height: 10px; }

  /* ---- Drawers: full screen, close button fixed inside the screen ---- */
  html body .drawer-backdrop { display: none; }
  html body .drawer-overlay { top: 0; left: 0; right: 0; bottom: auto; width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; border-left: 0; border-radius: 0; z-index: 10010; transform: translateX(100%); }
  html body .drawer-overlay.open { transform: none; }
  html body .drawer-head { min-height: 64px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); padding-right: 64px; }
  html body .drawer-close { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; width: 44px; height: 44px; z-index: 10011; font-size: 22px; }
  html body .drawer-body { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  html body .drawer-item { min-height: 56px; }
  html body .d1-vl-cta { min-height: 56px; }

  /* Wisdom and OrO panels: full screen with a 44px close */
  html body .wisdom-modal { padding: 0; }
  html body .wisdom-panel { width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; padding: 64px 18px calc(24px + env(safe-area-inset-bottom, 0px)); }
  html body .wisdom-close { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; width: 44px; height: 44px; }
  html body #oro-launcher-panel { top: 0; right: 0; left: 0; bottom: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  html body #oro-launcher-panel-header { height: 56px; }
  html body #oro-launcher-panel-close { width: 44px; height: 44px; }

  /* V0.5.1 additions on a phone: the NEXT link in PROGRESS and the CLOSE button that ends every drawer. */
  .live-progress-value a { display: inline-flex; align-items: center; min-height: 44px; }
  .d1-drawer-closebtn { min-height: 48px; }
  html body .d1-drawer-foot { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }

  /* V0.6.4: the floating welcome-video bubble (#llavtrRoot, injected by the loader at the foot of the page from
     mvp-avatar-worker) is lifted clear of the bottom bar and shrunk to a 64px thumbnail while collapsed. Its widget
     CSS is injected later in the body with !important, so these rules use #llavtrRoot specificity plus !important.
     Playing or paused-on-video (.is-playing-video) restores the 98 x 175 player with a 44px close control. */
  html body #llavtrRoot { bottom: calc(var(--d1-bar-h) + env(safe-area-inset-bottom, 0px) + 12px) !important; left: 12px !important; z-index: 9980 !important; }
  html body #llavtrRoot .llavtr-figure { width: 64px !important; height: 64px !important; }
  html body #llavtrRoot .llavtr-media { border-radius: 10px; }
  html body #llavtrRoot .llavtr-media img { object-fit: cover; object-position: top center; }
  html body #llavtrRoot .llavtr-play { width: 44px; height: 44px; top: 50%; bottom: auto; left: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, 0.55); }
  html body #llavtrRoot .llavtr-play svg { width: 16px; height: 16px; }
  html body #llavtrRoot .llavtr-close, html body #llavtrRoot .llavtr-caption, html body #llavtrRoot .llavtr-progress { display: none !important; }
  html body #llavtrRoot .llavtr-figure:has(.llavtr-media.is-playing-video) { width: 98px !important; height: 175px !important; }
  html body #llavtrRoot .llavtr-figure:has(.llavtr-media.is-playing-video) .llavtr-media { border-radius: 10px; }
  html body #llavtrRoot .llavtr-figure:has(.llavtr-media.is-playing-video) .llavtr-play { width: 44px; height: 44px; top: auto; bottom: 14%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.88); }
  html body #llavtrRoot .llavtr-figure:has(.llavtr-media.is-playing-video) .llavtr-close { display: flex !important; top: 0; left: 0; width: 44px; height: 44px; font-size: 22px; border-radius: 8px; }
  html body #llavtrRoot .llavtr-figure:has(.llavtr-media.is-playing-video) .llavtr-caption { display: block !important; }
  html body #llavtrRoot .llavtr-figure:has(.llavtr-media.is-playing-video) .llavtr-progress { display: block !important; }
  html body #llavtrRoot .llavtr-pill { border-radius: 7px; }
}
