/* The Desk's front, remade (Chris, 3 Nov: "too many text lines at the top that I dont use ... more ergonomic and intuitive").
   The first screen answers "what do I do now?": one slim bar (Studio and the time; reload, the meeting, Plan my time, his sessions),
   an alert strip only while something is live, the three numbers as buttons, then the moves.
   - Phone (to 699 px): the numbers are tiles over a short live banner of the yacht; the page scrolls as one.
   - 700 to 999 px (an upright iPad): two lanes that scroll on their own, the numbers and the banner atop yours.
   - From 1000 px: the numbers are chips under the title, and the yacht's picture is a small window atop the right-hand lane. */

/* ── the bar ── */
.top { padding-block: 2px 10px; }
.top .top-id { display: flex; flex-direction: column; justify-content: center; min-width: 0; margin-right: auto; }
.top .top-id h1 { margin: 0; font-size: 26px; line-height: 1.1; }
.top .top-id .sub { margin: 2px 0 0; font-size: 12.5px; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .reload-top { margin-left: 0; }

/* The meeting: a camera of its own, gold while a meeting is open, a count while someone waits at the door. */
.meet-btn {
  position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, 0.04); color: var(--muted); box-shadow: none; cursor: pointer;
}
.meet-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.meet-btn:hover, .meet-btn:focus-visible { color: var(--gold); border-color: var(--gold); }
.meet-btn.on { color: #1b1714; background: var(--gold); border-color: var(--gold); }
.meet-btn.on::after { content: ''; position: absolute; right: 1px; top: 1px; width: 8px; height: 8px; border-radius: 50%; background: #6fbf73; box-shadow: 0 0 0 2px var(--bg); }
.meet-badge {
  position: absolute; right: -5px; top: -5px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px;
  background: var(--warn, #d9822b); color: #fff; font: 700 11px/18px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--bg);
}
.meet-btn.new::after { display: none; }

/* The numbers as chips: only from 1000 px (below, they sit on the banner). */
.top-nums { display: none; }

/* ── the alert strip: nothing live, no strip ── */
.alerts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.alerts:not(:has(> :not([hidden]))) { display: none; }
body.in-room .alerts { display: none; }
.alerts > .visit-share { flex-basis: 100%; }
.alert-line {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; margin: 0; padding: 6px 12px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); box-shadow: none;
  font: 600 13.5px/1.3 var(--font); text-align: left; cursor: pointer;
}
.alert-line.meet-now { display: flex; margin: 0; padding: 6px 12px; }
.alert-line.warn { border-color: rgba(217, 130, 43, 0.55); background: rgba(217, 130, 43, 0.1); }
.alert-line.gold, .alert-line.new { border-color: var(--gold); background: rgba(229, 175, 79, 0.1); color: var(--text); }
.alert-act { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: var(--warn, #d9822b); color: #fff; font-size: 12.5px; }
.alert-line:hover, .alert-line:focus-visible { border-color: var(--gold); }
.alerts .visitors-now { margin: 0; }

/* ── the numbers and the yacht's banner ── */
.office-hero { margin: 0 0 14px; }
.office-hero .o-hero-3d { height: 112px; }
.office-hero .hero-stats { left: 8px; right: 8px; top: auto; bottom: 8px; gap: 6px; }
.hero-stat {
  flex: 1 1 0; min-width: 0; min-height: 0; margin: 0; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 10px;
  background: rgba(8, 12, 22, 0.6); color: #fff; box-shadow: none; text-align: left; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hero-stat strong { display: block; font-size: 20px; line-height: 1.1; }
.hero-stat span { display: block; font-size: 11.5px; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-stat:hover, .hero-stat:focus-visible { border-color: var(--gold); }

/* ── today's moves: the count beside the heading, the minutes Claude worked folded under "Today" ── */
.moves-count { margin-left: 8px; color: var(--gold); font-weight: 600; letter-spacing: 0; text-transform: none; }
.moves-count:empty { display: none; }
.focus-fold { margin: -2px 0 10px; }
.focus-fold summary { width: max-content; padding: 2px 0; color: var(--muted); font-size: 13px; cursor: pointer; }
.focus-fold p { margin: 4px 0 0; }

/* A number tapped: its section shows itself once. */
#desk section.flash { animation: front-flash 1.2s ease-out; border-radius: 14px; }
@keyframes front-flash { from { box-shadow: 0 0 0 3px var(--gold); } to { box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) { #desk section.flash { animation: none; } }
html.desk-fit #desk section, html.desk-fit #desk .settings { scroll-margin-top: calc(var(--head-h, 0px) + 8px); }

/* Device bench lives in This device now (the desk's laptop takes it once that works: desk-laptop.css). */
.settings .bench-top { display: inline-block; margin: 8px 0 0; }

/* ── phone ── */
@media (max-width: 699px) {
  /* The pill at the foot never covers the last card's words. */
  body { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 88px); }
}

/* ── an upright iPad: two lanes, the pill still at the foot ── */
/* The whole width (Chris, 5 Nov, iPad upright: "it's cut off on the sides"): the page kept a phone's 640 px here, so each lane was 294 px
   and what it held ran past its edges. Now each lane is about 375 px on an iPad held upright. */
@media (min-width: 700px) and (max-width: 999px) {
  body { max-width: none; padding-left: 20px; padding-right: 20px; }
  .desk-grid { gap: 0 20px; }
}

/* An upright iPad: the Desk and Yacht pill stays at the foot, as on a phone. The header tucks away by `top`, not a transform, here: a
   transform makes the header the pill's frame, and the pill stood over the alert strip instead of at the foot of the screen. */
@media (min-width: 700px) and (max-width: 999px) {
  html.desk-fit .page-head { transform: none; top: calc(var(--tuck, 0px) * -1); will-change: auto; }
  html.desk-fit .mine-open.pinned { transform: none; }
  #desk .col-you, #desk .col-crew { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 84px + var(--spare, 0px)); }
}

/* ── from 1000 px: the numbers in the header, the picture a small window on the right ── */
@media (min-width: 1000px) {
  .top { align-items: flex-start; justify-content: flex-start; column-gap: 10px; }
  .top .top-id { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: baseline; column-gap: 12px; margin-right: 0; max-width: 40%; }
  .top .reload-top { margin-left: auto; }
  .top .plan-open, .top .mine-open, .top .meet-btn { margin-left: 0; }
  .top .meet-btn { align-self: flex-start; margin-top: 6px; }
  .top .top-id .sub { margin: 0; }
  .top { flex-wrap: wrap; row-gap: 0; }
  .top-nums:not([hidden]) { display: flex; gap: 6px; order: 9; flex-basis: 100%; margin-top: 8px; }
  .top-nums .hero-stat {
    flex: none; display: inline-flex; flex-direction: row; align-items: baseline; gap: 6px; padding: 5px 12px; border-radius: 999px;
    background: var(--panel); color: var(--text); border-color: var(--line); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .top-nums .hero-stat strong, .top-nums .hero-stat span { display: inline; }
  .top-nums .hero-stat strong { font-size: 15px; }
  .top-nums .hero-stat span { font-size: 12.5px; color: var(--muted); opacity: 1; }
  .office-hero .hero-stats { display: none; }
  .office-hero .o-hero-3d { height: 150px; }
}

/* Over Chris's Unreal desk (desk-photo.css): the strip's lines are dark glass, so the lamp and the wood never show through the words. */
html.desk-photo-on .alert-line { background: rgba(16, 14, 12, 0.84); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
html.desk-photo-on .alert-line.warn { background: rgba(48, 28, 10, 0.88); }
html.desk-photo-on .top-nums .hero-stat { background: rgba(16, 14, 12, 0.84); }
html.desk-photo-on .moves-count, html.desk-photo-on .focus-fold summary { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
