/* The Room, the five doors and the phone tab bar.
   Prefix r- for the Room, door- for the rail groups, tabbar- for the phone bar.
   Colours and type come from theme.css tokens, the same as every tool. */

/* ---------------------------------------------------------------- the rail */
.door-group { margin-top: 10px; }
.door-group-name {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 4px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.8); font-weight: 600;
}
.door-group .tool-link { padding-left: 14px; }
.door-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px; }
.door-sub .tool-link { padding: 7px 10px 7px 44px; font-size: 13.5px; }
.door-sub .tool-link > svg { display: none; }
.door-count {
  margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.18); color: var(--accent-soft);
}
.app.collapsed .door-group-name, .app.collapsed .door-sub, .app.collapsed .door-count { display: none; }

/* ------------------------------------------------------------ phone tab bar */
.tabbar { display: none; }
@media (max-width: 860px) {
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line); background: var(--bg);
  }
  .tabbar-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 50px; border: 0; background: none; color: rgba(var(--ink-rgb), 0.5);
    font: inherit; font-size: 11px; font-weight: 500; cursor: pointer;
  }
  .tabbar-tab[aria-current="true"] { color: var(--accent-soft); }
  .tabbar-tab > svg { width: 22px; height: 22px; }
  /* Room for the bar under every page, and the odds strip above it. */
  .app .tool-view, .app main.chat { padding-bottom: calc(72px + var(--peek-h, 0px) + env(safe-area-inset-bottom, 0px)); }
  /* Everything else pinned to the bottom sits ON the bar, not under it:
     the odds strip, and Horizontal Tickets' cost bar above the strip.
     63px = a 50px tab, 6px padding top and bottom, the 1px rule. */
  :root { --tabbar-h: 63px; }
  .app .peek { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: 0; }
  .app .t-ticket { bottom: calc(var(--peek-h, 0px) + var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
}

/* ------------------------------------------------------------------ the Room */
.r-wrap { display: flex; gap: 20px; align-items: flex-start; max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
.r-main { flex: 999 1 520px; min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: 14px; }
/* The right column is Race Day (13 Oct, late night). It scrolls with the
   feed: it is longer than a screen, and a sticky column would hide its foot.
   Shown or hidden by the Room's own width (room.ts fitColumn), not the
   window's, so the Race Day button takes over wherever it does not fit. */
.r-side { flex: 0 0 330px; width: 330px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.r-wrap[data-column="sheet"] .r-side, .r-wrap--no-rd .r-side { display: none; }

.r-card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px; }
.r-eyebrow { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(var(--accent-rgb), 0.8); font-weight: 600; margin: 0; }

.r-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.r-top h2 { margin: 2px 0 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 26px; letter-spacing: -0.01em; }
.r-top p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.r-chips { display: none; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.r-chips::-webkit-scrollbar { display: none; }
.r-chip {
  flex: none; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 6px;
  border: 1px solid var(--line); background: none; color: rgba(var(--ink-rgb), 0.65);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.r-chip[aria-current="true"] { background: rgba(var(--accent-rgb), 0.16); color: var(--accent-soft); border-color: rgba(var(--accent-rgb), 0.4); }
@media (max-width: 860px) { .r-chips { display: flex; } }

/* avatar */
.r-av {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; flex: none; background: rgba(var(--ink-rgb), 0.1); color: var(--ink); overflow: hidden;
}
.r-av--duke, .r-av--admin { background: var(--accent); color: var(--accent-ink); }
.r-av--sm { width: 30px; height: 30px; font-size: 12px; }
.r-av img { width: 100%; height: 100%; object-fit: cover; }

/* composer */
.r-compose { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.r-compose-open {
  flex: 1; text-align: left; background: var(--bg-input); border: 1px solid var(--line); border-radius: 6px;
  min-height: 44px; padding: 0 18px; color: rgba(var(--ink-rgb), 0.5); font: inherit; cursor: text;
}
.r-compose-form { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.r-compose-form input, .r-compose-form textarea {
  width: 100%; box-sizing: border-box; background: var(--bg-input); border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink); font: inherit; padding: 10px 12px; outline: none;
}
.r-compose-form input:focus, .r-compose-form textarea:focus, .r-reply input:focus { border-color: rgba(var(--accent-rgb), 0.5); }
.r-compose-form input { font-weight: 600; }
.r-compose-form textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.r-compose-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.r-compose-foot .r-fine { flex: 1; }
.r-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.r-photo { position: relative; width: 84px; height: 84px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-input); }
.r-photo img { width: 100%; height: 100%; object-fit: cover; }
.r-photo-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.6); color: #fff; font-size: 14px; cursor: pointer; }
.r-photo--busy { opacity: 0.5; }

.r-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 6px;
  border: 0; font: inherit; font-weight: 600; cursor: pointer; background: var(--accent-fill); color: var(--accent-ink);
}
@media (hover: hover) { .r-btn:hover { background: var(--accent-fill-hover); } }
.r-btn[disabled] { opacity: 0.5; cursor: default; }
.r-btn--line { background: transparent; color: var(--accent-soft); border: 1px solid rgba(var(--accent-rgb), 0.4); }
@media (hover: hover) { .r-btn--line:hover { background: rgba(var(--accent-rgb), 0.1); } }
.r-btn--sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.r-act {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; color: rgba(var(--ink-rgb), 0.62);
  font: inherit; font-size: 14px; min-height: 44px; padding: 0 8px; cursor: pointer; border-radius: 8px; text-decoration: none;
}
@media (hover: hover) { .r-act:hover { color: var(--ink); background: rgba(var(--ink-rgb), 0.05); } }
.r-act > svg { width: 18px; height: 18px; }
.r-act[aria-pressed="true"] { color: var(--accent-soft); }
.r-act[aria-pressed="true"] svg { fill: rgba(var(--accent-rgb), 0.25); }
.r-fine { font-size: 13px; color: var(--muted); margin: 0; }
.r-fine--err { color: var(--loss); }

/* new posts pill */
/* "1 new post" beside an open post (computer) or under its top bar (phone). */
.r-new-side {
  position: fixed; z-index: 2; min-height: 34px; padding: 0 14px; border-radius: 6px; border: 0;
  background: var(--accent-fill); color: var(--accent-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45); transform: translateX(-50%); animation: r-new-side-in 180ms ease-out;
}
.r-new-side--beside { transform: none; }
@keyframes r-new-side-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .r-new-side { animation: none; } }
.r-new {
  position: sticky; top: 8px; z-index: 5; align-self: center; min-height: 40px; padding: 0 18px; border-radius: 6px; border: 0;
  background: var(--accent-fill); color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

/* posts */
.r-feed { display: flex; flex-direction: column; gap: 14px; }
.r-post { overflow: hidden; }
.r-post--pinned { border-color: rgba(var(--accent-rgb), 0.42); }
.r-post-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 10px; }
.r-post-who { flex: 1; min-width: 0; }
.r-post-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.r-post-name a { color: inherit; text-decoration: none; }
.r-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 5px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; background: rgba(var(--accent-rgb), 0.18); color: var(--accent-soft); }
.r-pill--lvl { background: rgba(var(--ink-rgb), 0.08); color: rgba(var(--ink-rgb), 0.7); }
.r-post-when { font-size: 13px; color: var(--muted); }
.r-post-when a { color: inherit; text-decoration: none; }
.r-post-title { margin: 0; padding: 0 18px 6px; font-family: var(--display); font-weight: var(--display-weight); font-size: 21px; line-height: 1.25; }
.r-post-title a { color: inherit; text-decoration: none; }
.r-post-body { margin: 0; padding: 0 18px 14px; color: rgba(var(--ink-rgb), 0.85); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.r-post-body--clamp { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.r-more { background: none; border: 0; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; padding: 0 18px 12px; cursor: pointer; text-align: left; }
.r-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; padding: 0 18px 14px; }
.r-media--one { grid-template-columns: minmax(0, 1fr); }
.r-media a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-input); }
.r-media img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.r-media .r-file { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--ink); font-size: 14px; }
.r-post-foot { display: flex; align-items: center; gap: 4px; padding: 4px 10px 8px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.r-post-foot .r-grow { flex: 1; }
.r-menu { position: relative; }
.r-menu-list { position: absolute; right: 0; top: 100%; z-index: 6; min-width: 160px; padding: 6px; border-radius: 6px; background: var(--bg-raised); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0,0,0,0.5); display: flex; flex-direction: column; }
.r-menu-list button { text-align: left; background: none; border: 0; color: var(--ink); font: inherit; font-size: 14px; padding: 9px 12px; border-radius: 7px; cursor: pointer; }
@media (hover: hover) { .r-menu-list button:hover { background: rgba(var(--ink-rgb), 0.06); } }
/* A post's or comment's menu is fixed to the screen (room.ts floatMenu): the
   card's overflow: hidden above keeps its rounded corners over the square
   action bar and can no longer cut the menu off. */
.r-menu-list.r-menu-list--float { position: fixed; right: auto; bottom: auto; z-index: 75; overflow-y: auto; overscroll-behavior: contain; }
.r-removed { color: var(--muted); font-style: italic; }

/* plays card */
.r-plays { margin: 0 18px 14px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.r-plays-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; }
.r-plays-head .r-eyebrow { min-width: 0; }
.r-plays-head a { white-space: nowrap; }
.r-plays-head a { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.r-play { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.r-play-race { font-weight: 600; color: var(--accent-soft); }
.r-play-bet { font-weight: 600; }
.r-play-note { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.r-play-amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.r-play--pass { color: var(--muted); }
.r-plays-edit { display: flex; flex-direction: column; gap: 8px; }
.r-plays-row { display: grid; grid-template-columns: 64px 1fr 1fr 84px 36px; gap: 6px; }
.r-plays-row input { padding: 8px 10px; font-weight: 400; }
@media (max-width: 600px) { .r-plays-row { grid-template-columns: 56px 1fr 72px 32px; } .r-plays-row .r-plays-note { grid-column: 1 / -1; } }

/* thread */
.r-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 14px; min-height: 44px; }
@media (hover: hover) { .r-back:hover { color: var(--ink); } }
.r-comments { display: flex; flex-direction: column; }
.r-comment { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.r-comment--reply { padding-left: 58px; border-top: 0; padding-top: 0; }
.r-comment-body { flex: 1; min-width: 0; }
.r-comment-who { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.r-comment-who .r-post-when { font-weight: 400; }
.r-comment-text { margin: 2px 0 0; font-size: 14px; color: rgba(var(--ink-rgb), 0.85); white-space: pre-wrap; overflow-wrap: anywhere; }
.r-comment-acts { display: flex; gap: 4px; align-items: center; margin-left: -8px; }
.r-comment-acts .r-act { min-height: 32px; font-size: 13px; }
.r-reply { display: flex; align-items: center; gap: 8px; padding: 10px 14px 14px; }
.r-reply--inline { padding: 6px 0 4px; }
.r-reply input { flex: 1; min-width: 0; min-height: 44px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-input); color: var(--ink); padding: 0 16px; font: inherit; font-size: 14px; outline: none; }
.r-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent-fill); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.r-send[disabled] { opacity: 0.5; }
.r-send svg { width: 20px; height: 20px; }

/* side column */
.r-side-card { padding: 16px 18px; }
.r-side-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.r-side-row:first-of-type { border-top: 0; }
.r-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.r-quick a { padding: 12px; border-radius: 6px; background: var(--bg-input); border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; }
@media (hover: hover) { .r-quick a:hover { border-color: rgba(var(--accent-rgb), 0.4); } }
.r-online { display: flex; margin-top: 10px; }
.r-online .r-av { width: 32px; height: 32px; font-size: 12px; border: 2px solid var(--bg-raised); }
.r-online .r-av + .r-av { margin-left: -8px; }

/* tools grid door */
.r-tools { max-width: 900px; margin: 0 auto; padding: 0 16px 40px; display: flex; flex-direction: column; gap: 18px; }
.r-tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.r-tile { display: flex; flex-direction: column; gap: 10px; padding: 16px 14px; min-height: 112px; border-radius: 8px; background: var(--bg-raised); border: 1px solid var(--line); color: var(--ink); text-align: left; font: inherit; cursor: pointer; text-decoration: none; }
@media (hover: hover) { .r-tile:hover { border-color: rgba(var(--accent-rgb), 0.45); } }
.r-tile > svg { width: 24px; height: 24px; color: var(--accent); }
.r-tile strong { font-weight: 600; font-size: 15px; line-height: 1.2; }
.r-tile small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.r-tile--locked { opacity: 0.55; }
.r-tile--soon { opacity: 0.45; cursor: default; }

.r-empty { padding: 28px 18px; text-align: center; color: var(--muted); }
.r-loading { padding: 24px; text-align: center; color: var(--muted); }

/* ------------------------------------------------- matched to GHL (12 Oct) */
.door-icon { width: 20px; text-align: center; font-size: 14px; flex: none; }
.door-sub .door-group-name { padding: 10px 14px 2px 44px; }
.door-sub .tool-link > .door-icon { display: inline-block; }
.door-sub .tool-link { padding-left: 24px; }

/* avatar with the level badge, as GHL draws it */
.r-av { position: relative; overflow: visible; }
.r-av-lvl {
  position: absolute; right: -4px; bottom: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-raised); box-sizing: border-box; line-height: 1;
}
.r-av--sm .r-av-lvl { min-width: 15px; height: 15px; font-size: 9px; right: -5px; bottom: -5px; }
.r-av img { border-radius: 50%; }

/* the card, GHL order: who, posted in, time; title; body; likes row; bar; inline comment */
.r-post { cursor: pointer; }
@media (hover: hover) { .r-post:hover { border-color: rgba(var(--accent-rgb), 0.36); } }
.r-posted-in { font-size: 13px; color: var(--muted); }
.r-posted-in a { color: var(--accent); text-decoration: none; font-weight: 600; }
.r-post-head .r-post-when { margin-left: auto; align-self: flex-start; }
.r-likes-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 18px 8px; font-size: 13px; color: var(--muted); }
/* Each piece on one line; when "Duke commented and replied 2 times" will not
   fit beside the count on a narrow phone, the count takes the next line. */
.r-likes-row { flex-wrap: wrap; row-gap: 4px; }
.r-likes-row > span { white-space: nowrap; }
.r-likes-row > [data-comment-count] { margin-left: auto; }
.r-likes-row .r-thumb { display: inline-flex; align-items: center; gap: 5px; }
.r-likes-row .r-thumb svg { width: 15px; height: 15px; color: var(--accent); }
.r-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); }
.r-bar .r-act { justify-content: center; min-height: 44px; border-radius: 0; }
/* The like count and Like and Comment on one quiet row (Gilded, 26 Nov 2026).
   The count takes the row's left; Like and Comment sit at its right, and drop
   under the count when a phone has no room for both. */
.r-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; margin: 14px 18px 0; padding: 4px 0 6px; border-top: 1px solid var(--line-soft); }
.r-foot > .r-likes-row { flex: 1 1 auto; min-width: 0; padding: 0; }
.r-foot > .r-bar { display: flex; flex: none; margin-left: auto; border-top: 0; }
.r-foot > .r-bar .r-act { min-height: 40px; padding: 0 12px; border-radius: 8px; }
.r-inline { display: flex; align-items: center; gap: 10px; padding: 10px 14px 14px; }
.r-inline .r-reply { flex: 1; padding: 0; }
.r-view-more { display: block; margin-left: auto; background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; padding: 0 18px 8px; cursor: pointer; }

/* selections, the way Duke writes them */
.r-sel { margin: 0 18px 12px; display: flex; flex-direction: column; gap: 10px; }
.r-sel-race { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.r-sel-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.r-sel-head strong { font-family: var(--display); font-size: 19px; font-weight: var(--display-weight); color: var(--accent-soft); }
.r-sel-head span { font-size: 13px; color: var(--muted); }
.r-sel-horse { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 5px 0; font-size: 14px; line-height: 1.45; }
.r-sel-horse .r-sel-num { font-weight: 700; color: var(--accent-soft); font-variant-numeric: tabular-nums; }
.r-sel-horse .r-sel-name { font-weight: 700; text-transform: uppercase; }
.r-sel-ticket { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(var(--accent-rgb), 0.25); white-space: pre-wrap; font-size: 14px; font-weight: 600; color: var(--ink); }
.r-sel-ticket-label { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(var(--accent-rgb), 0.8); margin-bottom: 4px; font-weight: 600; }

/* selections editor */
.r-sel-edit { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 8px; border: 1px solid rgba(var(--accent-rgb), 0.25); background: var(--bg-deep); }
.r-sel-edit .r-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.r-sel-edit input, .r-sel-edit textarea { width: 100%; box-sizing: border-box; background: var(--bg-input); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: inherit; padding: 8px 10px; outline: none; font-weight: 400; }
.r-sel-edit input:focus, .r-sel-edit textarea:focus { border-color: rgba(var(--accent-rgb), 0.5); }
.r-sel-edit label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(var(--accent-rgb), 0.8); font-weight: 600; display: block; margin-bottom: 3px; }
.r-sel-edit-race { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 6px; border: 1px solid var(--line); }
.r-sel-edit-horse { display: grid; grid-template-columns: 56px 1fr 32px; gap: 6px; }
.r-sel-edit-horse .r-sel-notes { grid-column: 1 / -1; }
.r-sel-edit textarea { min-height: 64px; resize: vertical; }
.r-sel-edit .r-sel-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.r-sel-edit .r-sel-actions .r-grow { flex: 1; }
.r-x { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.5); color: #fff; font-size: 14px; cursor: pointer; }

/* composer additions */
.r-compose-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.r-compose-form select { background: var(--bg-input); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font: inherit; padding: 10px 12px; min-height: 44px; }
.r-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; min-height: 44px; }
.r-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }

/* the post panel over the feed */
.r-modal-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0.6); display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow: hidden; }
.r-modal { width: 100%; max-width: 720px; max-height: calc(100vh - 48px); background: var(--bg-raised); border: 1px solid rgba(var(--accent-rgb), 0.3); border-radius: 6px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.r-modal-top { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.r-modal-top .r-grow { flex: 1; }
.r-modal-body { flex: 1; overflow-y: auto; min-height: 0; }
.r-modal-body .r-post { border: 0; border-radius: 0; cursor: default; }
.r-modal-body .r-post:hover { border-color: transparent; }
.r-modal-foot { border-top: 1px solid var(--line); background: var(--bg-raised); }
.r-modal-foot .r-reply { padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); }
.r-no-comments { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 14px; }
.r-no-comments strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.r-comments-off { padding: 14px 18px; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 860px) {
  .r-modal-scrim { padding: 0; }
  .r-modal { max-width: none; max-height: none; height: 100%; border-radius: 0; border: 0; }
  .r-modal-top { padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
}
body.r-modal-open { overflow: hidden; }

/* right column: the group card and the board, as GHL */
.r-group { overflow: hidden; }
.r-group-cover { height: 110px; background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.35), rgba(var(--accent-rgb), 0.05)); display: flex; align-items: flex-end; padding: 12px 16px; }
.r-group-cover .r-pill { background: rgba(0,0,0,0.5); color: var(--accent-soft); }
.r-group-body { padding: 14px 18px 16px; }
.r-group-body h3 { margin: 0 0 4px; font-family: var(--display); font-weight: var(--display-weight); font-size: 20px; }
.r-group-body p { margin: 0; font-size: 14px; color: var(--muted); }
.r-group-links { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.r-group-links a { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.r-group-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-soft); margin-top: 14px; padding-top: 12px; text-align: center; }
.r-group-stats strong { display: block; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.r-group-stats span { font-size: 12px; color: var(--muted); }
.r-lb-head { display: flex; justify-content: space-between; align-items: baseline; }
.r-lb-head a { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.r-lb-row { display: grid; grid-template-columns: 28px 36px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; font-size: 14px; }
.r-lb-row + .r-lb-row { border-top: 1px solid var(--line-soft); }
.r-lb-rank { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: rgba(var(--ink-rgb), 0.08); color: var(--muted); }
.r-lb-rank--1 { background: var(--accent); color: var(--accent-ink); }
.r-lb-rank--2 { background: rgba(var(--ink-rgb), 0.35); color: var(--bg); }
.r-lb-rank--3 { background: rgba(196, 120, 80, 0.8); color: #fff; }
.r-lb-pts { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent-soft); }

/* leaderboard page */
.r-lb-page { display: flex; flex-direction: column; gap: 14px; }
.r-lb-me { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 20px; }
.r-lb-me-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.r-lb-me-card .r-av { width: 96px; height: 96px; font-size: 32px; }
.r-lb-me-card .r-av .r-av-lvl { min-width: 30px; height: 30px; font-size: 14px; right: -2px; bottom: -2px; }
.r-lb-me-card strong { font-size: 18px; font-weight: 600; }
.r-lb-level-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 5px; border: 1px solid rgba(var(--accent-rgb), 0.5); color: var(--accent-soft); font-size: 13px; font-weight: 600; }
.r-lb-ladder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.r-lb-step { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; padding: 5px 0; }
.r-lb-step .r-lb-rank { width: 30px; height: 30px; font-size: 13px; }
.r-lb-step--locked .r-lb-rank { background: rgba(var(--ink-rgb), 0.05); }
.r-lb-step strong { display: block; font-size: 14px; font-weight: 600; }
.r-lb-step span { font-size: 12px; color: var(--muted); }
.r-lb-tabs { display: flex; gap: 8px; padding: 14px 18px 4px; }
.r-lb-tabs .r-chip { min-height: 32px; }
.r-lb-list { padding: 6px 18px 12px; }
@media (max-width: 700px) { .r-lb-me { grid-template-columns: 1fr; } .r-lb-ladder { grid-template-columns: 1fr; } }

/* ---------------------------------------------- doors across the top (12 Oct) */
.doors { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.doors::-webkit-scrollbar { display: none; }
.door {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 6px; border: 0;
  background: none; color: rgba(var(--ink-rgb), 0.65); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.door > svg { width: 20px; height: 20px; }
@media (hover: hover) { .door:hover:not([disabled]) { background: rgba(var(--ink-rgb), 0.05); color: var(--ink); } }
.door[aria-current="true"] { background: rgba(var(--accent-rgb), 0.14); color: var(--accent-soft); }
.door[disabled] { opacity: 0.45; cursor: default; }
.door .tool-soon { margin-left: 2px; }
.tool-head-name--door { display: none; }
@media (max-width: 860px) {
  .doors { display: none; }
  .tool-head-name--door { display: block; }
}
.tool-head { flex-wrap: wrap; }
.door-sub--tools .tool-link { padding-left: 14px; }
.door-sub--tools .tool-link > svg { display: block; }

/* appearance, in the account block */
.appearance { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; font-size: 12px; color: var(--muted); }
.appearance select { background: var(--bg-input); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12px; padding: 6px 8px; }

/* comment three dots */
.r-comment-who { align-items: center; }
.r-comment-who .r-grow { flex: 1; }
.r-act--dots { min-height: 28px; padding: 0 4px; }
.r-comment .r-menu { position: relative; }

/* your horses today reuses the Watch List's runner rows */
.r-horses { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.r-horses .w-runner { padding: 6px 0; }

/* section header in the left column: "the menu for where you are" */
.door-section { display: flex; align-items: center; gap: 10px; padding: 8px 14px 6px; font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: 0.02em; }
.door-section > svg { width: 18px; height: 18px; color: var(--accent); }
.app.collapsed .door-section span { display: none; }

/* light mode: darker secondary text for older eyes (Carson, 12 Oct) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --muted: rgba(26, 21, 16, 0.74); }
  :root:not([data-theme="dark"]) .r-act, :root:not([data-theme="dark"]) .r-chip, :root:not([data-theme="dark"]) .tabbar-tab, :root:not([data-theme="dark"]) .door { color: rgba(26, 21, 16, 0.8); }
  :root:not([data-theme="dark"]) .r-compose-open { color: rgba(26, 21, 16, 0.66); }
  :root:not([data-theme="dark"]) .r-post-body, :root:not([data-theme="dark"]) .r-comment-text { color: var(--ink); }
  :root:not([data-theme="dark"]) .r-posted-in, :root:not([data-theme="dark"]) .r-post-when, :root:not([data-theme="dark"]) .r-likes-row { color: rgba(26, 21, 16, 0.72); }
}
:root[data-theme="light"] { --muted: rgba(26, 21, 16, 0.74); }
:root[data-theme="light"] .r-act, :root[data-theme="light"] .r-chip, :root[data-theme="light"] .tabbar-tab, :root[data-theme="light"] .door { color: rgba(26, 21, 16, 0.8); }
:root[data-theme="light"] .r-compose-open { color: rgba(26, 21, 16, 0.66); }
:root[data-theme="light"] .r-post-body, :root[data-theme="light"] .r-comment-text { color: var(--ink); }
:root[data-theme="light"] .r-posted-in, :root[data-theme="light"] .r-post-when, :root[data-theme="light"] .r-likes-row { color: rgba(26, 21, 16, 0.72); }

/* ------------------------------------------------------------- the bell (13 Oct) */
.head-right { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
.bell { position: relative; flex: none; }
.head-face { display: inline-flex; padding: 4px; border-radius: 50%; text-decoration: none; }
@media (hover: hover) { .head-face:hover { background: rgba(var(--ink-rgb), 0.06); } }
.head-face .r-av { width: 34px; height: 34px; font-size: 12px; }
.head-face .r-av-lvl { display: none; }
.bell-button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; border: 0; background: none; color: rgba(var(--ink-rgb), 0.75); cursor: pointer;
}
.bell-button[aria-expanded="true"] { background: rgba(var(--ink-rgb), 0.06); color: var(--ink); } @media (hover: hover) { .bell-button:hover { background: rgba(var(--ink-rgb), 0.06); color: var(--ink); } }
.bell-button > svg { width: 22px; height: 22px; }
.bell-badge {
  /* Grows to the right from the icon's corner, so "9+" never hides the icon (LEARN-06). */
  position: absolute; top: 4px; left: 23px; right: auto; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 999px; background: var(--loss, #d9534f); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  border: 2px solid var(--bg);
}
.bell-badge[hidden] { display: none; }
.bell-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; width: 380px; max-height: min(520px, 75vh);
  display: flex; flex-direction: column; background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 16px 40px rgba(0,0,0,0.45); overflow: hidden;
}
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.bell-head strong { font-size: 15px; }
.bell-all { background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 0; }
.bell-all[hidden] { display: none; }
.bell-items { overflow-y: auto; }
.bell-item {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--line-soft);
  background: none; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.4; text-align: left; cursor: pointer;
}
.bell-item:first-child { border-top: 0; }
@media (hover: hover) { .bell-item:hover { background: rgba(var(--ink-rgb), 0.05); } }
.bell-item--new { background: rgba(var(--accent-rgb), 0.08); }
.bell-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; }
.bell-when { font-size: 12px; color: var(--muted); }
.bell-dot { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--accent); }
.bell-empty { margin: 0; padding: 22px 18px; color: var(--muted); font-size: 14px; text-align: center; line-height: 1.5; }
@media (max-width: 860px) {
  .bell-list { position: fixed; left: 8px; right: 8px; top: calc(56px + env(safe-area-inset-top, 0px)); width: auto; max-height: 70vh; }
}

/* ------------------------------------------------------- members (13 Oct) */
.r-page { display: flex; flex-direction: column; gap: 14px; }
.r-search {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border-radius: 6px;
  background: var(--bg-input); border: 1px solid var(--line); color: var(--muted);
}
.r-search:focus-within { border-color: rgba(var(--accent-rgb), 0.5); }
.r-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink); font: inherit; font-size: 15px; }
.r-members { display: flex; flex-direction: column; overflow: hidden; }
.r-member-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px; color: var(--ink); text-decoration: none;
  border-top: 1px solid var(--line-soft);
}
.r-member-row:first-child { border-top: 0; }
@media (hover: hover) { .r-member-row:hover { background: rgba(var(--ink-rgb), 0.04); } }
.r-member-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.r-member-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.r-member-joined { flex: none; }
@media (max-width: 600px) { .r-member-joined { display: none; } }
.r-lb-name { color: inherit; text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .r-lb-name:hover { color: var(--accent); } }

.r-profile { display: flex; align-items: flex-start; gap: 20px; padding: 22px; }
.r-profile > .r-av { width: 96px; height: 96px; font-size: 32px; }
.r-profile > .r-av .r-av-lvl, .r-profile-photo .r-av .r-av-lvl { min-width: 28px; height: 28px; font-size: 13px; right: -2px; bottom: -2px; }
.r-profile-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.r-profile-name { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--display); font-weight: var(--display-weight); font-size: 26px; }
.r-profile-facts { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.r-profile-bio { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.r-profile-edit { flex: none; }
.r-profile-posts-head { padding: 4px 2px 0; }
.r-profile-form { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.r-profile-photo { display: flex; align-items: center; gap: 18px; }
.r-profile-photo .r-av { width: 84px; height: 84px; font-size: 28px; }
.r-profile-photo-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.r-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.r-field input, .r-field textarea {
  width: 100%; box-sizing: border-box; background: var(--bg-input); border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink); font: inherit; font-size: 15px; font-weight: 400; padding: 11px 12px; outline: none;
}
.r-field textarea { resize: vertical; line-height: 1.5; }
.r-field input:focus, .r-field textarea:focus { border-color: rgba(var(--accent-rgb), 0.5); }
/* Show My Name As: "Adam D." or "Adam Davis" (25 Nov 2026). A long name shortens with an ellipsis instead of pushing the card wider. */
.r-name-forms { align-self: flex-start; margin-top: 0; }
.r-name-form { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) {
  .r-profile { flex-direction: column; align-items: center; text-align: center; padding: 20px 16px; }
  .r-profile-who { align-items: center; }
  .r-profile-name, .r-profile-facts { justify-content: center; }
  .r-profile-form { width: 100%; text-align: left; }
  .r-profile-photo { flex-direction: column; text-align: center; }
  .r-profile-photo-buttons { justify-content: center; }
}

/* a short note over the page: a post that has gone */
.r-modal--note { max-width: 420px; padding: 22px; gap: 16px; align-items: center; text-align: center; margin-top: 18vh; height: auto; }
.r-note-text { margin: 0; font-size: 16px; line-height: 1.5; }
@media (max-width: 860px) { .r-modal--note { height: auto; margin: 30vh 16px 0; border-radius: 8px; border: 1px solid var(--line); } }
.r-profile-name .r-pill { font-family: var(--sans); font-size: 12px; }

/* light mode: the darker text above outranks "you are here" and "liked", so
   put the gold back on the current door, tab, chip and a pressed Like (13 Oct) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .door[aria-current="true"],
  :root:not([data-theme="dark"]) .tabbar-tab[aria-current="true"],
  :root:not([data-theme="dark"]) .r-chip[aria-current="true"],
  :root:not([data-theme="dark"]) .r-act[aria-pressed="true"] { color: var(--accent-soft); }
}
:root[data-theme="light"] .door[aria-current="true"],
:root[data-theme="light"] .tabbar-tab[aria-current="true"],
:root[data-theme="light"] .r-chip[aria-current="true"],
:root[data-theme="light"] .r-act[aria-pressed="true"] { color: var(--accent-soft); }

/* In the Room Now (13 Oct) */
.r-here-count { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.r-here-dot { width: 8px; height: 8px; border-radius: 50%; background: #3fae6a; box-shadow: 0 0 0 3px rgba(63, 174, 106, 0.2); }
.r-here-body { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
/* As the approved mockup: overlapping faces, then a "+N" bubble. Photos
   when a member has one, initials when not; no level badge in the row. */
.r-here-faces { display: flex; align-items: center; }
.r-here-face { display: inline-flex; text-decoration: none; border-radius: 50%; }
.r-here-face + .r-here-face, .r-here-faces .r-here-more { margin-left: -8px; }
.r-here-face .r-av { width: 36px; height: 36px; font-size: 12px; border: 2px solid var(--bg-raised); box-sizing: border-box; }
.r-here-face .r-av-lvl { display: none; }
@media (hover: hover) { .r-here-face:hover { position: relative; z-index: 1; } }
.r-my-face { display: inline-flex; text-decoration: none; flex: none; }
.r-here-strip { display: none; }
@media (max-width: 1000px) {
  .r-here-strip:not([hidden]) {
    display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 6px; align-self: flex-start;
    background: var(--bg-raised); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500;
  }
  .r-here-strip-faces { display: inline-flex; }
  .r-here-strip-faces .r-av { width: 26px; height: 26px; font-size: 10px; border: 2px solid var(--bg-raised); }
  .r-here-strip-faces .r-av + .r-av { margin-left: -7px; }
  .r-here-strip-faces .r-av-lvl { display: none; }
}
.r-here-more {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; box-sizing: border-box; border-radius: 50%;
  border: 2px solid var(--bg-raised); background: rgba(var(--accent-rgb), 0.18); color: var(--accent-soft); font-size: 12px; font-weight: 600; text-decoration: none;
}

/* ------------------------------------------------ hover, everywhere (13 Oct)
   Carson: "I do not like the text underlining on hover. it looks cheap and we
   are going premium ... a nice animation on hover or something smooth and
   elegant." No underline anywhere; colour and background ease in instead. */
a, button, .tool-link, .door, .r-act, .r-chip, .r-btn, .linkish {
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
a:hover, .linkish:hover { text-decoration: none; }

/* =========================================================================
   ROUND 2 FRAME (13 October 2026), as the mockup Carson approved:
   mockup-2026-10-13-round2/. A two-row menu bar across the page, the left
   menu with a gold-marked current item, the account block at its foot.
   ========================================================================= */

/* the left menu: brand row lines up with the top bar's first row */
.sidebar-head { padding: 0 12px 0 18px; min-height: 57px; justify-content: center; border-bottom: 1px solid var(--line); }
.sidebar-head:has(#new-thread:not([hidden])) { padding-top: 12px; padding-bottom: 12px; }
.sidebar-brand { min-height: 56px; }
.sidebar-brand .eyebrow {
  font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; text-transform: none; color: var(--ink);
}
.tools-nav { padding: 12px 10px; }
.tool-link { border-radius: 6px; }
@media (hover: hover) { .tool-link:hover:not([disabled]) { background: rgba(var(--ink-rgb), 0.05); color: var(--ink); } }
.tool-link[aria-current="true"] {
  background: rgba(var(--accent-rgb), 0.16); box-shadow: inset 3px 0 0 var(--accent-fill); color: var(--ink); font-weight: 600;
}
.app.collapsed .tool-link[aria-current="true"] { box-shadow: none; }
.door-section { padding: 6px 10px 10px; font-size: 13.5px; }

/* the account block */
.sidebar-foot { padding: 10px; border-top: 1px solid var(--line); gap: 0; align-items: stretch; }
.acct { display: flex; flex-direction: column; gap: 1px; }
.acct-me { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
@media (hover: hover) { .acct-me:hover { background: rgba(var(--ink-rgb), 0.05); color: var(--ink); } }
.acct-me-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.acct-me-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-me-level, .acct #member-email { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct #member-email { display: block; }
.acct-row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 8px; border: 0; background: none; border-radius: 6px;
  color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
}
.acct-row svg { width: 17px; height: 17px; flex: none; color: var(--muted); transition: color 0.18s ease; }
@media (hover: hover) { .acct-row:hover { background: rgba(var(--ink-rgb), 0.05); color: var(--ink); } }
@media (hover: hover) { .acct-row:hover svg { color: var(--accent); } }
.acct-row--phone { display: none; }
.appearance {
  display: flex; width: auto; margin: 6px 8px; padding: 2px; gap: 0; border-radius: 6px; background: var(--bg); border: 1px solid var(--line);
}
.appearance button {
  flex: 1; border: 0; background: none; border-radius: 4px; padding: 6px 0; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer;
}
@media (hover: hover) { .appearance button:hover { color: var(--ink); } }
.appearance button[aria-pressed="true"] { background: var(--bg-raised); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }

/* the menu bar: as wide as the page, whatever the page's side padding */
.tool-view { --tv-pad: 24px; }
@media (max-width: 900px) { .tool-view { --tv-pad: 12px; } }
.tool-view > .tool-head { display: block; }
.tool-head-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tool-head-top .head-right { margin-left: auto; }
.tool-head-tabs { display: flex; align-items: stretch; min-width: 0; }
.tool-head-sub { margin-left: auto; align-self: center; font-family: var(--display); font-size: 18px; font-weight: 600; color: var(--ink); padding: 0 12px; white-space: nowrap; }
.head-right { gap: 2px; }
.head-icon {
  position: relative; width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 6px; background: none; color: rgba(var(--ink-rgb), 0.72); cursor: pointer;
}
.head-icon > svg { width: 21px; height: 21px; }
.head-icon[aria-current="true"] { background: rgba(var(--accent-rgb), 0.14); color: var(--accent-soft); } @media (hover: hover) { .head-icon:hover:not([disabled]) { background: rgba(var(--accent-rgb), 0.14); color: var(--accent-soft); } }
.head-icon[disabled] { opacity: 0.4; cursor: default; }
.head-icon[data-tip]::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -3px);
  white-space: nowrap; padding: 5px 9px; border-radius: 5px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity 0.16s ease, transform 0.16s ease; z-index: 90;
}
.head-icon[data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); } @media (hover: hover) { .head-icon[data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); } }
.bell-button { width: 40px; height: 40px; border-radius: 6px; }
.bell-button[aria-expanded="true"] { background: rgba(var(--accent-rgb), 0.14); color: var(--accent-soft); } @media (hover: hover) { .bell-button:hover { background: rgba(var(--accent-rgb), 0.14); color: var(--accent-soft); } }

/* doors as tabs, gold underline on the one you are in */
.doors { gap: 2px; flex: 1; overflow: visible; }
.door {
  border-radius: 0; min-height: 0; height: 100%; padding: 0 14px; background: none; font-size: 14.5px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
@media (hover: hover) { .door:hover:not([disabled]) { background: rgba(var(--ink-rgb), 0.04); color: var(--ink); } }
.door[aria-current="true"] { background: none; color: var(--accent-soft); border-bottom-color: var(--accent-fill); font-weight: 600; }
.door > svg { width: 18px; height: 18px; }
/* The gold count on The Room tab: new posts since you last looked. */
.room-new {
  display: inline-block; min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px;
  background: var(--accent-fill); color: var(--accent-ink); font-size: 11.5px; font-weight: 700; line-height: 19px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.door .room-new { margin-left: 2px; }
.tabbar-tab { position: relative; }
.tabbar-tab .room-new { position: absolute; top: 3px; left: calc(50% + 6px); box-shadow: 0 0 0 2px var(--bg); }

/* search */
.hsearch { position: relative; flex: 1; max-width: 520px; min-width: 0; }
.hsearch-open { display: none; }
.hsearch-field {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 6px;
  background: var(--bg-raised); border: 1px solid var(--line); color: var(--muted); cursor: text;
}
.hsearch-field:focus-within { border-color: rgba(var(--accent-rgb), 0.6); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12); }
.hsearch-field > svg { width: 16px; height: 16px; flex: none; }
.hsearch-field input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--ink); font: inherit; font-size: 14px; }
.hsearch-field input::placeholder { color: var(--muted); }
.hsearch-field input::-webkit-search-cancel-button { cursor: pointer; }
.hsearch-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 85; max-height: min(70vh, 520px); overflow-y: auto; padding: 6px;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.hsearch-group { margin: 6px 8px 4px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.hsearch-opt { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.hsearch-opt--face { flex-direction: row; align-items: center; gap: 10px; }
.hsearch-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hsearch-opt[aria-selected="true"] { background: rgba(var(--accent-rgb), 0.12); } @media (hover: hover) { .hsearch-opt:hover { background: rgba(var(--accent-rgb), 0.12); } }
.hsearch-title { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hsearch-horse { text-transform: uppercase; font-size: 13.5px; }
.hsearch-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* one line, like the title (LEARN-27) */
.hsearch-snip { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hsearch-empty { margin: 0; padding: 14px 10px; color: var(--muted); font-size: 13.5px; }

/* Settings | Usage */
.admin-switch { display: flex; gap: 0; width: max-content; margin: 0 auto 16px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-raised); }
.tool-view[data-tool="settings"] { --admin-w: 860px; }
.tool-view[data-tool="usage"] { --admin-w: 1100px; }
.tool-view[data-tool="memberbilling"] { --admin-w: 1000px; }
/* ACCT-29: the switcher starts where each page's content starts, on all three. */
.tool-view[data-tool="settings"] .admin-switch, .tool-view[data-tool="usage"] .admin-switch, .tool-view[data-tool="memberbilling"] .admin-switch { margin-left: max(0px, calc((100% - var(--admin-w, 100%)) / 2)); }
.admin-switch button { border: 0; background: none; padding: 7px 16px; border-radius: 4px; font: inherit; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.admin-switch button[aria-current="true"] { background: var(--accent-fill); color: var(--accent-ink); font-weight: 600; }

@media (min-width: 861px) {
  .tool-view { padding-top: 0; }
  .tool-view > .tool-head {
    position: sticky; top: 0; z-index: 40; max-width: none; margin: 0 calc(-1 * var(--tv-pad)) 20px; padding: 0;
    background: var(--bg-deep); border-bottom: 1px solid var(--line);
  }
  .tool-head-top { height: 56px; padding: 0 24px 0 24px; border-bottom: 1px solid var(--line); }
  .tool-head-top .tool-head-name { display: none; }
  .tool-head-tabs { height: 48px; padding: 0 12px; }
}
@media (max-width: 860px) {
  .tool-view > .tool-head {
    position: sticky; top: 0; z-index: 40; max-width: none; margin: 0 calc(-1 * var(--tv-pad)) 12px; padding: 6px 8px 6px 6px;
    background: var(--bg-deep); border-bottom: 1px solid var(--line);
  }
  /* Every page's title fits (pass 2, 25 Nov 2026: "Member Billi..."): a little
     smaller on a narrow phone, and two lines before it is ever cut. */
  .tool-head-top .tool-head-name {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; flex: 1; min-width: 0;
    font-size: clamp(17px, 4.6vw, 20px); line-height: 1.15; font-weight: 500; overflow: hidden; overflow-wrap: anywhere; text-wrap: balance; padding-left: 2px;
  }
  .tool-head-tabs { display: none; }
  .head-right .head-icon:not(.hsearch-open) { display: none; }
  .hsearch { flex: none; max-width: none; position: static; }
  .hsearch-open { display: inline-flex; }
  .hsearch-field { display: none; }
  .hsearch--open .hsearch-field {
    display: flex; position: absolute; left: 8px; right: 8px; top: calc(100% + 8px); height: 46px; z-index: 86; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  }
  .hsearch--open .hsearch-field input { font-size: 16px; }
  .hsearch-list { position: absolute; left: 8px; right: 8px; top: calc(100% + 60px); }
  .acct-row--phone { display: flex; }
  .tabbar-tab { font-size: 10.5px; }
  /* The drawer scrolls as one: every channel, then the account block under it.
     It ends where the bottom bar starts, so its last row (Sign Out) can be
     scrolled into sight instead of hiding behind the bar (Carson, 13 Oct). */
  .sidebar {
    overflow-y: auto; overscroll-behavior: contain;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  }
  .tools-nav { flex: none; overflow: visible; min-height: auto; }
}

/* =========================================================================
   ROUND 2 ROOM (13 October 2026)
   ========================================================================= */

/* the box that opens Create a Post */
.r-compose { gap: 12px; }
.r-compose-open { min-height: 44px; border-radius: 6px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) { .r-compose-open:hover { border-color: rgba(var(--accent-rgb), 0.45); } }

/* Like and Comment, no Share */
.r-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Duke's selections on a lighter block (Carson: "the selections background appears too dark") */
.r-sel-race, .r-plays, .r-sel-edit { background: rgba(var(--ink-rgb), 0.035); }

/* links in posts and comments, and a clip in a post */
.r-link { color: var(--accent); font-weight: 500; overflow-wrap: anywhere; }
@media (hover: hover) { .r-link:hover { color: var(--accent-soft); } }
.r-video { border-radius: 8px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.r-video video { display: block; width: 100%; max-height: 520px; background: #000; }

/* Create a Post */
.r-create { max-width: 640px; }
.r-create-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.r-create-head h2 { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 19px; text-align: center; }
.r-create-cancel { justify-self: start; background: none; border: 0; font: inherit; font-size: 15px; color: var(--ink); padding: 8px 6px; border-radius: 6px; cursor: pointer; }
@media (hover: hover) { .r-create-cancel:hover { background: rgba(var(--ink-rgb), 0.05); } }
.r-create-post { justify-self: end; min-width: 84px; }
.r-create-body { flex: 1; overflow-y: auto; min-height: 0; padding: 14px 18px 6px; display: flex; flex-direction: column; gap: 10px; }
.r-create-who { display: flex; align-items: center; gap: 12px; }
.r-create-whotext { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.r-create-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.r-create-pick select {
  min-height: 34px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-input); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 500; max-width: 100%;
}
.r-create-titlebox {
  border: 0; border-bottom: 1px solid var(--line); background: none; padding: 10px 0; outline: none; color: var(--ink);
  font-family: var(--display); font-weight: var(--display-weight); font-size: 22px;
}
.r-create-titlebox:focus { border-bottom-color: rgba(var(--accent-rgb), 0.6); }
.r-create-text { border: 0; background: none; outline: none; resize: none; min-height: 120px; padding: 6px 0; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.5; }
.r-create-link { display: flex; gap: 8px; }
.r-create-link input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-input); color: var(--ink); font: inherit; outline: none; }
.r-create-link input:focus { border-color: rgba(var(--accent-rgb), 0.6); }
.r-create-add { border-top: 1px solid var(--line); padding: 12px 18px 6px; }
.r-create-add .r-eyebrow { margin-bottom: 10px; }
.r-create-adds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.r-create-addbtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 68px; padding: 8px 4px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg-raised); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.r-create-addbtn svg { color: var(--accent); }
@media (hover: hover) { .r-create-addbtn:hover { border-color: rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.07); } }
.r-create-addbtn--host { border-color: rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.08); }
.r-create-addbtn[aria-pressed="true"] { background: rgba(var(--accent-rgb), 0.18); }
.r-create-toggle { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); font-size: 14.5px; cursor: pointer; }
/* Who Can See This (25 Nov 2026): VIP, Duke's Notes, Free Accounts. In Create a Post for Duke's team, and in the post menu's box. */
.r-audience { margin: 0; padding: 0; border: 0; min-width: 0; }
.r-audience-legend { padding: 0; margin: 0 0 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.r-audience-boxes { display: flex; flex-wrap: wrap; gap: 8px; }
.r-audience-box { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; cursor: pointer; }
.r-audience-box:has(input:checked) { border-color: rgba(var(--accent-rgb), 0.6); background: rgba(var(--accent-rgb), 0.1); }
.r-audience-box input { margin: 0; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.r-audience-none { margin: 8px 0 0; }
.r-create-audience { padding: 12px 18px 0; }
/* A member's Create a Post: who will see it, one fine line (pass 2, 25 Nov 2026). */
.r-create-audience .r-create-sees { line-height: 1.45; }
/* Duke's team: who can see each post, beside its channel (pass 2, 25 Nov 2026). */
.r-post-audwrap { white-space: nowrap; }
.sure-card .r-audience { margin: 0 0 20px; }
.r-switch { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: rgba(var(--ink-rgb), 0.2); position: relative; cursor: pointer; transition: background 0.18s ease; margin: 0; flex: none; }
.r-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.18s ease; }
.r-switch:checked { background: var(--accent-fill); }
.r-switch:checked::after { transform: translateX(18px); }
.r-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.r-photo--video { background: #000; }
.r-photo video { width: 100%; height: 100%; object-fit: cover; }
.r-photo-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); pointer-events: none; }
.r-photo--busy { display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); text-align: center; }

/* who is here */
.r-here-count { border: 0; background: none; font: inherit; cursor: pointer; padding: 4px 6px; margin: -4px -6px; border-radius: 6px; }
@media (hover: hover) { .r-here-count:hover { background: rgba(var(--accent-rgb), 0.12); } }
.r-here-count--static { cursor: default; margin: 0 0 0 auto; }
.r-here-count--static:hover { background: none; }
.r-here-chev { color: var(--muted); margin-left: 2px; }
button.r-here-more { cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; }
.r-here-strip { font: inherit; cursor: pointer; }
.r-here-panel { max-width: 420px; max-height: min(640px, calc(100vh - 48px)); }
.r-here-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.r-here-head h2 { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 20px; }
.r-here-list { flex: 1; overflow-y: auto; min-height: 0; padding: 4px 0; }
.r-here-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; color: var(--ink); text-decoration: none; }
.r-here-row + .r-here-row { border-top: 1px solid var(--line-soft); }
@media (hover: hover) { .r-here-row:hover { background: rgba(var(--ink-rgb), 0.04); color: var(--ink); } }
.r-here-rowtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.r-here-rowname { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.r-here-moreline { padding: 8px 18px; }
.r-here-foot { padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.r-here-foot .r-btn { width: 100%; }

@media (max-width: 860px) {
  /* Create a Post takes the whole screen on a phone */
  .r-create-scrim { padding: 0; }
  .r-create { max-width: none; height: 100%; max-height: none; border-radius: 0; border: 0; }
  .r-create-head { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .r-create-adds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Keyboard up: the add buttons fold into one short row, Allow Comments waits. */
  .r-create--typing .r-create-add { padding: 8px 12px; }
  .r-create--typing .r-create-add .r-eyebrow, .r-create--typing .r-create-toggle, .r-create--typing .r-create-audience { display: none; }
  .r-create--typing .r-create-adds { display: flex; gap: 6px; }
  .r-create--typing .r-create-addbtn { flex: 1 1 0; min-width: 0; min-height: 50px; gap: 3px; padding: 5px 2px; font-size: 11.5px; }
  .r-create--typing .r-create-addbtn svg { width: 18px; height: 18px; }
  .r-create--typing .r-create-text { min-height: 80px; flex: 1 1 auto; }
  /* who is here: a sheet from the bottom */
  .r-here-scrim { padding: 0; align-items: flex-end; }
  .r-here-panel { max-width: none; width: 100%; height: auto; max-height: 78vh; border-radius: 12px 12px 0 0; border: 0; }
  /* posts nearly edge to edge (Carson: "almost all the way to the edge but with a bit of space") */
  .tool-view[data-tool="room"] { --tv-pad: 6px; padding-left: 6px; padding-right: 6px; }
  .r-wrap { padding-left: 0; padding-right: 0; }
  .r-main { gap: 8px; }
  .r-feed { gap: 8px; }
  .r-top, .r-chips { margin-left: 8px; margin-right: 8px; }
  .r-post-head { padding: 12px 12px 6px; }
  .r-post-title { padding: 0 12px 6px; }
  .r-post-body { padding: 0 12px 10px; }
  .r-sel, .r-plays, .r-media { margin-left: 12px; margin-right: 12px; }
  .r-media { padding-left: 0; padding-right: 0; }
  .r-likes-row { padding-left: 12px; padding-right: 12px; }
  .r-foot { margin-left: 12px; margin-right: 12px; }
  .r-foot > .r-likes-row { padding: 0; }
}

/* =========================================================================
   ROUND 2 PAGE MENUS (13 October 2026): a page's own controls in the left
   column (client/lib/page-menu.ts). Shown only while the menu is open on a
   computer; otherwise the same controls sit on the page as before.
   ========================================================================= */
.page-menu { display: flex; flex-direction: column; gap: 4px; padding: 0 2px; }
.pm-group { display: flex; flex-direction: column; gap: 6px; padding: 4px 6px 12px; }
.pm-label { margin: 0; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.page-menu .t-seg { display: flex; width: 100%; }
.page-menu .t-seg button { flex: 1; }
.app.collapsed .page-menu { display: none; }

/* Duke's Notes in the menu */
.page-menu .n-pick { position: static; max-height: none; overflow: visible; gap: 2px; }
.page-menu .n-pick-btn { width: 100%; }
.page-menu .h-going { margin: 0; flex-wrap: wrap; gap: 6px; }
.n-one--solo { grid-template-columns: minmax(0, 1fr); }

/* Watch List in the menu: Add to Your List, then the whole list by part */
.w-grid.w-grid--solo { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "eye"; }
.w-menu { display: flex; flex-direction: column; gap: 12px; padding: 0 4px; }
.w-menu .w-add, .w-menu > .t-panel, .w-menu > section, .w-menu > div:first-child { margin: 0; }
.w-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 8px; border: 0; background: none; border-radius: 6px;
  font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; text-align: left;
}
@media (hover: hover) { .w-menu-item:hover:not([disabled]) { background: rgba(var(--ink-rgb), 0.05); } }
.w-menu-item[disabled] { opacity: 0.45; cursor: default; }
.w-menu-name { flex: 1; }
.w-menu-count { font-size: 12px; font-weight: 600; color: var(--muted); }
.w-flash { animation: w-flash 1.4s ease; }
@keyframes w-flash { 0%, 40% { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.45); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } }

/* move a block up or down (as on Race Day) */
.w-move { display: inline-flex; margin-left: 8px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; flex: none; align-self: center; }
.w-move-btn { width: 28px; height: 26px; border: 0; background: var(--bg-raised); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.w-move-btn + .w-move-btn { border-left: 1px solid var(--line); }
@media (hover: hover) { .w-move-btn:hover:not([disabled]) { background: rgba(var(--accent-rgb), 0.12); color: var(--ink); } }
.w-move-btn[disabled] { opacity: 0.35; cursor: default; }
/* the count keeps its place at the right; the arrows sit after it and the links */

/* your note, in full, under your horse (round 2) */
.w-mynote {
  display: flex; flex-direction: column; gap: 3px; width: calc(100% - 46px); margin: -2px 0 10px 46px; padding: 9px 12px; text-align: left; cursor: pointer;
  border: 1px solid rgba(var(--accent-rgb), 0.35); border-radius: 6px; background: rgba(var(--accent-rgb), 0.08); color: var(--ink); font: inherit;
}
@media (hover: hover) { .w-mynote:hover { background: rgba(var(--accent-rgb), 0.14); } }
.w-mynote-label { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.w-mynote-text { font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.w-runner--noted .w-note-chip:not(.w-note-chip--empty) { display: none; }
@media (max-width: 620px) {
  .w-mynote { display: none; }
}

/* Schedule in the menu */
.sc-menu { display: flex; flex-direction: column; }
.page-menu .sc-toggle { display: flex; width: 100%; }
.page-menu .sc-toggle-btn { flex: 1; }
.sc-jump {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 8px; border: 0; background: none; border-radius: 6px;
  font: inherit; font-size: 13.5px; color: var(--ink); text-align: left; cursor: pointer;
}
@media (hover: hover) { .sc-jump:hover { background: rgba(var(--ink-rgb), 0.05); } }
.sc-jump-name { flex: 1; }
.sc-jump-count { font-size: 12px; color: var(--muted); }
.sc-jump--big .sc-jump-count { color: var(--accent); font-weight: 600; }

/* Notes: with the day in the menu, the tracks lead the bar and All Tracks and
   Edit Tracks sit at its end on the same line */
.n-bar.n-bar--menu { flex-wrap: nowrap; align-items: flex-start; }
.n-bar--menu .n-pills { order: 0; flex: 1 1 auto; flex-basis: auto; flex-wrap: wrap; row-gap: 6px; overflow: visible; }
.n-bar--menu .n-all { margin-left: 0; }

/* Watch List's Add panel in the menu: the kind over the box, full width */
.page-menu .w-search { flex-direction: column; align-items: stretch; gap: 8px; }
.page-menu .w-kind, .page-menu .w-search-input { width: 100%; }
.page-menu .w-add .t-head { padding: 10px 12px; }
.page-menu .w-add .t-body { padding: 10px 12px 12px; }

/* With a page menu the left column can be long: it scrolls as one, the
   account block after the menu (at the bottom whenever there is room). */
@media (min-width: 861px) {
  .sidebar { overflow-y: auto; scrollbar-width: thin; }
  .tools-nav { flex: 1 0 auto; overflow: visible; min-height: auto; }
  .app.collapsed .sidebar { overflow: hidden; }
}
.page-menu .w-kind { height: 40px; min-height: 40px; flex: none; }

/* who is here, small, top right of the page heading (13 Oct, evening) */
.r-top { flex-wrap: nowrap; align-items: flex-start; }
.r-top > div:first-child { min-width: 0; }
@media (max-width: 1000px) {
  .r-here-strip:not([hidden]) {
    align-self: flex-start; flex: none; gap: 7px; padding: 5px 10px 5px 8px; margin-top: 2px; font-size: 13px; font-weight: 600;
  }
  .r-here-strip-faces .r-av { width: 22px; height: 22px; font-size: 9px; }
}
/* six tabs on a small laptop: tighter, and never cut off (13 Oct, evening) */
.doors { overflow-x: auto; scrollbar-width: none; }
.doors::-webkit-scrollbar { display: none; }
@media (min-width: 861px) and (max-width: 1200px) {
  .door { padding: 0 10px; font-size: 14px; gap: 6px; }
  .door .tool-soon { display: none; }
  .tool-head-sub { font-size: 16px; }
}
@media (min-width: 861px) and (max-width: 1000px) {
  .door > svg { display: none; }
  .tool-head-sub { display: none; }
}

/* =========================================================================
   THE AGREED ROOM LAYOUT (13 October 2026, late night): mockup
   mockup-2026-10-13-today/ (Plan-Desktop, Plan-Phone, Plan-PhoneSheet,
   Column-Content, Plan-Admin). The "N Active" badge right of the title on
   both sizes, the Race Day button under it where the column is hidden, the
   column itself, the Race Day sheet, and the Announcements box.
   ========================================================================= */

/* the title's corner: the badge, and the Race Day button under it */
.r-top-side { display: flex; flex-direction: column; align-items: stretch; gap: 6px; flex: none; margin-top: 2px; }
.r-here-strip:not([hidden]) {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 5px 10px 5px 8px; border-radius: 6px;
  background: var(--bg-raised); border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap;
}
@media (hover: hover) { .r-here-strip:not([hidden]):hover { border-color: rgba(var(--accent-rgb), 0.55); } }
.r-here-strip-faces { display: inline-flex; }
.r-here-strip-faces .r-av { width: 22px; height: 22px; font-size: 9px; border: 2px solid var(--bg-raised); box-sizing: border-box; }
.r-here-strip-faces .r-av + .r-av { margin-left: -7px; }
.r-here-strip-faces .r-av-lvl { display: none; }

.r-rd-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 12px;
  border: 0; border-radius: 6px; background: var(--accent-fill); color: var(--accent-ink); font: inherit; font-size: 13.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
@media (hover: hover) { .r-rd-btn:hover { background: var(--accent-fill-hover); } }
.r-rd-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.r-rd-btn > svg { flex: none; }
.r-rd-count {
  position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; box-sizing: border-box; border-radius: 10px;
  background: #c4413a; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; line-height: 15px; text-align: center;
  border: 2px solid var(--bg);
}
.r-rd-count[hidden] { display: none; }
.r-wrap[data-column="side"] .r-rd-btn { display: none; }

/* the column: Race Day's own boxes, a little tighter */
.r-rd { min-width: 0; }
.r-rd .h-wrap { max-width: none; margin: 0; }
.h-wrap--column .h-grid { gap: 10px; }
.h-wrap--column .h-col { gap: 10px; }
.h-wrap--column .h-widget { padding: 10px 12px; }
.h-wrap--column .h-qbtn > svg.h-qbtn-chev { color: var(--accent-soft); }
/* The column is narrower than a phone, so it takes the phone's tighter
   controls at any screen size: the controls on their own line from the
   left (the mockup), the arrows at the right, and a track name that wraps
   rather than being cut ("M." beside OFF THE TURF, by-hand pass 13 Oct). */
.h-wrap--column .h-widget-controls { gap: 6px; }
.h-wrap--column :is(.h-widget--dukes, .h-widget--watches, .h-widget--tracks) .h-widget-controls { margin-left: 0; width: 100%; }
.h-wrap--column .h-day button { padding: 4px 8px; font-size: 12px; }
.h-wrap--column .h-manage { padding: 4px 9px; font-size: 12px; }
.h-wrap--column .h-track { flex-wrap: wrap; row-gap: 4px; }
.h-wrap--column .h-track-name { white-space: normal; overflow: visible; text-overflow: clip; min-width: min-content; }
.h-wrap--column .h-track-links { margin-left: 28px; }
.h-showmore {
  display: block; width: 100%; margin: 8px 0 2px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: rgba(var(--ink-rgb), 0.025); color: var(--accent-soft); font: inherit; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer;
}
@media (hover: hover) { .h-showmore:hover { border-color: rgba(var(--accent-rgb), 0.55); background: rgba(var(--accent-rgb), 0.08); } }
.h-star-hint { margin: 6px 0 4px; }

/* the sheet: from the bottom, the Room dimmed above it */
.r-rd-scrim { padding: 0; background: rgba(0, 0, 0, 0); transition: background-color 0.26s ease; }
.r-rd-scrim.r-rd-scrim--in { background: rgba(0, 0, 0, 0.45); }
.r-rd-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top, 0px) + 64px);
  max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border-radius: 14px 14px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(100%); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.r-rd-scrim--in .r-rd-sheet { transform: translateY(0); }
.r-rd-sheet.r-rd-sheet--drag { transition: none; }
.r-rd-grab { flex: none; width: 42px; height: 5px; border-radius: 3px; margin: 8px auto 2px; background: rgba(var(--ink-rgb), 0.22); }
.r-rd-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.r-rd-title { flex: 1; min-width: 0; }
.r-rd-title h2 { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 21px; }
.r-rd-title p { margin: 1px 0 0; color: var(--muted); font-size: 12.5px; }
.r-rd-x {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(var(--ink-rgb), 0.07); color: var(--ink); cursor: pointer;
}
@media (hover: hover) { .r-rd-x:hover { background: rgba(var(--ink-rgb), 0.12); } }
.r-rd-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 10px 8px calc(24px + env(safe-area-inset-bottom, 0px));
}

/* Announcements, above Create a Post */
.r-ann { padding: 4px 16px; }
.r-ann[hidden] { display: none; }
.r-ann-head { margin: 0; padding: 10px 0 6px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-soft); font-weight: 700; }
.r-ann-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.r-ann-head + .r-ann-item { border-top: 0; }
.r-ann-cal { flex: none; width: 46px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); text-align: center; background: var(--bg-raised); }
.r-ann-cal small { display: block; padding: 2px 0; background: var(--accent-fill); color: var(--accent-ink); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; }
.r-ann-cal b { display: block; padding: 2px 0 3px; font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--ink); }
.r-ann-icon { flex: none; width: 46px; height: 46px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: rgba(var(--accent-rgb), 0.14); color: var(--accent-soft); }
.r-ann-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.r-ann-title { font-size: 14.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.r-ann-line { color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.r-ann-fine { color: var(--muted-2); font-size: 12px; }
.r-ann-more { color: var(--accent-soft); font-weight: 600; text-decoration: none; white-space: nowrap; }
.r-ann-more:hover { color: var(--accent); text-decoration: none; }
.r-ann-cta { flex: none; text-decoration: none; }
.r-ann-cta:hover { text-decoration: none; }
@media (max-width: 860px) {
  .r-ann { margin: 0; padding: 2px 12px; }
  .r-ann-item { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .r-ann-cal, .r-ann-icon { width: 42px; }
  .r-ann-icon { height: 42px; }
  .r-ann-cal b { font-size: 18px; }
  .r-ann-text { flex: 1 1 calc(100% - 52px); }
  /* the button goes under the words, lined up with them */
  .r-ann-cta { margin-left: 52px; }
}
.r-top-side .r-here-strip:not([hidden]) { align-self: stretch; margin-top: 0; }

/* Settings: Announcements (admins only), as Plan-Admin */
.s-ann-card { display: flex; flex-direction: column; }
.s-ann-label { margin: 16px 0 4px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-soft); font-weight: 700; }
.s-ann-none { margin: 4px 0 8px; }
.s-ann-note { margin: 8px 0 0; }
.s-ann-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.s-ann-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.s-ann-words strong { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.s-ann-words .t-fine { margin: 0; }
.s-ann-status { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 2px 7px; background: rgba(var(--ink-rgb), 0.06); color: var(--muted); white-space: nowrap; }
/* Published: the billing pages' green, light in dark and deep in light (LEARN-32: it was a deep green on dark). */
.s-ann-status--on { background: var(--bl-ok-bg, rgba(63, 174, 106, 0.14)); color: var(--bl-ok-ink, #21643c); }
.s-ann-act { font-size: 13px; font-weight: 600; }
.s-ann-remove { color: var(--muted); }
.s-ann-add { align-self: flex-start; margin-top: 8px; }
.s-ann-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 4px; padding: 12px;
  border: 1px dashed rgba(var(--accent-rgb), 0.6); border-radius: 8px; background: rgba(var(--ink-rgb), 0.02);
}
.s-ann-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); min-width: 0; }
.s-ann-field .t-control { width: 100%; min-width: 0; box-sizing: border-box; }
.s-ann-field--wide { grid-column: 1 / -1; }
.s-ann-btns { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 620px) {
  .s-ann-form { grid-template-columns: 1fr; }
  .s-ann-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .s-ann-words { grid-column: 1 / -1; }
  .s-ann-status { justify-self: start; }
  .s-ann-act { justify-self: end; }
}

/* A scratched watch (13 Oct, late night): struck through, with a red
   "Scratched" tag where the morning line was. A phone hides the morning line
   on every row, so the tag's cell is put back on a scratched one. */
.w-runner--scr .w-runner-odds { opacity: 1; text-decoration: none; display: block; }
.w-scr {
  display: inline-block; margin-left: 0; padding: 2px 6px; border: 0; border-radius: 4px;
  background: #b3463b; color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.3; white-space: nowrap;
}
.w-runner-name .w-scr { margin-left: 6px; text-decoration: none; }

/* =========================================================================
   14 October 2026, Carson: "the today and tomorrow and the both notes and
   scratches are way too big on the notes page. we need this to look good and
   premium." In the left menu a toggle is one quiet track with the choice in
   gold, as the approved mockup drew it (round 2, MenuA-Notes). The Watch
   List's Horse / Trainer / Jockey / Owner tabs use the same look, in the
   menu and on the page.
   ========================================================================= */
.page-menu .t-seg, .w-kinds {
  display: flex; flex-wrap: nowrap; gap: 2px; width: 100%; padding: 2px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg);
}
.page-menu .t-seg button, .w-kinds button {
  flex: 1 1 0; min-width: 0; padding: 5px 2px; border: 0; border-radius: 4px; background: transparent;
  color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 500; line-height: 1.35; white-space: nowrap; cursor: pointer;
}
@media (hover: hover) { .page-menu .t-seg button:hover:not([aria-pressed="true"]), .w-kinds button:hover:not([aria-pressed="true"]) { color: var(--ink); background: rgba(var(--ink-rgb), 0.06); } }
.page-menu .t-seg button[aria-pressed="true"], .w-kinds button[aria-pressed="true"] { background: var(--accent-fill); color: var(--accent-ink); font-weight: 600; }
.page-menu .t-seg button:focus-visible, .w-kinds button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.w-add .w-kinds { margin-bottom: 8px; }
.w-add .w-kinds button { padding: 6px 2px; }

/* Notes menu, tighter (Carson, 14 October 2026: "make that same part take up
   less vertical space so all the race numbers are visible on bigger race
   days"). Smaller gaps between the groups and slimmer race rows, so a
   twelve race card fits on a normal laptop screen. */
.page-menu .pm-group { gap: 5px; padding: 2px 6px 8px; }
.page-menu .n-pick { gap: 1px; }
.page-menu .n-pick-btn { padding: 4px 10px; gap: 8px; }
.page-menu .n-pick-name { font-size: 14px; line-height: 1.3; width: 56px; }
.page-menu .h-going { gap: 4px; }
.page-menu .h-going > * { padding-top: 2px; padding-bottom: 2px; }

/* =========================================================================
   MY ACCOUNT (Carson, 14 October 2026): the photo top right opens a small
   menu on a computer; every item opens My Account, a page of its own with
   its sections as the left menu. On a phone the photo opens My Account's
   list straight away. The account block left the bottom of the left menu.
   ========================================================================= */
.r-post-face { display: inline-flex; flex: none; border-radius: 50%; text-decoration: none; }
.r-post-face:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.head-right { position: relative; }
.head-face[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-fill); border-radius: 50%; }
.acct-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; width: 284px; padding: 6px;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  display: flex; flex-direction: column;
}
.acct-pop-who { padding: 2px 2px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.acct-pop-who .acct-me { padding: 8px; }
.acct-pop-item {
  display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; text-align: left;
  font: inherit; font-size: 14px; color: var(--ink); cursor: pointer;
}
.acct-pop-item:focus-visible { background: rgba(var(--accent-rgb), 0.12); outline: none; } @media (hover: hover) { .acct-pop-item:hover { background: rgba(var(--accent-rgb), 0.12); outline: none; } }
.acct-pop-app { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; font-size: 14px; }
.acct-pop-app .appearance { margin: 0; }
.acct-pop hr { border: 0; border-top: 1px solid var(--line-soft); margin: 4px 0; }
.acct-pop-out { color: var(--muted); }

/* the page */
.acct-wrap { max-width: 760px; margin: 0 auto; padding: 4px 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.acct-back { align-self: flex-start; color: var(--accent-soft); font-weight: 600; font-size: 14px; text-decoration: none; padding: 4px 0; }
@media (hover: hover) { .acct-back:hover { color: var(--accent); } }
.acct-page { display: flex; flex-direction: column; gap: 14px; }
.acct-title { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 26px; }
.acct-card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.acct-card .appearance { align-self: flex-start; margin: 0; }
.acct-lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.acct-card .t-fine { margin: 0; }
.acct-plan { flex-direction: row; align-items: flex-start; justify-content: space-between; }
.acct-label { display: block; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-soft); font-weight: 700; }
.acct-plan-name { display: block; font-family: var(--display); font-weight: var(--display-weight); font-size: 22px; margin-top: 2px; }
.acct-ok { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: rgba(63, 174, 106, 0.14); color: #21643c; white-space: nowrap; }
:root[data-theme="dark"] .acct-ok { color: #6fd39a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .acct-ok { color: #6fd39a; } }
.acct-toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.acct-toggle input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent-fill); flex: none; }
.acct-toggle > span { display: flex; flex-direction: column; gap: 2px; }
.acct-toggle b { font-weight: 600; font-size: 15px; }
.acct-note:empty { display: none; }
.acct-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.acct-posts { align-self: flex-start; text-decoration: none; }
.acct-profile { display: flex; flex-direction: column; gap: 12px; }

/* the left menu on a computer */
.acct-menu { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px; }
.acct-menu-item {
  display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: none; text-align: left;
  font: inherit; font-size: 14px; color: var(--ink); text-decoration: none; cursor: pointer;
}
@media (hover: hover) { .acct-menu-item:hover { background: rgba(var(--ink-rgb), 0.05); color: var(--ink); } }
.acct-menu-item[aria-current="true"] { background: rgba(var(--accent-rgb), 0.16); box-shadow: inset 3px 0 0 var(--accent-fill); font-weight: 600; }
.acct-menu-out { margin-top: 8px; color: var(--muted); }

/* the phone's list */
.acct-list-page { display: flex; flex-direction: column; gap: 12px; }
.acct-who .acct-me { padding: 10px 17px; }
.acct-who .acct-me .r-av { width: 44px; height: 44px; font-size: 14px; }
.acct-list { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; }
.acct-list-row, .acct-row-app {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 16px;
  border: 0; border-top: 1px solid var(--line-soft); background: none; font: inherit; font-size: 15px; color: var(--ink); text-decoration: none; text-align: left; cursor: pointer; width: 100%;
}
.acct-list > :first-child { border-top: 0; }
/* A gold line icon before each section (Gilded, 26 Nov 2026). */
.acct-menu-item { display: flex; align-items: center; gap: 10px; }
.acct-icon { width: 17px; height: 17px; flex: none; color: var(--accent); }
.acct-list-row > .acct-icon + span, .acct-row-app > .acct-icon + span { flex: 1; min-width: 0; }
.acct-menu-out .acct-icon, .acct-list-out .acct-icon { color: var(--muted); }
.acct-list-out { justify-content: flex-start; }
@media (hover: hover) { .acct-list-row:hover { background: rgba(var(--ink-rgb), 0.03); color: var(--ink); } }
.acct-row-app { cursor: default; }
.acct-row-app .appearance { margin: 0; }
.acct-chev { color: var(--muted); font-size: 18px; }
.acct-list-out { color: var(--muted); }
.acct-pop-app .appearance, .acct-row-app .appearance, .acct-card .appearance { width: auto; }

/* Round 2 items built 14 October 2026 */
.ch-new {
  margin-left: auto; flex: none; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; white-space: nowrap;
  background: rgba(var(--accent-rgb), 0.18); color: var(--accent-soft);
}
.r-who { display: inline-flex; gap: 2px; padding: 2px; margin-top: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.r-who-btn {
  padding: 5px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
@media (hover: hover) { .r-who-btn:hover:not([aria-pressed="true"]) { color: var(--ink); background: rgba(var(--ink-rgb), 0.06); } }
.r-who-btn[aria-pressed="true"] { background: var(--accent-fill); color: var(--accent-ink); font-weight: 600; }
.r-who-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.r-host-reply {
  margin: 0 16px 12px; padding: 10px 12px; border-left: 3px solid var(--accent-fill); border-radius: 0 6px 6px 0;
  background: rgba(var(--accent-rgb), 0.08); display: flex; flex-direction: column; gap: 4px;
}
.r-host-reply-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.r-host-reply-head .r-av { width: 24px; height: 24px; font-size: 10px; }
.r-host-reply-head .r-av-lvl { display: none; }
.r-host-reply-head strong { font-weight: 600; }
.r-host-reply-body {
  margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.r-host-count { margin-left: auto; margin-right: 12px; color: var(--accent-soft); font-weight: 600; }
@media (max-width: 860px) { .r-host-reply { margin-left: 12px; margin-right: 12px; } }
/* The Appearance switch where it sits inline (photo menu, My Account): its
   own width, each choice with room, and the gold choice as on every toggle. */
.acct-pop-app .appearance, .acct-row-app .appearance, .acct-card .appearance { margin: 0; flex: none; }
.acct-pop-app .appearance button, .acct-row-app .appearance button, .acct-card .appearance button { flex: none; padding: 5px 11px; }
.acct-pop-app .appearance button[aria-pressed="true"], .acct-row-app .appearance button[aria-pressed="true"], .acct-card .appearance button[aria-pressed="true"] {
  background: var(--accent-fill); color: var(--accent-ink); box-shadow: none;
}
.issue-box .w-note-box { width: 100%; max-width: 100%; box-sizing: border-box; margin-left: 0; margin-right: 0; }

/* Report and Block (Carson, 9 November 2026) */
.r-muted { color: var(--muted); font-size: 14px; margin: 0; }
.r-toast { position: fixed; left: 16px; right: 16px; margin: 0 auto; width: fit-content; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60; max-width: 520px; padding: 12px 16px; border-radius: 8px; background: var(--bg-raised); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0,0,0,0.35); font-size: 14px; line-height: 1.4; transition: opacity 0.4s ease; }
.r-toast--out { opacity: 0; }
@media (max-width: 860px) { .r-toast { bottom: calc(84px + env(safe-area-inset-bottom)); } }
.acct-blocked { margin-top: 16px; padding: 16px; }
.acct-blocked-title { font-size: 15px; margin: 0 0 10px; }
.acct-blocked-list { display: flex; flex-direction: column; gap: 10px; }
.acct-blocked-row { display: flex; align-items: center; gap: 10px; }
.acct-blocked-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Design pass, 16 Nov 2026: the channel chips scroll sideways; fade the last one
   so the row reads as "more this way" rather than cut off. */
@media (max-width: 860px) {
  .r-chips { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); padding-right: 28px; }
}

/* --------------------------------------------- following, messages, switches (14 Nov 2026) */
/* The envelope next to the bell: the same size and badge. */
.env-button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; color: rgba(var(--ink-rgb), 0.75); text-decoration: none; flex: none;
}
@media (hover: hover) { .env-button:hover { background: rgba(var(--ink-rgb), 0.06); color: var(--ink); } }
.env-button > svg { width: 22px; height: 22px; }
.env-badge {
  /* Grows to the right from the icon's corner, so "9+" never hides the icon (LEARN-06). */
  position: absolute; top: 4px; left: 23px; right: auto; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 999px; background: var(--loss, #d9534f); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  border: 2px solid var(--bg);
}
.env-badge[hidden] { display: none; }

/* A profile: followers, following, Follow and Message. */
.r-profile-follow { display: flex; gap: 16px; flex-wrap: wrap; }
.r-profile-follow b { color: var(--ink); font-weight: 600; }
.r-profile-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 860px) { .r-profile-follow, .r-profile-buttons { justify-content: center; } }

/* Messages: the inbox and a conversation. */
.dm-wrap { max-width: 760px; margin: 0 auto; padding: 4px 16px 24px; box-sizing: border-box; }
.dm-inbox { display: flex; flex-direction: column; gap: 12px; }
.dm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dm-title { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 26px; }
.dm-list, .dm-people { display: flex; flex-direction: column; gap: 8px; }
.dm-people { padding-top: 6px; }
.dm-people[hidden] { display: none; }
.dm-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--bg-raised);
  border: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; font: inherit; text-align: left; cursor: pointer; width: 100%; box-sizing: border-box;
}
@media (hover: hover) { .dm-row:hover { border-color: var(--line); } }
.dm-row .r-av-lvl { display: none; }
.dm-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dm-row-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.dm-row-name b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-when { margin-left: auto; flex: none; font-size: 12px; color: var(--muted); }
.dm-preview { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-row--unread .dm-preview { color: var(--ink); font-weight: 500; }
.dm-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.dm-staff { flex: none; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-soft); }
.dm-muted { font-size: 12px; color: var(--muted); }
.dm-empty { margin: 0; padding: 18px; color: var(--muted); text-align: center; line-height: 1.5; }
.dm-note:empty, .dm-status:empty { display: none; }

.dm-convo {
  display: flex; flex-direction: column; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  height: calc(100dvh - 190px); min-height: 380px;
}
.dm-convo-top { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.dm-back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 28px; line-height: 1; color: var(--muted); text-decoration: none; border-radius: 50%; }
@media (hover: hover) { .dm-back:hover { background: rgba(var(--ink-rgb), 0.06); color: var(--ink); } }
.dm-who { flex: 1; min-width: 0; }
.dm-who-link { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; max-width: 100%; }
.dm-who-link .r-av-lvl { display: none; }
.dm-who-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; }
.dm-who-name b { font-weight: 600; font-size: 16px; }
.dm-menu .r-menu-list { min-width: 220px; }
.dm-menu .r-menu-list .dm-bad { color: var(--loss, #d9534f); }
.dm-older { align-self: center; margin: 8px 0 0; }
.dm-older[hidden] { display: none; }
.dm-stream { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.dm-day { align-self: center; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 6px 0 2px; }
.dm-b { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.dm-b-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.dm-b-when { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.dm-b--them { align-self: flex-start; background: var(--bg); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; }
.dm-b--me { align-self: flex-end; background: rgba(var(--accent-rgb), 0.16); border-bottom-right-radius: 4px; }
.dm-foot { border-top: 1px solid var(--line-soft); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.dm-compose { display: flex; gap: 8px; align-items: flex-end; }
.dm-compose textarea {
  flex: 1; min-width: 0; resize: none; min-height: 42px; max-height: 160px; padding: 10px 14px; border-radius: 20px; box-sizing: border-box;
  background: var(--bg-input); border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.4;
}
.dm-compose textarea:focus { outline: none; border-color: rgba(var(--accent-rgb), 0.5); }
.dm-send { min-height: 42px; border-radius: 20px; }
.dm-count:empty { display: none; }
.dm-cannot { margin: 0; color: var(--muted); font-size: 14px; text-align: center; padding: 6px; }
.dm-gone { padding: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
@media (max-width: 860px) {
  .dm-wrap { padding: 0 0 12px; }
  .dm-convo { height: calc(100dvh - 210px - env(safe-area-inset-bottom, 0px)); border-radius: 10px; }
  .dm-b { max-width: 86%; }
}

/* My Account, Notifications: App and Email switches per type. */
.acct-ngrid { display: grid; grid-template-columns: 1fr auto auto; column-gap: 0; align-items: center; }
.acct-nrow { display: contents; }
.acct-nh { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; text-align: center; }
.acct-nlabel { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 15px; align-self: stretch; justify-content: center; text-wrap: pretty; }
.acct-ncell { display: flex; justify-content: center; align-items: center; padding: 10px 0 10px 18px; border-top: 1px solid var(--line-soft); align-self: stretch; }
.acct-nh { padding-left: 18px; }
.acct-nhead .acct-nh:first-child { padding-left: 0; }
.acct-nhead .acct-nh:first-child { text-align: left; }
.acct-switch {
  position: relative; width: 42px; height: 24px; border-radius: 12px; border: 0; padding: 0; cursor: pointer; flex: none;
  background: rgba(var(--ink-rgb), 0.2); transition: background 0.15s;
}
.acct-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3); transition: left 0.15s;
}
.acct-switch[aria-checked="true"] { background: var(--accent-fill); }
.acct-switch[aria-checked="true"]::after { left: 21px; }
.acct-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acct-switch[disabled] { opacity: 0.6; cursor: default; }
.acct-nfine { margin-top: 4px; }
.dm-titles { display: flex; flex-direction: column; gap: 2px; }
.dm-total { margin: 0; }
.dm-total:empty { display: none; }
.dm-dot--n { width: auto; height: 20px; min-width: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }

/* Design pass 2, 16 Nov 2026 (Carson: "some buttons are oversized").
   Phones: the Room's title reads full width; Active and Race Day sit as one
   compact row level with Latest / Duke Only. The comment send button keeps
   Apple's 44 point tap area but reads lighter: gold arrow on a quiet circle
   that fills gold once there is something to send. */
@media (max-width: 860px) {
  .r-top { position: relative; display: block; }
  .r-top > div:first-child { min-width: 0; }
  .r-top-side { position: absolute; right: 0; bottom: 0; flex-direction: row; align-items: center; gap: 8px; margin: 0; }
  .r-top-side .r-here-strip { height: 32px; padding: 0 10px; }
  .r-top-side .r-here-strip-faces { display: none; }
  .r-top-side .r-rd-btn { height: 32px; min-height: 0; padding: 0 12px; gap: 6px; background: transparent; color: var(--accent); border: 1px solid rgba(var(--accent-rgb), 0.55); font-size: 13.5px; }
  @media (hover: hover) { .r-top-side .r-rd-btn:hover { background: rgba(var(--accent-rgb), 0.1); } }
  .r-top-side .r-rd-btn svg { width: 15px; height: 15px; }
  .r-reply input { min-height: 40px; }
  .r-send { width: 40px; height: 40px; background: transparent; color: var(--accent); border: 1px solid rgba(var(--accent-rgb), 0.45); position: relative; }
  .r-send::after { content: ""; position: absolute; inset: -2px; }
  .r-send svg { width: 18px; height: 18px; }
  .r-reply:focus-within .r-send:not([disabled]) { background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; }
}

/* A deleted account (16 Nov 2026): a plain circle, no level, a name that is not a link. */
.r-av--gone { color: var(--muted); }
.r-gone-name { color: var(--muted); }

/* Duke's Notes channel, for VIPs and staff: one quiet line by the composer and comment box. */
.r-vip-note { margin: 4px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.r-vip-note[hidden] { display: none; }
.r-reply .r-vip-note { flex-basis: 100%; margin: 0; }
.r-reply:has(.r-vip-note) { flex-wrap: wrap; }
.r-create-body > .r-vip-note { margin: 0 0 8px; }

/* Design pass, 17 Nov 2026: on an iPad (and small laptops) the page name at the
   end of the tab row squeezed the tabs until Learn was cut in half. The lit tab
   and the left menu already say where you are, so the name goes below 1200px. */
@media (min-width: 861px) and (max-width: 1199px) {
  .tool-head-tabs .tool-head-sub { display: none; }
}

/* Settings, Room Channels (client/tools/channels-admin.ts, 17 Nov 2026). */
.s-chan-row { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.s-chan-move { display: flex; gap: 4px; }
.s-chan-arrow {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: transparent;
  color: var(--ink); font-size: 15px; line-height: 1; cursor: pointer;
}
@media (hover: hover) { .s-chan-arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); } }
.s-chan-arrow:disabled { opacity: 0.3; cursor: default; }
.s-chan-form { grid-template-columns: 1fr; }
.s-chan-head { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; }
.s-chan-icon { text-align: center; font-size: 18px; }
.s-chan-perms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.s-chan-audience { grid-column: 1 / -1; }
.s-chan-audience .s-chan-choices { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.s-chan-set { margin: 0; padding: 12px 14px; border: 1px solid rgba(var(--accent-rgb), 0.35); border-radius: 10px; min-width: 0; display: grid; gap: 8px; }
.s-chan-set legend { padding: 0 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.s-chan-set .t-fine { margin: 2px 0 0; }
.s-chan-choices { display: grid; gap: 6px; }
.s-chan-choice, .s-chan-teaser { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 4px 0; }
.s-chan-choice input, .s-chan-teaser input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.s-chan-choice span, .s-chan-teaser span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.s-chan-choice b, .s-chan-teaser b { font-weight: 600; color: var(--ink); font-size: 14px; }
.s-chan-choice small, .s-chan-teaser small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.s-chan-teaser { grid-column: 1 / -1; border: 1px solid rgba(var(--accent-rgb), 0.35); border-radius: 10px; padding: 12px 14px; }
@media (max-width: 700px) {
  .s-chan-perms { grid-template-columns: 1fr; }
  .s-chan-row { grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .s-chan-row .s-ann-words { grid-column: 1 / -1; }
}

/* The phone keyboard (client/lib/app-shell.ts startKeyboardFit, 17 Nov 2026):
   while typing, the page fills exactly what shows above the keyboard and the
   tab bar steps aside. */
@media (max-width: 860px) {
  html.kb-open .app { position: fixed; left: 0; right: 0; top: var(--vvtop, 0px); height: var(--vh); }
  html.kb-open .tabbar { display: none; }
  /* An open post (and any sheet over the page) fits the same space, so its
     comment box sits right above the keyboard. Create a Post sizes itself. */
  html.kb-open .r-modal-scrim:not(.r-create-scrim) { top: var(--vvtop, 0px); bottom: auto; height: var(--vh); }
  html.kb-open .r-modal-foot .r-reply { padding-bottom: 10px; }
}

/* Comment on the feed opens the post (17 Nov 2026): the count is a link too,
   and the hidden box that holds the phone keyboard while the post opens. */
.r-count-link { cursor: pointer; }
@media (hover: hover) { .r-count-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; } }
.r-kb-bridge { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; font-size: 16px; border: 0; padding: 0; pointer-events: none; }

/* Pins (17 Nov 2026): Minimize beside the Pinned pill, the slim minimized
   row, and a pinned comment. */
.r-min-toggle {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 2px;
  padding: 2px 8px 2px 9px; border: 1px solid rgba(var(--accent-rgb), 0.28); border-radius: 999px;
  background: transparent; color: rgba(var(--ink-rgb), 0.62); font: inherit; font-size: 11.5px; font-weight: 600;
  cursor: pointer; line-height: 1.4; white-space: nowrap;
}
@media (hover: hover) { .r-min-toggle:hover { color: var(--accent); border-color: var(--accent); } }
.r-min-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.r-min-toggle svg { width: 14px; height: 14px; }
.r-post--min {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-color: rgba(var(--accent-rgb), 0.35);
}
.r-post--min .r-pill { flex: none; }
.r-min-title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink); font-family: var(--display); font-size: 17px; text-decoration: none;
}
@media (hover: hover) { .r-min-title:hover { color: var(--accent); } }
.r-post--min .r-min-toggle { flex: none; margin-left: 0; padding: 4px 10px 4px 12px; font-size: 12.5px; }
.r-comment--pinned { background: rgba(var(--accent-rgb), 0.06); }
.r-comment-who .r-pill { margin: 0 2px; }

/* The likes row keeps likes, Duke's line and the comment count on one line
   on a phone; Duke's line wraps inside its own space instead (17 Nov 2026). */
@media (max-width: 860px) {
  .r-likes-row { flex-wrap: nowrap; }
  .r-likes-row > .r-host-count { white-space: normal; min-width: 0; flex: 1 1 auto; text-align: center; margin: 0 4px; line-height: 1.3; }
  .r-likes-row > [data-comment-count], .r-likes-row > .r-thumb { flex: none; }
}

/* A member's profile: the ••• menu beside Follow and Message (Report, Block or
   Unblock), and the line on a profile you blocked (18 Nov 2026). */
.r-profile-menu .r-profile-more { display: inline-flex; align-items: center; justify-content: center; padding-left: 10px; padding-right: 10px; min-width: 40px; }
.r-profile-menu .r-profile-more svg { width: 18px; height: 18px; }
.r-profile-menu .r-menu-list { min-width: 200px; margin-top: 6px; }
.r-profile-menu .r-menu-list button { font-size: 15px; white-space: nowrap; }
.r-profile:has(> .r-profile-blocked) { flex-wrap: wrap; }
.r-profile-blocked { flex: 0 0 100%; width: 100%; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; font-size: 14px; color: var(--ink); background: rgba(var(--accent-rgb), 0.1); border: 1px solid rgba(var(--accent-rgb), 0.3); }

/* ── My Account > Billing and Subscription (tools/billing.ts; the approved mockup, 21 Nov 2026) ── */
:root { --bl-warn-bg: #2d2214; --bl-warn-line: #5a4223; --bl-warn-ink: #e0a35a; --bl-ok-bg: rgba(124, 196, 138, 0.14); --bl-ok-ink: #7cc48a; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --bl-warn-bg: #fbf1e1; --bl-warn-line: #e8cf9f; --bl-warn-ink: #8a5a12; --bl-ok-bg: rgba(63, 174, 106, 0.12); --bl-ok-ink: #21643c; }
}
:root[data-theme="light"] { --bl-warn-bg: #fbf1e1; --bl-warn-line: #e8cf9f; --bl-warn-ink: #8a5a12; --bl-ok-bg: rgba(63, 174, 106, 0.12); --bl-ok-ink: #21643c; }
.bl { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.bl .bl-back { align-self: flex-start; padding: 2px 0; color: var(--accent-soft); font-weight: 600; font-size: 14px; }
@media (hover: hover) { .bl .bl-back:hover { color: var(--accent); } }
/* A billing screen change scrolls to the page title, clear of the sticky top bar. */
.acct-page { scroll-margin-top: 76px; }
.bl-h { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 21px; }
.bl-eyebrow { margin: 0; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-soft); }
.bl-card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.bl-plan { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bl-plan h3 { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 24px; }
.bl-k { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--muted); }
.bl-k b { color: var(--ink); font-weight: 500; text-align: right; }
.bl-price { font-weight: 600 !important; font-variant-numeric: tabular-nums; }
.bl-price small { color: var(--muted); font-weight: 400; font-size: 13px; }
.bl-pill { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; white-space: nowrap; align-self: center; }
.bl-pill--ok { background: var(--bl-ok-bg); color: var(--bl-ok-ink); }
.bl-pill--warn { background: var(--bl-warn-bg); color: var(--bl-warn-ink); }
.bl-pill--muted { background: rgba(var(--ink-rgb), 0.08); color: var(--muted); }
.bl-small { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.bl-body { margin: 0; font-size: 14.5px; line-height: 1.5; }
.bl-bad { color: var(--loss) !important; }
.bl-big { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 24px; line-height: 1.25; text-wrap: balance; }
.bl-cc { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.bl-cc > :last-child { margin-left: auto; }
.bl-logo { width: 40px; height: 26px; border-radius: 5px; background: #1f3a7a; color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; display: grid; place-items: center; flex: none; }
.bl-logo--mastercard { background: #2b2b2b; }
.bl-logo--amex { background: #2671b9; }
.bl-logo--discover { background: #c4561d; }
.bl-list { padding: 0 16px; gap: 0; }
.bl-row { appearance: none; background: none; border: 0; border-top: 1px solid var(--line-soft); font: inherit; font-size: 15px; color: var(--ink); display: flex; justify-content: space-between; align-items: center; padding: 13px 0; cursor: pointer; text-align: left; }
.bl-list > .bl-row:first-child { border-top: 0; }
@media (hover: hover) { .bl-row:hover span:first-child { color: var(--accent); } }
.bl-row--muted { color: var(--muted); }
.bl-chev { color: var(--muted); font-size: 18px; line-height: 1; }
.bl-warn, .bl-soon { border-radius: 12px; padding: 13px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; }
.bl-warn { background: var(--bl-warn-bg); border: 1px solid var(--bl-warn-line); }
.bl-warn b { color: var(--bl-warn-ink); }
.bl-soon { background: var(--bg-raised); border: 1px solid var(--line); }
.bl-warn p, .bl-soon p { margin: 0; }
.bl-btn { appearance: none; display: block; width: 100%; text-align: center; font: inherit; font-size: 15px; font-weight: 600; border-radius: 10px; padding: 12px 14px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; }
a.bl-btn:hover { text-decoration: none; }
.bl-btn:disabled, .bl-btn[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.bl-btn--gold { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); }
a.bl-btn--gold { color: var(--accent-ink); } @media (hover: hover) { a.bl-btn--gold:hover { color: var(--accent-ink); } }
@media (hover: hover) { .bl-btn--gold:not(:disabled):hover { background: var(--accent-fill-hover); } }
.bl-btn--line { border-color: rgba(var(--accent-rgb), 0.6); color: var(--accent); }
@media (hover: hover) { .bl-btn--line:not(:disabled):hover { background: rgba(var(--accent-rgb), 0.08); } }
@media (hover: hover) { .bl-btn--plain:not(:disabled):hover { border-color: var(--muted); } }
.bl-btn--quiet { border: 0; color: var(--muted); font-weight: 500; padding: 8px; width: auto; align-self: center; }
@media (hover: hover) { .bl-btn--quiet:not(:disabled):hover { color: var(--ink); } }
.bl-card .bl-btn--quiet { align-self: flex-start; }
.bl-opts { display: flex; flex-direction: column; gap: 8px; }
.bl-opt { appearance: none; font: inherit; font-size: 14.5px; color: var(--ink); text-align: left; display: flex; gap: 11px; align-items: flex-start; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raised); cursor: pointer; line-height: 1.4; }
@media (hover: hover) { .bl-opt:hover { border-color: rgba(var(--accent-rgb), 0.5); } }
.bl-opt--on { border-color: rgba(var(--accent-rgb), 0.75); background: rgba(var(--accent-rgb), 0.07); }
.bl-dot { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--muted); flex: none; margin-top: 1px; box-sizing: border-box; }
.bl-opt--on .bl-dot { border: 5px solid var(--accent); }
.bl-opt-words { display: flex; flex-direction: column; gap: 3px; }
.bl-opt-words .bl-pill { align-self: flex-start; }
.bl-opt-words b { font-weight: 600; }
.bl-note { font: inherit; font-size: 14.5px; color: var(--ink); background: var(--bg-input); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; resize: vertical; min-height: 64px; }
.bl-note:focus { outline: none; border-color: var(--accent); }
.bl-flash { margin: 0; padding: 11px 13px; border-radius: 10px; font-size: 14px; }
.bl-flash--ok { background: var(--bl-ok-bg); color: var(--ink); }
.bl-flash--bad { background: var(--bl-warn-bg); border: 1px solid var(--bl-warn-line); color: var(--ink); }
.bl-scheduled { border-top: 1px solid var(--line-soft); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.bl-scheduled p { margin: 0; font-size: 13.5px; }
.bl-receipts { gap: 0; padding: 4px 16px; }
.bl-receipt { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.bl-receipt:first-child { border-top: 0; }
.bl-receipt > div:first-child { display: flex; flex-direction: column; gap: 1px; font-size: 14.5px; }
.bl-receipt b { font-weight: 500; }
.bl-receipt-right { display: flex; align-items: center; gap: 12px; }
.bl-link { color: var(--accent); font-weight: 600; font-size: 13.5px; }
/* Pause (Carson's spec, 22 Nov 2026): the offer in the cancel flow and the paused screen. */
.bl-pause { gap: 10px; }
.bl-pause-title { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 21px; line-height: 1.25; }
.bl-pause .mb-label { margin-top: 2px; }
.s-chips.bl-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.bl-chips .s-chip { min-height: 38px; font-size: 13.5px; justify-content: center; text-align: center; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.bl-date { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.bl-date-input { width: auto; min-width: 0; flex: 0 1 190px; font: inherit; font-size: 14.5px; color-scheme: light dark; }
.bl-standing { color: var(--accent-soft); font-weight: 500; }
.bl-pause .bl-standing { text-align: center; }
.mb-date { width: auto; flex: 0 1 170px; padding-top: 6px; padding-bottom: 6px; color-scheme: light dark; }
.tool-body.paused .paused-resume { width: 100%; margin: 4px 0 2px; font-weight: 600; cursor: pointer; }
.paused-keep { margin-top: 10px; }
.paused-manage-row { margin: 8px 0 2px; }
.paused-manage { font-size: 14px; font-weight: 600; }
/* Usage > Billing, for hosts */
.u-bill-reasons { display: flex; flex-direction: column; }
.u-bill-reason { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--muted); }
.u-bill-reason:first-child { border-top: 0; }
.u-bill-reason b { color: var(--ink); font-variant-numeric: tabular-nums; }
.u-bill-quote { border-left: 2px solid var(--accent); padding: 2px 0 2px 12px; margin-top: 10px; }
.u-bill-quote p { margin: 0; font-size: 14.5px; }
.u-bill-quote small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ── Member Billing, for Duke's team (tools/billing-admin.ts, 21 Nov 2026) ──
   Built from the member's Billing cards above (bl-*) and Settings' finder
   (s-box, s-person, s-chip), so the two read as one product. Two columns when
   the page is wide enough, one on a phone. */
.mb { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; container-type: inline-size; }
.mb-head { display: flex; flex-direction: column; gap: 4px; }
.mb-head .eyebrow, .mb-head .t-fine { margin: 0; }
.mb-head .t-fine { font-size: 13.5px; line-height: 1.5; max-width: 640px; }
.mb-find .s-find { margin-bottom: 0; }
.mb-results { display: grid; gap: 6px; }
.mb-results:not(:empty) { margin-top: 10px; }
.mb-hint { margin: 0; }
.mb-person { width: 100%; text-align: left; }
.mb-body { display: flex; flex-direction: column; gap: 12px; }
.mb-who { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px 16px; flex-wrap: wrap; padding: 6px 2px 0; }
.mb-who-words { min-width: 0; flex: 1 1 260px; }
.mb-who h2 { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 26px; line-height: 1.2; overflow-wrap: anywhere; }
.mb-who-meta { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.bl-btn.mb-small { width: auto; padding: 8px 14px; font-size: 13.5px; flex: none; }
.mb-flash { display: flex; flex-direction: column; gap: 10px; }
.mb-link { display: flex; gap: 8px; align-items: stretch; }
.mb-link-field { flex: 1 1 auto; min-width: 0; font-size: 13px; }
.mb-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
@container (min-width: 820px) { .mb-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mb-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mb-actions { display: flex; flex-direction: column; gap: 10px; }
.mb-row--on span:first-child { color: var(--accent); }
.mb-panel { gap: 10px; }
.mb-label { margin: 4px 0 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mb-numbers { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 2px; border-top: 1px solid var(--line-soft); }
.mb-numbers:empty { display: none; }
.mb-chips { margin-bottom: 0; align-items: center; }
.mb-days { width: 92px; padding-top: 6px; padding-bottom: 6px; }
.mb-amount { width: 100%; box-sizing: border-box; }
.bl-btn.mb-danger { border-color: rgba(196, 104, 95, 0.55); color: var(--loss); }
@media (hover: hover) { .bl-btn.mb-danger:not(:disabled):hover { background: rgba(196, 104, 95, 0.08); border-color: var(--loss); } }
.mb-ending .mb-reason { font-size: 13.5px; color: var(--muted); }
.mb-quote { margin: 0; border-left: 2px solid var(--accent); padding: 2px 0 2px 12px; font-size: 14px; line-height: 1.5; }
.mb-payments, .mb-history { gap: 0; }
.mb-payments > .bl-eyebrow, .mb-history > .bl-eyebrow { margin-bottom: 6px; }
.mb-pay { display: flex; flex-direction: column; gap: 6px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.mb-payments > .bl-eyebrow + .mb-pay { border-top: 0; padding-top: 4px; }
.mb-pay-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.mb-pay-words { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 14.5px; }
.mb-pay-words b { font-weight: 500; }
.mb-pay-words .bl-small { overflow-wrap: anywhere; }
.mb-pay-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.mb-pay-right .bl-pill { align-self: flex-end; }
.mb-struck { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(var(--ink-rgb), 0.35); }
.mb-refund-line { font-size: 12.5px; }
.mb-pay-links { display: flex; gap: 18px; align-items: center; }
.mb-linkbtn { appearance: none; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; }
@media (hover: hover) { .mb-linkbtn:hover { text-decoration: underline; } }
.mb-refund { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(var(--ink-rgb), 0.02); }
.mb-refund .bl-small.bl-bad:empty { display: none; }
.mb-hist { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.mb-history > .bl-eyebrow + .mb-hist { border-top: 0; padding-top: 4px; }
.mb-hist-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.mb-hist-who { font-size: 13.5px; font-weight: 600; }
.mb-hist-who--admin { color: var(--accent); }
.mb-hist-who--stripe { color: var(--muted); }
.mb-hist-text { margin: 2px 0 0; font-size: 14px; line-height: 1.45; }
.bl-btn.mb-start { align-self: flex-start; margin-top: 2px; }
.mb-row--on .bl-chev { transform: rotate(90deg); color: var(--accent); }
.bl-chev { transition: transform 0.15s ease; }
.mb-more { align-self: flex-start; padding-top: 10px; border-top: 1px solid var(--line-soft); width: 100%; text-align: left; }
/* Courses: bought or given by hand, Take Back, and Give a Course (24 Nov 2026). */
.mb-courses .mb-pay-top { align-items: center; }
.mb-courses > .bl-eyebrow + .mb-courses-none { padding-top: 4px; }
.mb-courses-none { margin: 0; padding-bottom: 10px; }
.mb-give { display: flex; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.mb-courses > .bl-eyebrow + .mb-give { border-top: 0; padding-top: 4px; }
.mb-give-pick { flex: 1 1 0; min-width: 0; width: auto; min-height: 40px; }
/* Sized to its words beside the menu (.bl-btn:not([hidden]) is full width everywhere else). */
.mb-give .bl-btn.mb-small { width: auto; flex: 0 0 auto; min-height: 40px; }
/* Events: tickets bought or given by hand (24 Nov 2026). Take Back never wraps; the words beside it do. */
.mb-events .mb-linkbtn { white-space: nowrap; flex: 0 0 auto; }
/* Member Billing, launch (24 Nov 2026): Link Stripe Customer, and the messages from Stripe at the foot. */
.mb-link-card { gap: 10px; }
.mb-link-card .mb-give { border-top: 0; padding-top: 0; }
.mb-link-q { flex: 1 1 0; min-width: 0; width: auto; min-height: 40px; }
.mb-k-wrap b { overflow-wrap: anywhere; text-align: right; }
.mb-stripe-box { margin-top: 16px; }
.mb-stripe-box .mb-hist-text, .mb-stripe-box .bl-small { overflow-wrap: anywhere; }
.u-bill-also { margin: 10px 0 0; }
#paused-title:focus { outline: none; }

/* The comment bar at the foot of an open post (Carson, 23 Nov 2026: face,
   box and send were not lined up). The row holds the padding and the safe
   area, the box none, and the face sits level with the box even when the
   note line opens under it. */
.r-modal-foot .r-inline { align-items: flex-start; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); }
.r-modal-foot .r-inline .r-reply { padding: 0; }
.r-modal-foot .r-inline > .r-av { margin-top: 7px; }
@media (max-width: 860px) {
  .r-modal-foot .r-inline > .r-av { margin-top: 5px; }
  html.kb-open .r-modal-foot .r-inline { padding-bottom: 10px; }
}

/* =========================================================================
   POLISH PASS, 23 Nov 2026 (Carson: "Attention to detail is massively
   important"). One block per finding in the Room audit (ROOM-nn).
   ========================================================================= */

/* ROOM-32: no "0" anywhere. A hidden count, thumb or empty likes row is gone. */
.r-likes-row[hidden], .r-likes-row .r-thumb[hidden], .r-likes-row [data-comment-count][hidden] { display: none; }
.r-comment-acts [data-like-count]:empty { display: none; }

/* ROOM-05: comments off, Like alone across the bar. */
.r-bar.r-bar--one { grid-template-columns: minmax(0, 1fr); }

/* ROOM-06: the clamp's padding showed half of a ninth line; the space under
   a clamped body is margin instead, outside what it clips. */
.r-post-body.r-post-body--clamp { padding-bottom: 0; margin-bottom: 14px; }
@media (max-width: 860px) { .r-post-body.r-post-body--clamp { margin-bottom: 10px; } }

/* ROOM-09: the photo grid. One rounded block with hairline gutters; one photo
   full width in its own shape, two side by side at one height, three as one
   large and two stacked, four as two by two (the last says +N on the feed).
   The open post shows every photo, two across. */
.r-media { display: flex; flex-direction: column; gap: 8px; }
.r-media .r-photos-grid { display: grid; gap: 3px; border-radius: 10px; overflow: hidden; background: var(--line-soft); }
.r-media a.r-photo-tile { position: relative; display: block; min-width: 0; min-height: 0; border: 0; border-radius: 0; background: var(--bg-input); overflow: hidden; }
.r-media .r-photo-tile img { display: block; width: 100%; height: 100%; max-height: none; object-fit: cover; }
.r-photos-grid--1 { grid-template-columns: minmax(0, 1fr); }
.r-photos-grid--1 .r-photo-tile img { height: auto; aspect-ratio: var(--ratio, 4 / 3); max-height: 520px; }
.r-photos-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); aspect-ratio: 8 / 5; }
.r-photos-grid--3 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 3 / 2; }
.r-photos-grid--3 .r-photo-tile:first-child { grid-row: 1 / span 2; }
.r-photos-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 1 / 1; }
.r-photos-grid--2, .r-photos-grid--3, .r-photos-grid--4 { max-height: 520px; }
.r-photos-grid--all { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
.r-photos-grid--all .r-photo-tile { aspect-ratio: 1 / 1; }
.r-photos-grid--all .r-photo-tile:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
.r-photo-tile-more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.5); color: #fff; font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: 0.01em;
}
@media (max-width: 860px) {
  .r-photos-grid--1 .r-photo-tile img { max-height: min(62vh, 460px); }
  .r-photos-grid--2, .r-photos-grid--3, .r-photos-grid--4 { max-height: min(62vh, 460px); }
}
@media (hover: hover) {
  .r-media a.r-photo-tile img { transition: transform 0.25s ease, filter 0.25s ease; }
  .r-media a.r-photo-tile:hover img { filter: brightness(1.04); }
}

/* ROOM-11 (and ROOM-28, Messages): a load that failed is a card that says
   what happened and one Try Again. */
.r-error { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 20px; text-align: center; }
.r-error-title { font-family: var(--display); font-weight: var(--display-weight); font-size: 19px; color: var(--ink); }
.r-error-line { margin: 0 0 6px; max-width: 34ch; color: var(--muted); font-size: 14px; line-height: 1.5; text-wrap: balance; }
.r-lb-list .r-error { border: 0; background: none; }

/* ROOM-12: a menu item never wraps; a very long one ends in an ellipsis
   inside the screen instead (ROOM-03: room.ts placeMenu keeps it on it). */
.r-menu-list { max-width: calc(100vw - 16px); box-sizing: border-box; }
.r-menu-list button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ROOM-15: on a phone Duke's line under a post has a row of its own, under
   the likes and the count, and never wraps inside it. */
@media (max-width: 860px) {
  .r-likes-row { flex-wrap: wrap; }
  .r-likes-row > .r-host-count { order: 3; flex: 1 1 100%; margin: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ROOM-16: no one-word last lines in the Room's short paragraphs. */
.r-top p, .r-vip-note, .r-empty, .r-no-comments, .r-comments-off, .dm-empty, .bell-empty, .r-fine { text-wrap: pretty; }
.r-bio-hint { text-wrap: balance; }

/* ROOM-17: a line from Duke's Picks itself wears the mark, no level. */
.bell-house { background: var(--accent-fill) url(/logo-mark.png) center / 70% no-repeat; }

/* ROOM-20: the bell on a phone comes down over a dimmed page, as tall as the
   space above the tab bar. */
.bell-scrim { display: none; }
@media (max-width: 860px) {
  .bell-scrim { display: block; position: fixed; inset: 0; z-index: 69; background: rgba(0, 0, 0, 0.42); }
  .bell-list { max-height: calc(100dvh - 56px - env(safe-area-inset-top, 0px) - var(--tabbar-h, 63px) - env(safe-area-inset-bottom, 0px) - 20px); }
}
/* ROOM-28: a list that did not load says so with Try Again. */
.bell-failed { display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* ROOM-19: the phone's search sits on a solid strip under the top bar, so the
   page heading never shows between the box and its results. */
@media (max-width: 860px) {
  .hsearch--open::before {
    content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 62px; z-index: 84;
    background: var(--bg-deep); border-bottom: 1px solid var(--line);
  }
  .hsearch--open .hsearch-list { top: calc(100% + 62px); border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
}

/* ROOM-21: Show Older Messages sits inside the stream, at its top. */
.dm-stream > .dm-older { align-self: center; flex: none; margin: 2px 0 6px; }

/* ROOM-23, ROOM-24: Create a Post's add buttons sit in one row on a phone
   (no lone Link on a row of its own, and room left to write); the title box
   grows to show the whole title. */
@media (max-width: 860px) {
  .r-create-adds { display: flex; gap: 6px; }
  .r-create-addbtn { flex: 1 1 0; min-width: 0; min-height: 58px; gap: 4px; padding: 6px 2px; font-size: 12px; }
  .r-create-addbtn svg { width: 20px; height: 20px; }
  .r-create-add { padding: 10px 12px 4px; }
  .r-create-add .r-eyebrow { margin-bottom: 8px; }
}
.r-create-titlebox { flex: none; resize: none; overflow: hidden; line-height: 1.3; font-family: var(--display); box-sizing: border-box; width: 100%; }

/* ROOM-01: on a phone, Latest / Duke Only and the Active and Race Day buttons
   share one row under the title and never overlap; on the narrowest phones
   they tighten, and if they still cannot fit, the buttons drop under. */
@media (max-width: 860px) {
  .r-top { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 8px; }
  .r-top > div:first-child { display: contents; }
  .r-top > div:first-child > :not(.r-who) { flex: 0 0 100%; }
  .r-top .r-who { margin-top: 8px; }
  .r-top-side { position: static; margin: 8px 0 0 auto; }
}
@media (max-width: 860px) {
  .r-who-btn { padding: 5px 10px; }
  .r-top-side { gap: 6px; }
  .r-top-side .r-here-strip { padding: 0 8px; }
  .r-top-side .r-rd-btn { padding: 0 10px; }
}
@media (max-width: 400px) {
  .r-top-side .r-rd-btn > svg { display: none; }
}

/* ROOM-14: on a phone every small control answers a 40px or larger tap. The
   hit area grows (an invisible ::after), the drawing does not. */
@media (max-width: 860px) {
  .r-act--dots, .r-post-head .r-menu > .r-act, .r-modal-top .r-act, .dm-dots, .r-min-toggle,
  .r-comment-acts .r-act, .r-photo-x, .bell-all, .r-who-btn, .r-top-side .r-here-strip, .r-top-side .r-rd-btn,
  .r-view-more, .r-count-link { position: relative; }
  .r-act--dots::after, .r-post-head .r-menu > .r-act::after, .r-modal-top .r-act::after, .dm-dots::after,
  .r-min-toggle::after, .r-comment-acts .r-act::after, .r-photo-x::after, .bell-all::after,
  .r-who-btn::after, .r-top-side .r-here-strip::after, .r-top-side .r-rd-btn::after, .r-view-more::after, .r-count-link::after {
    content: ""; position: absolute;
  }
  .r-act--dots::after { inset: -7px -8px; }
  .r-post-head .r-menu > .r-act::after, .r-modal-top .r-act::after, .dm-dots::after { inset: -4px; }
  .r-min-toggle::after { inset: -10px -4px; }
  .r-comment-acts .r-act::after { inset: -4px 0; }
  .r-photo-x::after { inset: -8px; }
  .bell-all::after { inset: -4px -6px; }
  .r-who-btn::after { inset: -5px 0; }
  .r-top-side .r-here-strip::after, .r-top-side .r-rd-btn::after { inset: -4px 0; }
  .r-view-more::after, .r-count-link::after { inset: -10px -4px; }
  /* Posting in: a 40px picker (WebKit ignores min-height on a native one). */
  .r-create-pick select {
    -webkit-appearance: none; appearance: none; height: 40px; min-height: 40px; padding: 0 30px 0 12px;
    background: var(--bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b0904f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  }
}

/* RACE-39 (racing polish, 23 Nov 2026): on a phone the Race Day button's red
   count sits inside the button, after the word, instead of hanging half off
   its corner. */
@media (max-width: 860px) {
  .r-top-side .r-rd-count { position: static; margin-left: 1px; border: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; }
}


/* ── Account and admin polish (23 Nov 2026 audit, ACCT-xx) ───────────────── */

/* ACCT-13, ACCT-14: Billing's cards apart, as wide as every other section. */
.acct-billing { display: flex; flex-direction: column; gap: 12px; }
.acct-page .bl { max-width: none; }
.acct-plan-card .acct-plan { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.acct-free .acct-see { align-self: flex-start; text-decoration: none; }
/* ACCT-38: a value that will not fit beside its label goes under it whole,
   right aligned, never "Wednesday," on one line and "December 23" on the next. */
.bl-k { flex-wrap: wrap; row-gap: 2px; }
.bl-k > span { flex: 1 1 auto; }
.bl-k > b { margin-left: auto; white-space: nowrap; }
@media (max-width: 380px) { .bl-k > b { white-space: normal; } }
.bl-card .bl-standing { text-align: left; }

/* ACCT-18, ACCT-19, ACCT-20, ACCT-21: Sign-In and Security. */
.acct-security .acct-out-all { align-self: flex-start; }
.acct-buttons { align-items: center; }
.acct-buttons .linkish { font-size: 13px; padding: 0 4px; }
.acct-note--bad { color: var(--loss); }
.acct-pw .acct-note { margin: 0; }

/* ACCT-24: the way to your page sits under the card the way the card sits. */
@media (max-width: 600px) { .acct-profile .acct-posts { align-self: center; } }

/* ACCT-06: Terms and Privacy, small, under Help. */
.acct-help { display: flex; flex-direction: column; gap: 12px; }
.acct-legal { margin: 0; font-size: 12.5px; color: var(--muted); }
.acct-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
@media (hover: hover) { .acct-legal a:hover { color: var(--accent); } }

/* ACCT-51: no one word alone on a line in Notifications. */
.acct-nlabel > span { text-wrap: pretty; }
.acct-nlabel small, .acct-notes .acct-lead { text-wrap: balance; }

/* ACCT-33: admin labels break in balance, and a name with its fact stays whole. */
.s-fold > summary.eyebrow, .s-box > .eyebrow, .s-featured-top .eyebrow, .u-section .eyebrow, .u-tile .eyebrow, .mb .bl-eyebrow { text-wrap: balance; }
.s-person-meta .s-bit { white-space: nowrap; }
.s-share-name { color: var(--ink); }
/* ACCT-30: room between the line under Add an Event and the button above it. */
.s-ann-add + .s-ann-note { margin-top: 10px; }
/* ACCT-32: a removed channel keeps its name and Restore on one line. */
.s-chan-gone { grid-template-columns: minmax(0, 1fr) auto; }
.s-chan-gone .s-ann-act { justify-self: end; }
.s-ann-row.s-chan-gone .s-ann-words { grid-column: auto; }
/* ACCT-20: under Set New Password, the two small ways out on their own line. */
.acct-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.acct-links .linkish { font-size: 13px; }
/* ACCT-31: the courses' up and down are Room Channels' buttons. */
.ln-mg-acts .s-chan-move { margin-right: 2px; }

/* ACCT-45, ACCT-09: on a phone, every control in My Account and the staff
   pages answers a 40px tap. Buttons and pickers grow; small links grow an
   invisible hit area (::before where ::after already draws something). */
@media (max-width: 860px) {
  .acct-wrap .t-btn, .s-wrap .t-btn, .u-wrap .t-btn, .mb .t-btn, .acct-wrap .r-btn--sm { min-height: 40px; }
  .acct-back, .bl .bl-back { display: inline-flex; align-items: center; min-height: 40px; padding: 0; }
  .appearance button { position: relative; }
  .appearance button::before { content: ""; position: absolute; inset: -6px 0; }
  .acct-switch::before { content: ""; position: absolute; inset: -9px -4px; }
  .mb .bl-link, .mb .mb-linkbtn, .bl-receipts .bl-link { position: relative; }
  .mb .bl-link::after, .mb .mb-linkbtn::after, .bl-receipts .bl-link::after { content: ""; position: absolute; inset: -10px -6px; }
  .s-wrap select.t-control, .u-wrap select.t-control, .mb select.t-control, .acct-wrap select.t-control, .ln-mg select.t-control, .s-ann-form select {
    -webkit-appearance: none; appearance: none; height: 40px; min-height: 40px; padding: 0 32px 0 12px; font-size: 16px;
    background: var(--bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b0904f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  }
}

/* ACCT-29: a staff page's switcher and the rail menu for the three pages. */
.door-sub--admin .tool-link[aria-current="true"] { font-weight: 600; }

/* LEARN-33: the top row's buttons are one size and one shape: 44px, the
   same rounded square (Help, Settings and the bell were 40, the envelope a
   44 circle, the face 42). */
.head-icon, .tool-head .bell-button, .tool-head .env-button { width: 44px; height: 44px; border-radius: 6px; }
@media (hover: hover) { .tool-head .env-button:hover { background: rgba(var(--accent-rgb), 0.14); color: var(--accent-soft); } }
.head-face { padding: 5px; }

/* FINAL-06 (23 Nov 2026): one rule for the page's name in the shell. The lit
   tab and the left menu say where you are, so no name floats at the far right
   of the tab row. Only when the left menu is folded away on a wide screen
   does the tab row carry the name of a page that has no tab of its own. */
.tool-head-tabs .tool-head-sub { display: none; }
@media (min-width: 1200px) {
  .app.collapsed .tool-head-tabs .tool-head-sub { display: block; }
}

/* =========================================================================
   FINAL-09 (23 Nov 2026): one segmented control, one outline button, one gold
   button height, everywhere.

   The segmented control is Learn's (Courses / Livestreams / Video Calls), the
   most finished of the six that were in use: a quiet track with the lit choice
   filled gold. 40px tall on every screen, 13px words, radius 8 outside and 6
   inside. Each choice answers a tap to the track's edges, so the hit is 40px
   while the look stays slim (FINAL-14).
   ========================================================================= */
:is(.t-seg, .ln-tabs, .r-who, .appearance, .u-tabs, .u-windows, .sc-seg, .admin-switch):not(.seg-none):not([hidden]) {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 2px;
  height: 40px;
  min-height: 40px;
  max-width: 100%;
  padding: 3px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  overflow: visible;
}
:is(.t-seg, .ln-tabs, .r-who, .appearance, .u-tabs, .u-windows, .sc-seg, .admin-switch):not(.seg-none) > :is(button, a):not([hidden]) {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: auto;
  min-height: 0;
  min-width: 0;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
:is(.t-seg, .ln-tabs, .r-who, .appearance, .u-tabs, .u-windows, .sc-seg, .admin-switch):not(.seg-none) > :is(button, a)::after {
  content: '';
  position: absolute;
  inset: -4px -1px;
}
:is(.t-seg, .ln-tabs, .r-who, .appearance, .u-tabs, .u-windows, .sc-seg, .admin-switch):not(.seg-none) > :is(button, a):is([aria-pressed="true"], [aria-current="true"], .is-on, .u-tab--on, .u-window--on):not([hidden]) {
  background: var(--accent-fill);
  color: var(--accent-ink);
  font-weight: 600;
  border: 0;
}
@media (hover: hover) {
  :is(.t-seg, .ln-tabs, .r-who, .appearance, .u-tabs, .u-windows, .sc-seg, .admin-switch):not(.seg-none) > :is(button, a):not([aria-pressed="true"], [aria-current="true"], .is-on, .u-tab--on, .u-window--on, [hidden]):hover {
    color: var(--ink);
    background: rgba(var(--ink-rgb), 0.06);
    border: 0;
  }
}
:is(.t-seg, .ln-tabs, .r-who, .appearance, .u-tabs, .u-windows, .sc-seg, .admin-switch):not(.seg-none) > :is(button, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Usage's five tabs slide sideways on a phone, inside the track. */
.u-tabs:not(.seg-none):not([hidden]) { overflow-x: auto; display: flex; width: fit-content; }
.u-tabs:not(.seg-none) > .u-tab { flex: none; }
/* Full width where they were full width: the left menu, a phone's Learn tabs. */
.page-menu .t-seg:not(.seg-none):not([hidden]), .w-kinds:not(.seg-none):not([hidden]) { display: flex; width: 100%; }
.page-menu .t-seg:not(.seg-none) > button, .w-kinds:not(.seg-none) > button { flex: 1 1 0; padding: 0 4px; }
@media (max-width: 860px) {
  :is(.t-seg, .ln-tabs, .r-who, .appearance, .u-tabs, .u-windows, .sc-seg, .admin-switch):not(.seg-none) > :is(button, a) { padding: 0 10px; }
}
/* The Notes bar's buttons stand beside the track at its height. */
.tool-view .n-bar .t-seg.n-day:not(.seg-none) > button { min-height: 0; padding: 0 12px; }
.n-bar .n-edit-btn, .n-bar .n-filter-btn, .n-bar .n-pill { min-height: 40px; }

/* One outline button: gold words, a gold hairline, nothing filled (the Room's
   Message, Learn's Open). The grey tools button and Learn's grey Previous,
   which read as switched off, are this now. */
:is(.r-btn--line, .t-btn:not(.t-btn--primary), .ln-btn--line, .ln-btn--quiet, .bl-btn:not(.bl-btn--gold)):not(.seg-none) {
  background: transparent;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  color: var(--accent-soft);
  font-weight: 600;
}
@media (hover: hover) {
  :is(.r-btn--line, .t-btn:not(.t-btn--primary), .ln-btn--line, .ln-btn--quiet, .bl-btn:not(.bl-btn--gold)):not(.seg-none):not(:disabled):hover {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.7);
    color: var(--accent-soft);
  }
}

/* One height, radius and size for every gold and outline button: 40px, 6, 14px.
   (The id in :not() lifts these over the many page-level sizes they replace.) */
:is(.r-btn, .t-btn, .ln-btn, .bl-btn):not(.dm-send):not(#_) {
  min-height: 40px;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}
:is(.r-btn, .t-btn, .ln-btn, .bl-btn):not(.dm-send) { padding-top: 0; padding-bottom: 0; line-height: 1.2; }
a.t-btn:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; gap: 0.3em; }
.bl-btn:not([hidden]) { display: flex; align-items: center; justify-content: center; width: 100%; padding-left: 14px; padding-right: 14px; }

/* FINAL-10: the Notes bar's All picker. The box shows its word at the bar's
   size (13px, like Today, Tomorrow, Edit Tracks and Filter); the real list
   sits over it, unseen, at 16px so an iPhone never zooms into it. */
.n-bar .n-all-wrap {
  position: relative; flex: none; display: inline-flex; align-items: center; width: 116px; height: 40px; box-sizing: border-box;
  padding: 0 28px 0 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font-size: 13px; font-weight: 500;
  background: var(--bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23b0904f' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 11px center;
}
.n-bar .n-all-face { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-bar .n-all-wrap > select.n-all { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; border: 0; padding: 0; }
@media (hover: hover) { .n-bar .n-all-wrap:hover { border-color: rgba(var(--accent-rgb), 0.6); } }
.n-bar .n-all-wrap:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (min-width: 761px) { .n-bar .n-all-wrap { margin-left: auto; } }
@media (max-width: 760px) { .n-bar .n-all-wrap { flex: 1; width: auto; min-width: 0; } }
@media (max-width: 860px) {
  :is(.r-btn, .t-btn, .ln-btn, .bl-btn):not(.dm-send):not(#_) { font-size: 13px; }
}
/* A phone's Notes bar keeps one line: tighter insides, and Filter as its
   icon alone up to the larger phones (its name is in its label). */
@media (max-width: 760px) {
  .tool-view .n-bar .t-seg.n-day:not(.seg-none) > button { padding: 0 8px; }
  .tool-view .n-bar .n-edit-btn, .tool-view .n-bar .n-filter-btn { padding: 0 10px; }
  .n-bar .n-all-wrap { padding: 0 24px 0 10px; background-position: right 9px center; }
}
@media (max-width: 439px) {
  .n-bar .n-filter-short { display: none; }
  .tool-view .n-bar .n-filter-btn { gap: 0; }
}
/* Race Day's box heads keep one line on a phone: "Manage" alone up to the
   larger phones. */
@media (max-width: 440px) { .h-manage-rest { display: none; } }

/* FINAL-12: the paused card in the Room and the paused Notes screen are one
   design: centred, the plan as the eyebrow, Resume Now across the card, then
   Manage Membership and what keeps working. */
.paused-card { text-align: center; }
.paused-card .paused-title, .paused-panel .paused-title { font-size: 22px; margin: 0 0 8px; }
.paused-card .paused-line, .paused-panel .paused-line { margin: 0 auto 16px; max-width: 44ch; font-size: 15px; }
.paused-card .paused-when { margin: -6px auto 16px; max-width: 44ch; font-size: 14px; }
:is(.paused-card, .paused-panel) .paused-resume { width: 100%; margin: 0; font-weight: 600; }
:is(.paused-card, .paused-panel) .ended-status:empty { display: none; }
:is(.paused-card, .paused-panel) .ended-status { margin: 8px 0 0; }
:is(.paused-card, .paused-panel) .paused-manage-row { margin: 10px 0 0; }
:is(.paused-card, .paused-panel) .paused-manage { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; font-weight: 600; color: var(--accent-soft); }
:is(.paused-card, .paused-panel) .paused-keep { margin: 2px 0 0; font-size: 12.5px; color: var(--muted-2); }
.paused-card:not(.room-join--modal) { max-width: 520px; margin-left: auto; margin-right: auto; }
@media (max-width: 760px) { .paused-card .paused-title, .paused-panel .paused-title { font-size: 21px; } }

/* FINAL-13: a 3px gap between the bell's badge ("9+" at its widest) and the
   photo, on every screen.
   Held by its right edge, so the gap does not depend on how wide a phone
   draws "9+": 4px past the bell's box, and the photo sits 7px past it. */
.tool-head .head-right .bell-badge { left: auto; right: -4px; }

/* FINAL-14: every control left under 40px on a phone answers a 40px tap. The
   hit area grows (an invisible ::after); nothing looks any different. */
@media (max-width: 860px), (pointer: coarse) {
  .w-runner-name--open, .w-ai-chip, .w-entry-toggle, .n-horse, .r-chip, .r-top-side .r-here-strip, .r-top-side .r-rd-btn,
  .si-switch, .si-legal a { position: relative; }
  .w-runner-name--open::after, .w-ai-chip::after, .w-entry-toggle::after, .n-horse::after, .r-chip::after,
  .si-switch::after, .si-legal a::after { content: ""; position: absolute; }
  .w-ai-chip::after { inset: -8px -3px -12px; }
  .w-entry-toggle::after { inset: -8px -3px -12px; }
  .n-horse::after { inset: -11px -2px; }
  .r-chip::after { inset: -3px -2px; }
  .r-top-side .r-here-strip::after, .r-top-side .r-rd-btn::after { inset: -5px -2px; }
  .si-switch::after { inset: -13px -6px; }
  .si-legal a::after { inset: -14px -4px; }
}

/* A horse's line on a phone: the whole line opens its pop-up (the name's tap
   area is the line), and the chips on it sit above that with their own. The
   line keeps a little more air under it so AI Summary reaches 40px too. */
@container rows (max-width: 700px) {
  .w-runner:has(> .w-runner-name--open) { padding-bottom: 11px; }
  .w-runner > .w-runner-name--open { position: static; }
  .w-runner > .w-runner-name--open::after { inset: 0; }
  .w-runner > :is(.w-ai-chip, .w-entry-toggle, .w-note-chip, .w-result, .h-via) { position: relative; }
}

/* FINAL-16: the page you are on stays gold in the left menu under the mouse. */
@media (hover: hover) {
  .tool-link[aria-current="true"]:hover:not([disabled]) { background: rgba(var(--accent-rgb), 0.2); color: var(--ink); }
}

/* FINAL-03: an error card inside a Race Day box has no second frame. */
.r-card.r-error.r-error--inside { border: 0; background: none; box-shadow: none; }

/* Dutching's "What I Will Bet / What I Want Back" sits in a narrow column:
   the track fills it and a long choice takes two short lines. */
.tool-view[data-tool="dutch"] .t-field .t-seg:not(.seg-none):not([hidden]) { display: flex; width: 100%; height: auto; }
.tool-view[data-tool="dutch"] .t-field .t-seg:not(.seg-none) > button:not([hidden]) { flex: 1 1 0; white-space: normal; text-wrap: balance; line-height: 1.15; min-height: 32px; padding: 4px 8px; text-align: center; }

/* Launch by-hand pass, 25 Nov 2026. A long value (the admin preview's "Then $2,970 every year
   from Thursday, November 25, 2027") wraps inside its card instead of running past it on a phone. */
.bl-k--long > b { white-space: normal; }
/* The Room's right column: "Manage" alone, as on a narrow phone, so the arrows stay inside the box
   (the bigger outline button pushed them 42 px out at 1280 and 1440). */
.h-wrap--column .h-manage-rest { display: none; }
