/* mc-view.css — THE COMPUTER FORMAT (Nov 10, 2026).
   Every rule in this file is prefixed html[data-view="computer"]:
   when the stamp says "phone" — every phone, every forced phone,
   every not-yet-decided glass — this file is inert and the layout
   is the phone app's, untouched. Composition summary: the bottom
   dock becomes a 232px left rail (the same DOM, restacked); the
   top bar settles at ~68px; content widens to a 1560px shell with
   40px gutters and each room takes its desktop composition (feed
   stream + right column, records grids, messages two-pane, map
   full-bleed, work surfaces full width, hub two-column). Hover
   exists only under (hover:hover). Focus keeps the app's shape-glow
   law — no square outlines anywhere. Below 1024px (a forced
   Computer on a narrow glass) the rail collapses to 64px of icons
   and grids fall to one column: a forced view may look plain, it
   may never scroll sideways. */
html[data-view="computer"] {
  --rail-w: 232px;
  --view-gutter: 40px;
  /* ROUND 3 (v22): the gold this sheet paints with is its OWN
     token, never var(--gold). The Ocean sheet — appended LAST in
     the head on the app origin — redefines --gold at :root with
     !important (--gold:#8be8d6, a pale mint), and an !important
     custom-property declaration wins the variable for every
     consumer on the page: v21's camera row read var(--gold) and
     computed mint in production while its geometry pins passed.
     #E3BC3F is the design system's lantern gold (mc-tokens'
     --accent-warm, the brand-family anchor) — a name Ocean does
     not touch, so the value the member sees is the value here. */
  --view-gold: #E3BC3F;
}

/* ---------- the frame: rail space, bar, dock restacked ---------- */
html[data-view="computer"] body.mc {
  padding-left: var(--rail-w);
}
/* The map page reserves bottom room for the phone dock in its own
   scoped sheet; beside the rail there is no bottom dock to reserve. */
html[data-view="computer"] body.mc:has(#mapUi) {
  padding-bottom: 0;
}
html[data-view="computer"] header.bar {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  min-height: 68px;
  box-sizing: border-box;
}
/* THE RAIL (v21 repair, Nov 10, 2026). The v20 sheet styled the
   bare .tabbar class and assumed the phone flex bar from app.css —
   but the DESIGN sheet (mc-design.css) owns this dock at ID
   specificity: .mc #tabbar is a five-column wave GRID (display:
   grid; grid-template-columns: 1fr 1fr 1.05fr 1fr 1fr), so the
   class-level flex rules landed on a grid container and did
   nothing: the stations stayed in ~26px wave columns inside the
   (correctly sized) 232px nav box, vertically centered by the
   design's align-items:center — the overlapping mid-height cluster
   the member walk photographed. Every rail rule below is therefore
   scoped .mc #tabbar (ID-rooted, like the design's own rules) and
   converts the container itself: display:flex + column. */
html[data-view="computer"] .mc #tabbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  left: 0;
  right: auto;
  top: 0;
  bottom: 0;
  width: var(--rail-w);
  height: auto;
  max-height: none;
  transform: none;
  filter: none;
  padding: 16px 12px;
  border-top: none;
  border-right: 1px solid var(--line);
}
/* The phone dock's glass shape stays with the phone dock. */
html[data-view="computer"] .mc #tabbar .dock-shape {
  display: none;
}
/* The rail does not scroll-hide: a workstation menu stays put.
   (The design's bar-hidden slide is ID-rooted too —
   .mc #tabbar.bar-hidden translate(-50%,112%) — so this override
   is scoped to beat it, not just to repeat the v20 class rule it
   walked through.) */
html[data-view="computer"] .mc #tabbar.bar-hidden {
  transform: none;
}
html[data-view="computer"] .mc #tabbar > a {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 10px 12px;
  min-height: 48px;
  font-size: 0.92rem;
  border-radius: 12px;
}
html[data-view="computer"] .mc #tabbar > a .tic {
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.2rem;
}
/* The design swaps the emoji in .tic for a stroked SVG sized by a
   vw clamp (44px on a workstation) — the rail pins a row icon. */
html[data-view="computer"] .mc #tabbar .tic svg {
  width: 24px;
  height: 24px;
}
/* The sibling stations' orbs ride the rail the way the Camera's
   orb does (dock-uniform pass, Nov 12, 2026): the .tic seat is
   re-pinned to the row's icon size with its drop-shadow off,
   and the glyph inside is recomposed at the camera glyph's
   half-size proportions — the .tic svg rule above would
   otherwise pin the glyph at the full 24px and burst the
   little bubble. */
html[data-view="computer"] .mc #tabbar > a .tic {
  position: relative;
  width: 24px;
  height: 24px;
  filter: none;
}
html[data-view="computer"] .mc #tabbar .tic .dock-glyph {
  top: 26%;
  left: 25%;
  width: 50%;
  height: 50%;
}
/* CAMERA in the rail: the design's absolutely-positioned glass
   orb becomes a full-width accent action row in the same slot —
   same door, rail manners. Every property the design pins on the
   orb (position, left/top, width/min-width, aspect-ratio,
   font-size:0, the translateX(-50%) press) is re-pinned here at
   ID specificity, and the orb + glyph are composed inside the row
   at icon size; the row carries its label as text, like its
   sibling stations. */
html[data-view="computer"] .mc #tabbar .tab-cam-slot {
  display: block;
  flex: 0 0 auto;
  padding: 6px 0;
}
html[data-view="computer"] .mc #tabbar a.tab-cam {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 52px;
  aspect-ratio: auto;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: var(--view-gold);
  filter: none;
  font-size: 0.95rem;
  overflow: hidden;
}
html[data-view="computer"] .mc #tabbar a.tab-cam::after {
  content: "Camera";
  color: #06222a;
  font-weight: 700;
  letter-spacing: 0.01em;
}
html[data-view="computer"] .mc #tabbar a.tab-cam > svg:first-of-type {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
}
html[data-view="computer"] .mc #tabbar a.tab-cam .camera-glyph {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
}
html[data-view="computer"] .mc #tabbar a.tab-cam:active {
  transform: scale(0.97);
}
/* The workstation bar is a slim bar: the design sheet grows the top
   buttons toward 65px on wide glass (an ID-rooted clamp); the
   computer format pins them to workstation size. */
html[data-view="computer"] .mc #bar .topbtn {
  width: 40px;
  height: 40px;
  padding: 8px;
}
html[data-view="computer"] header.bar .brand {
  font-size: 1.15rem;
}
/* …and the brand owl, which the design sheet grows toward 87px on
   wide glass — the slim bar keeps it at the clamp's own floor. */
html[data-view="computer"] .mc .brand-owl {
  width: 38px;
  height: 42px;
}
html[data-view="computer"] .mc .brand-divider {
  height: 29px;
}
/* Floating furniture re-anchors over the content, not the rail. */
html[data-view="computer"] .mc-update-bar {
  left: calc(50% + var(--rail-w) / 2);
  bottom: 1.2rem;
}
html[data-view="computer"] .mc .toast {
  left: calc(50% + var(--rail-w) / 2);
}
html[data-view="computer"] .mc .viewas-bar {
  margin-left: var(--rail-w);
}

/* ---------- content shell ---------- */
html[data-view="computer"] body.mc .wrap,
html[data-view="computer"] .wrap {
  max-width: 1560px;
  padding: 28px var(--view-gutter) 56px;
}
html[data-view="computer"] body.has-tabbar .wrap {
  padding-bottom: 56px;
}
html[data-view="computer"] .mc .app-shell {
  max-width: 1560px;
  padding: 0 var(--view-gutter) 48px;
}
/* Multi-column card grids breathe wider on a workstation. */
html[data-view="computer"] .grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ---------- home: the stream + the right column ---------- */
html[data-view="computer"] #feedSection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  column-gap: 28px;
  align-items: start;
}
html[data-view="computer"] #feedSection > * {
  grid-column: 1;
  min-width: 0;
}
/* v21 hardening: EVERY child of the section carries an explicit
   row as well as its column, so the composition cannot drift with
   child order, a hidden "Older updates", or a future sibling.
   ROUND 3 (v22): v21 rowed the right column's two boxes into
   rows 3 and 4 — but a grid row is as tall as its tallest item,
   and row 3's column-1 item is the ENTIRE feed stream, so Saved
   rode to the bottom of the stream and landed on the same row
   as "Older updates": member-visibly stacked below the feed.
   The right column is now ONE grid item: home.html wraps the
   two boxes in .feed-side, and the pair stacks inside it at the
   TOP of the 340px column, beside the head of the stream,
   however long the stream runs. */
html[data-view="computer"] #feedSection > .mc-feed-head {
  grid-column: 1 / -1;
  grid-row: 1;
}
/* The filter row that held grid-row 2 is REMOVED (Wayne's order,
   Nov 13, 2026, ~8:58 PM — see home.html); the stream and its
   column move up one row, composition otherwise unchanged. */
html[data-view="computer"] #feedSection > #feedList {
  grid-column: 1;
  grid-row: 2;
}
html[data-view="computer"] #feedSection > #feedMore {
  grid-column: 1;
  grid-row: 3;
}
html[data-view="computer"] #feedSection > .feed-side {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}
html[data-view="computer"] .feedcard {
  max-width: 780px;
}

/* ---------- messages: list left, the conversation right ----------
   The bundle unhides #dmThread below the list on a phone; the grid
   puts the same blocks side by side.
   ROUND 3 (v22): v21's grid was real but its right pane was not.
   The bundle keeps #dmThread [hidden] until a conversation opens,
   so in the state a member lands in (nothing selected) column 2
   held a display:none element — grid tracks with no pane in
   them: one visible 320px column and a void, exactly what the
   live walk photographed. The computer format now keeps the
   thread PANE on screen in every state: while the bundle holds
   it [hidden] its children stay down (the design's hidden law
   holds for everything inside it) and the pane shows its
   empty-state face; when the bundle opens a conversation it
   clears [hidden] and the thread renders in the same pane. The
   display override carries !important because the design
   sheet's hidden law is itself !important (.mc [hidden]) —
   this rule wins on specificity (two IDs + the view attribute
   against a class + an attribute). */
html[data-view="computer"] #dmMain {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  column-gap: 24px;
  align-items: start;
}
html[data-view="computer"] #dmMain > * {
  grid-column: 1;
  min-width: 0;
}
html[data-view="computer"] #dmMain > #dmThread {
  grid-column: 2;
  grid-row: 1 / span 12;
  display: block !important;
  min-height: 340px;
}
html[data-view="computer"] #dmMain > #dmThread[hidden] > * {
  display: none !important;
}
html[data-view="computer"] #dmMain > #dmThread[hidden] {
  text-align: center;
  padding-top: 4.5rem;
}
html[data-view="computer"] #dmMain > #dmThread[hidden]::before {
  content: "Select a conversation";
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--txt-dim);
}
html[data-view="computer"] #dmMain > #dmThread[hidden]::after {
  content: "Your conversations are in the list on the left.";
  display: block;
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--txt-dim);
}
html[data-view="computer"] .bubble {
  max-width: 640px;
}

/* ---------- rosters: the directory goes across ----------
   members.html caps its wrap inline at 760px (a phone measure);
   the computer format overrides that one deliberate cap, and
   only in computer view. */
html[data-view="computer"] body.mc:has(#mpFriendList) .wrap {
  max-width: 1560px !important;
}
html[data-view="computer"] #peopleList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

/* ---------- work surfaces: tables run full width ---------- */
html[data-view="computer"] table {
  width: 100%;
}

/* ---------- the profile hub: identity left, sections right ------ */
html[data-view="computer"] body.mc:has(#profileHub) .wrap {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  column-gap: 28px;
  align-items: start;
}
html[data-view="computer"] body.mc:has(#profileHub) .wrap > * {
  grid-column: 2;
  min-width: 0;
}
html[data-view="computer"] body.mc:has(#profileHub) .wrap > #profBody {
  grid-column: 1;
  grid-row: 1 / span 4;
  position: sticky;
  top: 84px;
}
html[data-view="computer"] #profileHub #hubMine,
html[data-view="computer"] #profileHub #hubWork,
html[data-view="computer"] #profileHub #hubExplore,
html[data-view="computer"] #profileHub #hubAccount,
html[data-view="computer"] #profileHub #hubOffice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 14px;
}

/* ---------- case + intake forms keep their measure ---------- */
html[data-view="computer"] body.mc:has(#intakeForm) .wrap,
html[data-view="computer"] body.mc:has(#caseTitle) .wrap {
  max-width: 1000px;
}

/* ---------- the map: full-bleed beside the rail ---------- */
html[data-view="computer"] #mapUi {
  flex: 1 1 auto;
  min-height: 0;
}

/* ---------- the View row matches the Look row's manners ---------- */
[data-mc-view-seg] button.on {
  color: var(--view-gold);
  border-color: var(--view-gold);
}

/* ---------- hover: only where a pointer can hover ---------- */
@media (hover: hover) {
  html[data-view="computer"] .tabbar a:hover,
  html[data-view="computer"] a.mrow:hover,
  html[data-view="computer"] a.door:hover,
  html[data-view="computer"] .card:hover {
    border-color: var(--view-gold);
  }
}

/* ---------- forced Computer on a narrow glass: plain, never sideways ---------- */
@media (max-width: 1023.98px) {
  html[data-view="computer"] {
    --rail-w: 64px;
  }
  html[data-view="computer"] .mc #tabbar {
    padding: 16px 6px;
  }
  html[data-view="computer"] .mc #tabbar > a {
    justify-content: center;
    font-size: 0;
    gap: 0;
    padding: 10px 4px;
  }
  html[data-view="computer"] .mc #tabbar > a .tic {
    font-size: 1.25rem;
  }
  html[data-view="computer"] .mc #tabbar a.tab-cam::after {
    display: none;
  }
  html[data-view="computer"] .mc #tabbar a.tab-cam > svg:first-of-type {
    left: 50%;
    transform: translate(-50%, -50%);
  }
  html[data-view="computer"] .mc #tabbar a.tab-cam .camera-glyph {
    left: 50%;
    transform: translate(-50%, -50%);
  }
  html[data-view="computer"] #feedSection,
  html[data-view="computer"] #dmMain,
  html[data-view="computer"] body.mc:has(#profileHub) .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  html[data-view="computer"] #feedSection > .feed-side,
  html[data-view="computer"] #dmMain > #dmThread,
  html[data-view="computer"] body.mc:has(#profileHub) .wrap > * {
    grid-column: 1;
    grid-row: auto;
  }
  html[data-view="computer"] body.mc:has(#profileHub) .wrap > #profBody {
    position: static;
  }
  html[data-view="computer"] #profileHub #hubMine,
  html[data-view="computer"] #profileHub #hubWork,
  html[data-view="computer"] #profileHub #hubExplore,
  html[data-view="computer"] #profileHub #hubAccount,
  html[data-view="computer"] #profileHub #hubOffice {
    grid-template-columns: minmax(0, 1fr);
  }
}
