/* Workshop chrome on The Desk. Brass first; cyan is a live hairline.
   Rooms keep their own sets. Docks stay glass, not a solid black bar. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hud {
  --hud-brass: #c4a574;
  --hud-brass-hot: #e4c89a;
  --hud-live: #9ad8ff;
  --hud-accent: var(--hud-brass);
  --hud-hot: var(--hud-brass-hot);
  --hud-glow: 0 0 18px rgba(196, 165, 116, 0.22);
  --hud-line: rgba(196, 165, 116, 0.34);
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.hud-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(196, 165, 116, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 165, 116, 0.09) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 42%, black 22%, transparent 78%);
  transform: perspective(900px) rotateX(58deg) scale(1.4) translateY(18%);
  transform-origin: center 70%;
  opacity: 0.34;
}

.hud-glow {
  position: absolute;
  inset: 10% 18% auto;
  height: 40%;
  background: radial-gradient(ellipse, rgba(196, 165, 116, 0.14), transparent 70%);
  filter: blur(8px);
  opacity: 0.4;
}

.hud-corner,
.hud-tl,
.hud-tr,
.hud-bl,
.hud-br {
  position: absolute;
  width: 56px;
  height: 56px;
  border-color: var(--hud-accent);
  border-style: solid;
  opacity: 0.88;
  box-shadow: var(--hud-glow);
}

.hud-tl { top: 12px; left: 12px; border-width: 2px 0 0 2px; }
.hud-tr { top: 12px; right: 12px; border-width: 2px 2px 0 0; }
.hud-bl { bottom: 12px; left: 12px; border-width: 0 0 2px 2px; }
.hud-br { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; }

.hud-tl::after,
.hud-tr::after,
.hud-bl::after,
.hud-br::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--hud-live);
  opacity: 0.45;
}
.hud-tl::after { top: 6px; left: 6px; border-width: 1px 0 0 1px; }
.hud-tr::after { top: 6px; right: 6px; border-width: 1px 1px 0 0; }
.hud-bl::after { bottom: 6px; left: 6px; border-width: 0 0 1px 1px; }
.hud-br::after { bottom: 6px; right: 6px; border-width: 0 1px 1px 0; }

.hud-hash {
  position: absolute;
  top: 22%;
  bottom: 28%;
  width: 12px;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 10px,
      rgba(196, 165, 116, 0.42) 10px 11px,
      transparent 11px 18px,
      rgba(196, 165, 116, 0.28) 18px 19px
    );
  opacity: 0.5;
}
.hud-hash-l { left: 10px; }
.hud-hash-r { right: 10px; transform: scaleX(-1); }

.hud-scan {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  top: 12%;
  background: linear-gradient(90deg, transparent, var(--hud-brass), var(--hud-live), var(--hud-brass), transparent);
  box-shadow: 0 0 18px rgba(196, 165, 116, 0.55);
  animation: hud-scan 7.5s linear infinite;
  opacity: 0.62;
}

.hud-arc {
  position: absolute;
  left: 50%;
  bottom: 6.4rem;
  width: min(36rem, 78vw);
  height: 8rem;
  transform: translateX(-50%);
  border: 1.5px solid color-mix(in srgb, var(--hud-brass) 70%, transparent);
  border-top: 0;
  border-radius: 0 0 50% 50%;
  box-shadow:
    0 0 28px rgba(196, 165, 116, 0.22),
    inset 0 -16px 32px rgba(196, 165, 116, 0.14);
  opacity: 0.82;
}

.hud-mark,
.hud-telemetry {
  position: fixed;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  margin: 0;
  pointer-events: none;
  font-family: ui-monospace, Menlo, monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--hud-brass) 72%, var(--hud-live));
  text-shadow: 0 0 18px rgba(196, 165, 116, 0.22);
}

.hud-mark {
  top: 18px;
  font-size: 0.58rem;
  letter-spacing: 0.42em;
  opacity: 0.72;
}

.hud-telemetry {
  top: 36px;
  font-size: 0.52rem;
}

@keyframes hud-scan {
  from { top: 10%; opacity: 0; }
  8% { opacity: 0.5; }
  92% { opacity: 0.18; }
  to { top: 78%; opacity: 0; }
}

body.writing-page .hud-grid,
body.writing-page .hud-glow {
  opacity: 0.1;
}

@media (prefers-reduced-motion: reduce) {
  .hud-scan { animation: none; opacity: 0.2; }
}

.desk-inbox-cue {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(10px + 44px + 0.45rem + env(safe-area-inset-right, 0px));
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.75rem;
  font-family: var(--sans, "Figtree", sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #f3ead4;
  background:
    linear-gradient(180deg, color-mix(in srgb, #c4a574 42%, transparent), transparent 55%),
    color-mix(in srgb, #3d2418 46%, transparent);
  border: 1px solid color-mix(in srgb, #c4a574 58%, transparent);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #c4a574 45%, transparent),
    0 8px 18px color-mix(in srgb, #080604 28%, transparent);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
.desk-inbox-cue:hover,
.desk-inbox-cue:focus-visible,
.desk-inbox-cue[aria-current="page"] {
  color: #e4c89a;
  border-color: color-mix(in srgb, #c4a574 78%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #c4a574 55%, transparent);
}
.desk-inbox-cue.has-unread {
  border-color: color-mix(in srgb, #9ad8ff 55%, #c4a574);
}
.desk-inbox-cue > .lamp-hud__chip {
  position: static;
  min-width: 1.1rem;
  padding: 0.08rem 0.28rem;
  font-size: 0.62rem;
}

.desk-settings {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  z-index: 70;
}

.desk-settings-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #f3ead4;
  background:
    linear-gradient(180deg, color-mix(in srgb, #c4a574 42%, transparent), transparent 55%),
    color-mix(in srgb, #3d2418 46%, transparent);
  border: 1px solid color-mix(in srgb, #c4a574 58%, transparent);
  border-radius: 50%;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #c4a574 45%, transparent),
    0 8px 18px color-mix(in srgb, #080604 28%, transparent);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.desk-settings-mark svg {
  width: 22px;
  height: 22px;
}

.desk-settings-mark:hover,
.desk-settings.is-open .desk-settings-mark {
  color: #e4c89a;
  border-color: color-mix(in srgb, #c4a574 78%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #c4a574 55%, transparent);
}

.desk-settings-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 16.5rem;
  max-height: calc(100dvh - 5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, #c4a574 22%, transparent), transparent 40%),
    color-mix(in srgb, #1a120c 82%, transparent);
  border: 1px solid color-mix(in srgb, #c4a574 48%, transparent);
  box-shadow:
    0 16px 36px color-mix(in srgb, #080604 42%, transparent),
    inset 0 1px 0 color-mix(in srgb, #c4a574 30%, transparent);
  backdrop-filter: blur(16px);

  /* This panel is CHROME: dark glass floating above whatever room is behind
   * it. Room token blocks are written for room content, and in a light-paper
   * room (body.room--mail sets --ink #221c14 so mail cards read as paper) the
   * house-wide `body.room textarea` rule — specificity 0-1-2, which outranks
   * `.desk-bones-note textarea` at 0-1-1 — painted this panel's textarea with
   * the room's dark ink on its own dark field. Measured 1.02:1: invisible.
   *
   * Declaring the ramp locally makes the chrome carry its own lane, so every
   * control inside it is legible in every room, present and future, without
   * a specificity race. All values are existing house values. */
  --ink: #f3ead4;
  --ink-soft: color-mix(in srgb, #f3ead4 78%, #c4a574);
  --ink-faint: color-mix(in srgb, #f3ead4 58%, #1a120c);
  --surface: #1a120c;
  --card: #1a120c;
  --border: color-mix(in srgb, #c4a574 48%, transparent);
}

.desk-settings.is-open .desk-settings-menu {
  display: grid;
}

.desk-settings-menu a,
.desk-settings-menu button:not(.save) {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 0.85rem;
  font-family: var(--sans, "Figtree", sans-serif);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: #f3ead4;
  text-align: left;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}

.desk-settings-menu a:hover,
.desk-settings-menu a[aria-current="page"],
.desk-settings-menu button:not(.save):hover {
  color: #e4c89a;
  background: color-mix(in srgb, #c4a574 18%, transparent);
}

.desk-bones-note {
  display: grid;
  gap: 0.4rem;
  margin: 0.2rem 0 0;
  padding: 0.55rem 0.5rem 0.5rem;
  border-top: 1px solid color-mix(in srgb, #c4a574 32%, transparent);
}
.desk-bones-label {
  margin: 0;
  font-family: var(--sans, "Figtree", sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, #f3ead4 78%, #c4a574);
}
.desk-bones-note textarea {
  width: 100%;
  min-height: 4.4rem;
  padding: 0.55rem 0.65rem;
  font-family: var(--serif, Georgia, serif);
  font-size: 0.95rem;
  color: #f3ead4;
  background: color-mix(in srgb, #1a120c 55%, transparent);
  border: 1px solid color-mix(in srgb, #c4a574 42%, transparent);
  border-radius: 8px;
  resize: vertical;
}
.desk-bones-note .save {
  width: auto;
  min-width: 8.5rem;
  min-height: 44px;
  margin: 0;
  padding: 0 1.1rem;
  font-family: var(--sans, "Figtree", sans-serif);
  background:
    linear-gradient(180deg, color-mix(in srgb, #c4a574 28%, transparent), transparent 42%),
    color-mix(in srgb, #8c6a3a 58%, transparent);
  border: 1px solid color-mix(in srgb, #c4a574 55%, transparent);
  color: #fff8ee;
  cursor: pointer;
}

.note-backdrop {
  position: fixed;
  inset: 0;
  z-index: 68;
  background: color-mix(in srgb, #100c0a 42%, transparent);
}
.note-backdrop.hidden,
.note-backdrop[hidden] {
  display: none !important;
}

@media (max-width: 49.99rem) {
  .hud-bl,
  .hud-br,
  .hud-arc {
    display: none;
  }
}

/* Lamp HUD — glass tiles around the hanging lamp, every room. */
body.has-lamp-hud {
  --lamp-cord: clamp(2.35rem, 7vh, 3.35rem);
  --lamp-clear: calc(var(--lamp-cord) + 8.6rem);
  --lamp-col: 3.4rem;
  --bg-chrome: #020a168c;
  --bg-panel: #145aa014;
  --bg-elevated: #08284859;
  --accent: #9ad8ff;
  --accent-hot: #dff4ff;
  --hud-glow: 0 0 24px #5abeff59;
  --text: #e8f6ff;
  --line: #9ad8ff47;
  --font-display: "Rajdhani", "Helvetica Neue", sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, monospace;
  --un-radius: 2px;
}
body.has-lamp-hud .hud-mark,
body.has-lamp-hud .hud-telemetry,
body.has-lamp-hud .hud-scan,
body.has-lamp-hud .hud-arc,
body.has-lamp-hud .hud-bl,
body.has-lamp-hud .hud-br,
body.has-lamp-hud .hud-hash,
body.has-lamp-hud .hud-glow {
  display: none;
}
body.has-lamp-hud .hud-grid {
  opacity: 0.1;
}
body.has-lamp-hud .nav--site {
  display: none;
}
body.has-lamp-hud .set-lamp-pool {
  opacity: 0.18;
}
body.has-lamp-hud .set-lamp i {
  box-shadow: 0 8px 18px color-mix(in srgb, var(--house-brass) 28%, transparent);
}

body.chess-page .hud {
  --hud-accent: var(--hud-brass);
  --hud-hot: var(--hud-brass-hot);
  --hud-live: var(--hud-brass);
  --hud-glow: 0 0 18px rgba(196, 165, 116, 0.22);
  --hud-line: rgba(196, 165, 116, 0.34);
}
body.has-lamp-hud.chess-page .hud-scan,
body.has-lamp-hud.chess-page .hud-glow,
body.has-lamp-hud.chess-page .hud-mark,
body.has-lamp-hud.chess-page .hud-telemetry,
body.has-lamp-hud.chess-page .hud-hash {
  display: none;
}

.lamp-hud {
  --hud-gap: 0.22rem;
  --hud-glass: color-mix(in srgb, var(--house-wood, #3d2418) 7%, transparent);
  --hud-glass-top: color-mix(in srgb, #c4a574 6%, transparent);
  --rooms-pad: 0.55rem;
  position: fixed;
  z-index: 6;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: calc(0.22rem + env(safe-area-inset-top, 0px)) 0.2rem 0;
  overflow: visible;
  pointer-events: none;
}
.lamp-hud__desk,
.lamp-hud__phone {
  display: grid;
  width: 100%;
  align-items: stretch;
  column-gap: 0;
  pointer-events: none;
}
.lamp-hud__desk {
  grid-template-columns: max-content minmax(0, 1fr) var(--lamp-col) minmax(0, 1fr) max-content;
}
.lamp-hud__phone { display: none; }
.lamp-hud__gap {
  min-width: 0;
  pointer-events: none;
}
.lamp-hud__outer {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: var(--hud-gap);
  pointer-events: auto;
  width: max-content;
  min-width: 6.6rem;
  max-width: 7.8rem;
}
.lamp-hud__rooms {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: var(--hud-gap);
  pointer-events: auto;
  justify-items: stretch;
}
.lamp-hud__rooms--left { padding-right: var(--rooms-pad); }
.lamp-hud__rooms--right { padding-left: var(--rooms-pad); }
.lamp-hud__tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  appearance: none;
  padding: 0.32rem 0.7rem 0.38rem;
  font-family: "Figtree", var(--sans, sans-serif);
  text-align: left;
  text-decoration: none;
  color: #f3ead4;
  text-shadow: none;
  background:
    linear-gradient(180deg, var(--hud-glass-top), transparent 52%),
    var(--hud-glass);
  border: 1px solid color-mix(in srgb, #c4a574 32%, transparent);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent);
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.lamp-hud__kicker,
.lamp-hud__mini {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, #f3ead4 82%, #c4a574);
}
.lamp-hud__status,
.lamp-hud__name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #fff8ee;
}
.lamp-hud__tile--solo {
  align-items: center;
  justify-content: center;
}
.lamp-hud__tile--solo .lamp-hud__name {
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}
.lamp-hud__tile .lamp-hud__mini { display: none; }
.lamp-hud__tile--now,
.lamp-hud__tile--warm {
  background:
    linear-gradient(180deg, color-mix(in srgb, #c45a32 9%, transparent), transparent 58%),
    var(--hud-glass);
}
.lamp-hud__tile--deep {
  background:
    linear-gradient(180deg, color-mix(in srgb, #2a1c16 10%, transparent), transparent 58%),
    var(--hud-glass);
}
.lamp-hud__tile--chess {
  background:
    linear-gradient(180deg, color-mix(in srgb, #2a1c16 10%, transparent), transparent 58%),
    var(--hud-glass);
}
.lamp-hud__tile.is-current {
  border-color: color-mix(in srgb, #c4a574 62%, transparent);
}
.lamp-hud__tile:hover,
.lamp-hud__tile:focus-visible {
  border-color: color-mix(in srgb, #c4a574 70%, transparent);
}
.lamp-hud__tile:focus-visible {
  outline: 2px solid color-mix(in srgb, #c4a574 80%, transparent);
  outline-offset: 2px;
}
.lamp-hud__tile.has-unread {
  padding-right: 1.7rem;
  border-color: color-mix(in srgb, #c4a574 58%, #9ad8ff);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent),
    inset 0 0 0 1px color-mix(in srgb, #9ad8ff 28%, transparent);
}
.lamp-hud__chip {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 1.2rem;
  min-height: 1.15rem;
  padding: 0.08rem 0.28rem;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  color: color-mix(in srgb, #e4c89a 70%, #9ad8ff);
  background:
    linear-gradient(180deg, color-mix(in srgb, #c4a574 22%, transparent), transparent 58%),
    color-mix(in srgb, var(--house-wood, #3d2418) 28%, transparent);
  border: 1px solid color-mix(in srgb, #c4a574 62%, transparent);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
  pointer-events: none;
}
.lamp-hud__chip::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 5px;
  height: 5px;
  border: 1px solid color-mix(in srgb, #9ad8ff 55%, transparent);
  border-width: 1px 0 0 1px;
}
.lamp-hud__tile > .lamp-hud__chip {
  position: absolute;
  top: 0.28rem;
  right: 0.32rem;
}
.nav--site a[href="/inbox.html"] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav--site a[href="/inbox.html"] > .lamp-hud__chip {
  flex: none;
}
.mail-row.is-unread {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.55rem;
}
.mail-row.is-unread .mail-from,
.mail-row.is-unread .mail-subject {
  grid-column: 1;
}
.mail-row.is-unread .lamp-hud__chip {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  letter-spacing: 0.16em;
}
@media (prefers-reduced-motion: reduce) {
  .lamp-hud__chip { box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent); }
}

.lamp-hud-bar {
  display: none !important;
}

body.has-lamp-hud .desk-inbox-cue {
  top: calc(var(--hud-band) + 0.2rem);
  right: calc(max(0.55rem, env(safe-area-inset-right, 0px)) + 44px + 0.45rem);
  z-index: 90;
}
body.has-lamp-hud .desk-settings {
  top: var(--hud-band);
  left: calc(0.2rem + env(safe-area-inset-left, 0px));
  right: auto;
  bottom: auto;
  z-index: 90;
}
body.has-lamp-hud .desk-settings-menu {
  top: 0;
  left: calc(100% + 6px);
  right: auto;
  bottom: auto;
}

body.has-lamp-hud {
  --hud-band: calc(7.85rem + env(safe-area-inset-top, 0px));
}
body.has-lamp-hud .side-shell,
body.has-lamp-hud .side-shell--right {
  z-index: 80;
  top: var(--hud-band);
  bottom: 0.35rem;
  width: auto;
  overflow: visible;
}
body.has-lamp-hud .side-shell {
  left: 0;
  right: auto;
}
body.has-lamp-hud .side-shell--right {
  left: auto;
  right: 0;
}
body.has-lamp-hud .side-drawer,
body.has-lamp-hud.room .side-drawer {
  pointer-events: auto;
  width: min(22.5rem, calc(100vw - 3.2rem));
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, #c4a574 8%, transparent), transparent 48%),
    color-mix(in srgb, var(--house-wood, #3d2418) 10%, transparent) !important;
  border: 1px solid color-mix(in srgb, #c4a574 38%, transparent) !important;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent) !important;
  backdrop-filter: blur(10px) saturate(1.05);
}
body.has-lamp-hud #todo-panel.side-drawer {
  width: min(30rem, calc(100vw - 2.4rem));
}
body.has-lamp-hud.room .side-drawer::before {
  opacity: 0.28;
}
body.has-lamp-hud .side-drawer .mail-scroll,
body.has-lamp-hud .now-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.jarvis-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: color-mix(in srgb, #04101c 18%, transparent);
  pointer-events: auto;
}
.jarvis-backdrop.hidden,
.jarvis-backdrop[hidden] {
  display: none !important;
}
@media (min-width: 50rem) {
  body.has-lamp-hud .lamp-hud__outer { display: none; }
  body.has-lamp-hud .lamp-hud__desk {
    grid-template-columns: minmax(0, 1fr) var(--lamp-col) minmax(0, 1fr);
  }
  body.has-lamp-hud .side-docks,
  body.has-lamp-hud #side-docks,
  body.has-lamp-hud #tools-docks {
    display: none !important;
    pointer-events: none;
  }
  body.has-lamp-hud #side-docks {
    padding-top: 3.15rem;
  }
  body.has-lamp-hud .side-launch {
    background:
      linear-gradient(180deg, color-mix(in srgb, #c4a574 12%, transparent), transparent 52%),
      color-mix(in srgb, var(--house-wood, #3d2418) 18%, transparent);
    border: 1px solid color-mix(in srgb, #c4a574 40%, transparent);
    box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent);
    backdrop-filter: blur(8px);
  }
  body.has-lamp-hud .side-drawer,
  body.has-lamp-hud .side-shell--right .side-drawer,
  body.has-lamp-hud.room .side-drawer {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: min(22.5rem, calc(100vw - 3.2rem));
    height: auto;
    max-height: 100%;
    max-width: none;
    z-index: 80;
  }
  body.has-lamp-hud #todo-panel.side-drawer {
    width: min(30rem, calc(100vw - 2.4rem));
  }
}
body.has-lamp-hud .now-drawer-body {
  display: block;
  padding: 0.9rem 1rem 1.1rem;
}
body.has-lamp-hud .jarvis-clock {
  margin: 0 0 0.85rem;
  font-family: "Figtree", var(--sans, sans-serif);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, #f3ead4 70%, #c4a574);
  text-shadow: none;
}
body.has-lamp-hud .jarvis-block {
  margin: 0 0 0.85rem;
}
body.has-lamp-hud .jarvis-block p {
  margin: 0;
  font-family: var(--serif, Georgia, serif);
  font-size: 1.08rem;
  line-height: 1.35;
}
body.desk-page .todo-item {
  display: grid;
  grid-template-columns: 44px 44px minmax(0, 1fr) auto;
  gap: 0.45rem 0.55rem;
  align-items: start;
  padding: 0.55rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--house-brass) 28%, transparent);
}
body.desk-page .todo-item:last-child { border-bottom: 0; }
body.desk-page .todo-item.is-done { opacity: 0.55; }
body.desk-page .todo-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  accent-color: var(--house-brass, #c4a574);
}
body.desk-page .todo-check {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
}
body.desk-page .todo-main {
  min-width: 0;
}
body.desk-page .todo-item textarea[data-field="text"] {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  field-sizing: content;
  padding: 0.55rem 0.7rem;
  font-family: var(--serif, Georgia, serif);
  font-size: 1.02rem;
  line-height: 1.45;
  color: inherit;
  background: color-mix(in srgb, var(--house-wood, #3d2418) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--house-brass) 36%, transparent);
  border-radius: 8px;
  resize: vertical;
}
body.desk-page .todo-item .todo-del {
  min-height: 44px;
  padding: 0 0.2rem;
}
body.has-lamp-hud .save {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--house-brass) 28%, transparent), transparent 42%),
    color-mix(in srgb, var(--house-brass-deep) 58%, transparent);
}

body.desk-page .wrap {
  width: min(var(--page-max), calc(100vw - 1.5rem));
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}
@media (min-width: 50rem) {
  body.has-lamp-hud {
    --rail-gutter: calc(var(--rail-width, 4rem) + 1.15rem);
    --drawer-gutter: min(24.2rem, calc(22.5rem + 1.5rem));
  }
  body.has-lamp-hud.has-todo-open {
    --drawer-gutter: min(32rem, calc(30rem + 1.5rem));
  }
  body.has-lamp-hud .wrap,
  body.has-lamp-hud.desk-page .wrap {
    width: 100%;
    padding-left: var(--rail-gutter);
    padding-right: var(--rail-gutter);
  }
  body.has-lamp-hud.has-now-open .wrap,
  body.has-lamp-hud.has-now-open.desk-page .wrap {
    padding-left: var(--drawer-gutter);
  }
  body.has-lamp-hud.has-todo-open .wrap,
  body.has-lamp-hud.has-sched-open .wrap,
  body.has-lamp-hud.has-tom-open .wrap,
  body.has-lamp-hud.has-todo-open.desk-page .wrap,
  body.has-lamp-hud.has-sched-open.desk-page .wrap,
  body.has-lamp-hud.has-tom-open.desk-page .wrap {
    padding-right: var(--drawer-gutter);
  }
}
body.desk-page .desk-main {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}
body.desk-page .desk-cal-card,
body.desk-page .desk-craig-card,
body.desk-page #running-card {
  min-width: 0;
}
body.desk-page .desk-craig-card {
  padding: 0.85rem 1rem 0.95rem;
}
body.desk-page .craig-lines {
  display: grid;
  gap: 0.45rem;
}
body.desk-page .craig-line {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  min-height: 1.35rem;
}
body.desk-page .craig-kicker {
  font-family: "Figtree", var(--sans, sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, #f3ead4 62%, #c4a574);
}
body.desk-page .craig-value {
  margin: 0;
  min-height: 1.2em;
  font-family: var(--serif, Georgia, serif);
  font-size: 1.02rem;
  line-height: 1.35;
}
body.desk-page .desk-month-day {
  min-height: 5.6rem;
}
body.desk-page .desk-month-pad { min-height: 0; }
@media (min-width: 50rem) {
  body.desk-page .desk-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.15rem;
  }
  body.desk-page .desk-cal-card,
  body.desk-page #running-card {
    min-height: 0;
  }
  body.desk-page .desk-main > #desk-error,
  body.desk-page .desk-main > #desk {
    grid-column: 1 / -1;
  }
  body.desk-page .desk-cal-body { display: none !important; }
}

@media (max-width: 39.99rem) {
  body.has-lamp-hud {
    --lamp-col: 3.5rem;
    --lamp-clear: calc(var(--lamp-cord) + 11.2rem);
  }
  .lamp-hud {
    --hud-gap: 0.14rem;
    --rooms-pad: 0.22rem;
    padding-left: 0.08rem;
    padding-right: 0.08rem;
  }
  .lamp-hud__desk { display: none; }
  .lamp-hud__phone {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) var(--lamp-col) minmax(0, 1fr);
    column-gap: 0;
  }
  .lamp-hud__rooms {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .lamp-hud__outer { min-width: 0; max-width: none; }
  .lamp-hud__tile {
    min-height: 3.55rem;
    padding: 0.28rem 0.42rem;
    border-radius: 9px;
  }
  .lamp-hud__kicker { font-size: 0.48rem; }
  .lamp-hud__status,
  .lamp-hud__name {
    font-size: 0.74rem;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: clip;
  }
  .lamp-hud-bar {
    display: none !important;
    grid-template-columns: 2.8rem minmax(0, 1.7fr) 1fr 1fr 1fr;
    position: fixed;
    z-index: 8;
    left: 0;
    right: 0;
    bottom: 0;
    gap: 0.22rem;
    padding: 0.32rem 0.28rem calc(0.32rem + env(safe-area-inset-bottom, 0px));
    pointer-events: auto;
    background:
      linear-gradient(180deg, color-mix(in srgb, #c4a574 6%, transparent), transparent 42%),
      color-mix(in srgb, var(--house-wood, #3d2418) 8%, transparent);
    border-top: 1px solid color-mix(in srgb, var(--house-brass, #c4a574) 38%, transparent);
    backdrop-filter: blur(12px);
  }
  .lamp-hud-bar .lamp-hud__tile {
    align-items: center;
    justify-content: center;
    min-height: 3.7rem;
    padding: 0.32rem 0.28rem;
  }
  .lamp-hud-bar .lamp-hud__kicker,
  .lamp-hud-bar .lamp-hud__status { display: none; }
  .lamp-hud-bar .lamp-hud__name {
    font-size: 0.72rem;
    font-weight: 800;
  }
  .lamp-hud-bar .lamp-hud__tile:has(.lamp-hud__mini) .lamp-hud__name { display: none; }
  .lamp-hud-bar .lamp-hud__tile .lamp-hud__mini {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #fff8ee;
  }
  .lamp-hud-bar [data-hud-key="now"] {
    align-items: flex-start;
    justify-content: center;
    text-align: left;
  }
  .lamp-hud-bar [data-hud-key="now"] .lamp-hud__kicker,
  .lamp-hud-bar [data-hud-key="now"] .lamp-hud__status {
    display: block;
    white-space: normal;
  }
  .lamp-hud-bar [data-hud-key="now"].lamp-hud__tile--solo .lamp-hud__name {
    display: block;
  }
  .lamp-hud-bar [data-hud-key="now"]:not(.lamp-hud__tile--solo) .lamp-hud__name {
    display: none;
  }
  body.has-lamp-hud .desk-inbox-cue {
    top: calc(var(--hud-band) + 0.2rem);
    right: calc(max(0.55rem, env(safe-area-inset-right, 0px)) + 44px + 0.45rem);
    z-index: 90;
  }
  body.has-lamp-hud .desk-settings {
    top: calc(10px + env(safe-area-inset-top, 0px));
    left: calc(10px + env(safe-area-inset-left, 0px));
    right: auto;
    bottom: auto;
    z-index: 90;
  }
  body.has-lamp-hud .desk-settings-menu {
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    bottom: auto;
  }
  .lamp-hud-bar__gap { display: none; }
  .lamp-hud-bar__gear { min-width: 0; }
}
@media (min-width: 40rem) {
  body.has-lamp-hud {
    --lamp-col: 6.2rem;
    --lamp-clear: calc(var(--lamp-cord) + 9.6rem);
  }
  .lamp-hud {
    --hud-gap: 0.28rem;
    --rooms-pad: 0.95rem;
    padding-left: 0.28rem;
    padding-right: 0.28rem;
  }
  .lamp-hud__outer {
    min-width: 6.8rem;
    max-width: 8.2rem;
  }
  .lamp-hud__tile {
    min-height: 3.05rem;
    padding: 0.38rem 0.78rem 0.42rem;
  }
  .lamp-hud__status,
  .lamp-hud__name { font-size: 1rem; }
}
@media (min-width: 50rem) {
  body.has-lamp-hud { --lamp-col: 6.8rem; }
  .lamp-hud {
    --rooms-pad: 1.2rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
  .lamp-hud__outer {
    min-width: 7rem;
    max-width: 8.4rem;
  }
  .lamp-hud__tile { min-height: 3.35rem; }
  .lamp-hud__kicker { font-size: 0.62rem; }
  .lamp-hud__status,
  .lamp-hud__name { font-size: 1.08rem; }
}
@media (min-width: 64rem) {
  body.has-lamp-hud { --lamp-col: 7.4rem; }
  .lamp-hud {
    --rooms-pad: 1.55rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }
  .lamp-hud__outer {
    min-width: 7.2rem;
    max-width: 8.6rem;
  }
  .lamp-hud__status,
  .lamp-hud__name { font-size: 1.15rem; }
}
@media (min-width: 90rem) {
  body.has-lamp-hud { --lamp-col: 8rem; }
  .lamp-hud { --rooms-pad: 1.85rem; }
  .lamp-hud__outer {
    min-width: 7.4rem;
    max-width: 8.8rem;
  }
}
.lamp-hud__tile.has-unread {
  padding-right: 1.7rem;
}
@media (max-width: 49.99rem) {
  body.has-lamp-hud .wrap {
    padding-bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
  }
  body.has-lamp-hud .desk-chrome {
    height: 0;
    overflow: visible;
    pointer-events: none;
  }
  body.has-lamp-hud .side-docks,
  body.has-lamp-hud #side-docks,
  body.has-lamp-hud #tools-docks {
    display: none !important;
    pointer-events: none;
  }
  body.has-lamp-hud #mail-docks,
  body.has-lamp-hud #inbox-launch,
  body.has-lamp-hud #mail-launch,
  body.has-lamp-hud #journal-launch,
  body.has-lamp-hud #run-launch {
    display: none !important;
  }
  body.has-lamp-hud .side-drawer,
  body.has-lamp-hud .side-shell--right .side-drawer {
    position: fixed;
    top: var(--hud-band);
    bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    z-index: 80;
  }
  body.has-lamp-hud #todo-panel.side-drawer {
    width: 100%;
    max-width: none;
  }
}
