/* Site Builder — the builder update (public/updates.js)
   The panel a triple ⌘ opens (say what should change, and the queue), the
   sheet a screenshot is marked up on, the bar that says an update is about to
   go out, the black screen while it does, and the note afterwards that says
   what changed. Same daylight glass as app.css — white glass on medium grey,
   charcoal ink, maroon accent, every control on the press system — except the
   black screen, the one dark surface: pure black, white light, the slash. */

.upd-kbd, .upc kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  font: 600 11.5px var(--sans); color: var(--ink); background: rgba(255, 255, 255, .85);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; vertical-align: 1px;
}
.upd-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: stage-spin .7s linear infinite; flex-shrink: 0; }
.upd-link { all: unset; cursor: pointer; color: var(--accent-deep); font-weight: 600; font-size: 12.5px; border-radius: 4px; }
.upd-link:hover { text-decoration: underline; }
.upd-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.upd-link.quiet { color: var(--muted); font-weight: 500; }
.upd-link.quiet:hover { color: var(--ink); }
@keyframes upd-pulse { 50% { opacity: .3; transform: scale(.7); } }

/* ===================================================================
   The panel (⌘ × 3)
   =================================================================== */
.upc {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  /* --upc-w / --upc-h: the size someone dragged it to (updates.js) */
  width: min(var(--upc-w, 448px), calc(100vw - 24px));
  max-height: min(780px, calc(100vh - 44px));
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 22px 60px rgba(26, 26, 26, .24), 0 4px 30px rgba(123, 30, 46, .16), inset 0 1px 0 rgba(255, 255, 255, .9);
  opacity: 0; transform: translateY(18px) scale(.965); transform-origin: bottom right;
  transition: opacity .24s var(--ease-out), transform .46s var(--ease-spring);
}
.upc.open { opacity: 1; transform: none; }
.upc.sized-h { height: min(var(--upc-h), calc(100vh - 44px)); max-height: calc(100vh - 44px); }
/* Resizing: it is pinned bottom-right, so it grows from its left edge, its top
   edge, or the corner between. A pill shows on each edge while the panel is
   under the cursor, maroon on the one in hand — like the chat rows' seam. */
.upc-grip { position: absolute; z-index: 3; touch-action: none; }
.upc-grip[data-grip="x"] { left: -5px; top: 26px; bottom: 26px; width: 10px; cursor: ew-resize; }
.upc-grip[data-grip="y"] { top: -5px; left: 26px; right: 26px; height: 10px; cursor: ns-resize; }
.upc-grip[data-grip="xy"] { left: -5px; top: -5px; width: 26px; height: 26px; cursor: nwse-resize; }
.upc-grip::after {
  content: ''; position: absolute; left: 50%; top: 50%; border-radius: 2px;
  background: var(--line); opacity: 0; transform: translate(-50%, -50%);
  transition: opacity .16s var(--ease-out), background .16s var(--ease-out), border-color .16s var(--ease-out);
}
.upc-grip[data-grip="x"]::after { width: 4px; height: 32px; }
.upc-grip[data-grip="y"]::after { width: 32px; height: 4px; }
/* the corner: a short arc along the panel's own rounded corner */
.upc-grip[data-grip="xy"]::after {
  left: 5px; top: 5px; width: 18px; height: 18px; box-sizing: border-box; transform: none; background: none;
  border: 2.5px solid var(--line); border-right: 0; border-bottom: 0; border-radius: 22px 0 0 0;
}
.upc:hover .upc-grip::after { opacity: 1; }
.upc-grip:not([data-grip="xy"]):hover::after, .upc-grip:not([data-grip="xy"]).dragging::after { background: rgba(123, 30, 46, .7); }
.upc-grip[data-grip="xy"]:hover::after, .upc-grip[data-grip="xy"].dragging::after { border-color: rgba(123, 30, 46, .7); }
.upc-grip.dragging::after { opacity: 1; }
body.upc-resizing { user-select: none; }
body.upc-resizing iframe { pointer-events: none; }
@media (hover: none), (max-width: 720px) { .upc-grip { display: none; } }
.upc.behind { opacity: 0; pointer-events: none; transform: translateY(10px) scale(.98); }
/* The house dropdowns (app.js, .dd-menu) sit at z-index 90 — the panel's model
   and effort pickers have to open above the panel itself. Menus are added to
   the body after the panel, so the sibling selector always reaches them. */
.upc.open ~ .dd-menu { z-index: 960; }
.upd-capturing .upc, .upd-capturing .upd-mk, .upd-capturing .upd-live { visibility: hidden !important; transition: none !important; }

.upc-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 14px 10px 18px; }
.upc-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0;
  background: #0B0B0B; box-shadow: 0 4px 14px rgba(20, 20, 20, .28), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.upc-mark .upd-slash { width: 13px; height: 20px; fill: #fff; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .7)); }
.upc-titles { flex: 1; min-width: 0; padding-top: 1px; }
.upc-titles h2 { margin: 0; font: 800 16.5px/1.25 var(--display); letter-spacing: -.01em; color: #111111; }
.upc-titles p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.upc-x { margin: -2px -2px 0 0; }
.upc-min { margin-right: -8px; }

.upc-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 18px 14px; display: flex; flex-direction: column; gap: 16px; }
.upc-label, .upc-sec-head h3, .upc-kicker {
  font: 700 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.upc-compose { display: flex; flex-direction: column; gap: 8px; }
.upc textarea { resize: vertical; font-size: 14px; line-height: 1.5; }
#upd-rep-msg { min-height: 84px; max-height: 34vh; }
.upc-compose-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.upc-compose-head { display: flex; align-items: baseline; gap: 10px; }
.upd-rep-where { flex: 1; min-width: 0; text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the model and effort Claude works on — small pills, beside each send */
.upc-pick { flex: 1; min-width: 0; display: flex; gap: 6px; }
.upc-pick select { width: auto; min-width: 0; max-width: 50%; padding: 5px 10px; font-size: 12.5px; border-radius: 999px; text-overflow: ellipsis; }
.upc-pick select:disabled { opacity: .5; cursor: default; }
.upc-compose-foot .btn.primary { white-space: nowrap; }
.upc-compose-foot .btn.primary kbd { margin-left: 4px; background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .35); }
.upd-rep-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); animation: view-in .3s var(--ease-out); }
.upd-rep-note:empty { display: none; }
.upd-rep-note.error { color: var(--danger-ink); }

/* the screenshot row (the markup sheet's way in) */
.upd-rep-shot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 10px; border-radius: 14px; border: 1px dashed rgba(123, 30, 46, .3); background: rgba(123, 30, 46, .035); }
.upd-rep-shot .btn { padding: 5px 12px; font-size: 12.5px; }
.upd-rep-shot.has-shot { border-style: solid; border-color: var(--line); background: rgba(255, 255, 255, .7); align-items: stretch; flex-wrap: nowrap; }
.upd-rep-or { font-size: 12.5px; color: var(--muted); }
.upd-rep-thumb { all: unset; cursor: zoom-in; width: 112px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; flex-shrink: 0; transition: transform .32s var(--ease-spring), box-shadow .32s var(--ease-out); }
.upd-rep-thumb:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.upd-rep-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.upd-rep-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.upd-rep-shot-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; font-size: 12.5px; color: var(--muted); }
.upd-rep-shot-meta b { color: var(--ink); font-size: 13px; }
.upd-rep-shot-acts { display: flex; gap: 6px; margin-top: auto; }
.upd-rep-shot-acts .btn { padding: 5px 11px; font-size: 12.5px; }

/* photos and media attached to the note, or to a message — chips, then the paperclip */
.upd-files { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.upd-files:empty { display: none; }
.upd-rep-files .upd-attach { padding: 5px 12px; font-size: 12.5px; }
.upd-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 3px 4px 3px 3px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .8); font-size: 12px; color: var(--ink); animation: view-in .26s var(--ease-out); }
.upd-chip img, .upd-chip video, .upd-chip i { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; flex-shrink: 0; background: rgba(123, 30, 46, .06); display: grid; place-items: center; color: var(--accent-deep); }
.upd-chip i svg { width: 16px; height: 16px; }
.upd-chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-chip-n { flex-shrink: 0; padding: 1px 6px; border-radius: 999px; background: rgba(24, 33, 66, .06); color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.upd-chip-x { all: unset; cursor: pointer; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--muted); flex-shrink: 0; }
.upd-chip-x:hover { color: var(--ink); background: rgba(24, 33, 66, .07); }
.upd-chip-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.upd-chip-x svg { width: 12px; height: 12px; }
.upc-reply .upd-files { flex: 1 1 100%; }
.upc-reply .upd-files:empty { display: none; }
.upc-clip { flex-shrink: 0; }

/* the rollout, as the panel sees it */
.upc-status {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap; padding: 11px 12px; border-radius: 16px;
  border: 1px solid rgba(123, 30, 46, .3); background: rgba(123, 30, 46, .06);
  animation: view-in .34s var(--ease-out);
}
.upc-status.live { background: #0B0B0B; border-color: transparent; color: #fff; }
.upc-status.live .upc-st-text b { color: #fff; }
.upc-status.live .upc-st-text p { color: rgba(255, 255, 255, .7); }
.upc-status.hold { border-style: dashed; background: rgba(255, 255, 255, .6); }
.upc-status.warn { border-color: var(--danger-line); background: var(--danger-bg); }
.upc-st-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0; background: var(--cta-grad); color: #fff; box-shadow: var(--bloom); }
.upc-st-ico svg { width: 15px; height: 15px; }
.upc-st-ico .upd-spin { width: 13px; height: 13px; }
.upc-status.live .upc-st-ico { background: rgba(255, 255, 255, .12); box-shadow: none; }
.upc-status.warn .upc-st-ico { background: var(--danger); box-shadow: 0 4px 14px rgba(192, 58, 49, .3); }
.upc-st-text { flex: 1; min-width: 200px; }
.upc-st-text b { display: block; font-size: 13.5px; color: var(--ink); line-height: 1.35; }
.upc-st-text p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.upc-status .btn { padding: 6px 12px; font-size: 12.5px; }
.upc-status .btn.confirm, .upd-gate-acts .btn.confirm { background: var(--danger); border-color: transparent; color: #fff; }

/* the queue */
.upc-sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.upc-sec-head h3 { margin: 0; }
.upc-count:not(:empty) {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: rgba(26, 26, 26, .08); font: 700 10.5px var(--sans); color: var(--muted);
}
.upc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.upc-empty { margin: 0; padding: 14px 14px; border-radius: 14px; border: 1px dashed var(--line); font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
.upc-item {
  position: relative; border-radius: 14px; border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 1px 3px rgba(26, 26, 26, .05);
  transition: transform .5s var(--ease-spring), opacity .3s var(--ease-out), background .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .3s var(--ease-out), height .38s var(--ease-out), margin .38s var(--ease-out);
}
.upc-item:hover { background: #FFFFFF; border-color: var(--line); }
.upc-item.open { background: #FFFFFF; border-color: var(--line); box-shadow: 0 6px 20px rgba(26, 26, 26, .08); }
.upc-item.entering { opacity: 0; transform: translateY(10px) scale(.97); }
.upc-item.leaving { overflow: hidden; opacity: 0; transform: scale(.97); margin-bottom: -6px; pointer-events: none; }
.upc-item.fresh { animation: upc-fresh 2.2s var(--ease-out); }
@keyframes upc-fresh {
  0% { box-shadow: 0 0 0 0 rgba(123, 30, 46, 0); border-color: rgba(123, 30, 46, .55); }
  18% { box-shadow: 0 0 0 4px rgba(123, 30, 46, .14), 0 0 26px rgba(245, 197, 24, .38); border-color: rgba(123, 30, 46, .55); }
  100% { box-shadow: 0 1px 3px rgba(26, 26, 26, .05); }
}
.upc-item.s-attention { border-color: rgba(245, 197, 24, .75); background: rgba(255, 252, 238, .92); }
.upc-item.s-held { border-color: var(--danger-line); }
.upc-row {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%;
  display: grid; grid-template-columns: 26px 1fr 18px; gap: 10px; align-items: start; padding: 8px 10px;
  border-radius: 14px;
}
.upc-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Retry on the row itself, for a change that went wrong — the open row has its own */
.upc-item.has-quick:not(.open) .upc-row { padding-right: 96px; }
.upc-item.has-quick2:not(.open) .upc-row { padding-right: 170px; }
.upc-quicks { position: absolute; top: 8px; right: 35px; display: flex; gap: 6px; }
.upc-quick {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--line); background: #FFFFFF; color: var(--ink); cursor: pointer;
  font: 600 12px var(--sans); white-space: nowrap; box-shadow: 0 1px 3px rgba(26, 26, 26, .06);
  transition: transform .32s var(--ease-spring), background .2s var(--ease-out), border-color .2s var(--ease-out), opacity .2s var(--ease-out);
}
.upc-quick svg { width: 13px; height: 13px; }
.upc-quick:hover { border-color: var(--ink); }
.upc-quick:active { transform: scale(.95); transition-duration: .06s; }
.upc-quick:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.upc-quick.loading { opacity: .55; pointer-events: none; }
.upc-item.open .upc-quicks { display: none; }
.upc-row:active .upc-badge { transform: scale(.9); transition-duration: .06s; }
.upc-badge {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font: 800 13px var(--sans); transition: transform .32s var(--ease-spring), background .3s var(--ease-out);
}
.upc-badge svg { width: 13px; height: 13px; }
.upc-badge .upd-spin { width: 13px; height: 13px; }
.upc-badge.t-busy { background: var(--cta-grad); color: #fff; box-shadow: var(--bloom); }
.upc-badge.t-wait { background: rgba(26, 26, 26, .07); color: var(--muted); }
.upc-badge.t-ok { background: var(--ok); color: #fff; box-shadow: 0 4px 14px rgba(14, 138, 95, .3); animation: nbadge-pop .6s var(--ease-spring); }
.upc-badge.t-ask { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 0 rgba(245, 197, 24, .6); animation: upc-ask 1.8s var(--ease-out) infinite; }
.upc-badge.t-held { background: var(--danger-bg); color: var(--danger-ink); border: 1px solid var(--danger-line); }
.upc-badge.t-live { background: #0B0B0B; color: #fff; }
@keyframes upc-ask { 0% { box-shadow: 0 0 0 0 rgba(245, 197, 24, .65); } 70%, 100% { box-shadow: 0 0 0 9px rgba(245, 197, 24, 0); } }
.upc-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; }
.upc-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding-top: 0; }
.upc-title { font: 600 13.5px/1.35 var(--sans); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upc-meta { font-size: 12px; color: var(--muted); }
/* the model and effort the session runs on, beside who sent it */
.upc-runon {
  display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; vertical-align: 1px;
  background: rgba(26, 26, 26, .06); font: 600 11px/18px var(--sans); color: var(--muted); white-space: nowrap;
}
.upc-item.s-attention .upc-state { color: #6F5100; font-weight: 700; }
.upc-item.s-ready .upc-state { color: var(--ok); font-weight: 600; }
.upc-live { display: flex; align-items: center; gap: 7px; min-width: 0; margin-top: 3px; font: 500 11px/1.4 var(--mono); color: var(--accent-deep); }
.upc-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; animation: upd-pulse 1.2s var(--ease-out) infinite; }
.upc-live span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.upc-live span.tick { animation: upc-tick .32s var(--ease-out); }
@keyframes upc-tick { from { opacity: 0; transform: translateY(3px); } }
.upc-chev { display: grid; place-items: center; height: 26px; color: var(--muted); transition: transform .34s var(--ease-out), color .2s var(--ease-out); }
.upc-chev svg { width: 15px; height: 15px; }
.upc-item.open .upc-chev { transform: rotate(90deg); color: var(--ink); }
/* opening a row: its height glides rather than jumping */
.upc-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .36s var(--ease-out); }
.upc-item.open .upc-more { grid-template-rows: 1fr; }
.upc-more-in { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 0 12px 0 46px; transition: padding .36s var(--ease-out); }
.upc-item.open .upc-more-in { padding-bottom: 12px; }
.upc-asked { display: flex; gap: 10px; align-items: flex-start; }
.upc-asked p { margin: 0; flex: 1; min-width: 0; max-height: 120px; overflow: auto; padding-left: 10px; border-left: 2px solid rgba(123, 30, 46, .25); font-size: 12.5px; line-height: 1.5; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.upc-shot { display: block; width: 76px; height: 50px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); flex-shrink: 0; background: #fff; transition: transform .32s var(--ease-spring), box-shadow .3s var(--ease-out); }
.upc-shot:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.upc-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.upc-att { display: flex; flex-wrap: wrap; gap: 6px; }
.upc-att-one { display: inline-flex; align-items: center; gap: 6px; max-width: 200px; padding: 3px 8px 3px 3px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--ink); text-decoration: none; transition: transform .32s var(--ease-spring), box-shadow .3s var(--ease-out); }
.upc-att-one:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.upc-att-one img, .upc-att-one i { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex-shrink: 0; display: grid; place-items: center; background: rgba(123, 30, 46, .06); color: var(--accent-deep); }
.upc-att-one i svg { width: 15px; height: 15px; }
.upc-att-one span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upc-ask { padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; color: var(--ink); background: rgba(245, 197, 24, .16); border: 1px solid rgba(245, 197, 24, .6); }
.upc-ask b { display: block; font: 700 10.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #6F5100; margin-bottom: 3px; }
.upc-ask p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; }
.upc-ask.k-error, .upc-ask.k-held { background: var(--danger-bg); border-color: var(--danger-line); }
.upc-ask.k-error b, .upc-ask.k-held b { color: var(--danger-ink); }
.upc-ask.k-stopped { background: rgba(26, 26, 26, .05); border-color: var(--line); }
.upc-ask.k-stopped b { color: var(--muted); }
.upc-fine { margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.upc-ask .upc-fine { margin-top: 6px; }
.upc-release { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(14, 138, 95, .06); border: 1px solid rgba(14, 138, 95, .24); }
.upc-release .upc-kicker { display: flex; align-items: center; gap: 5px; color: var(--ok); }
.upc-release .upc-kicker svg { width: 12px; height: 12px; }
.upc-release b { font-size: 13.5px; color: var(--ink); }
.upc-release p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
/* Claude's log — the one dark surface in the panel, a CLI's own */
.upc-log-head { display: flex; align-items: center; gap: 8px; margin-bottom: -4px; }
.upc-livedot { display: inline-flex; align-items: center; gap: 5px; font: 700 9.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); }
.upc-livedot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: upd-pulse 1.2s var(--ease-out) infinite; }
.upc-log {
  list-style: none; margin: 0; padding: 9px 11px; max-height: 196px; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 12px; background: #0E0E0E; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 10px rgba(20, 20, 20, .18);
  font: 400 11px/1.6 var(--mono); color: rgba(255, 255, 255, .62);
  scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.upc-log li { white-space: pre-wrap; overflow-wrap: anywhere; }
.upc-log li.new { animation: upk-line .38s var(--ease-out); }
.upc-log .k-claude { color: #FFFFFF; }
.upc-log .k-user { color: var(--gold); }
.upc-log .k-ok { color: #6FDDB0; }
.upc-log .k-err { color: #FF9C93; }
.upc-log .k-note { color: rgba(255, 255, 255, .42); font-style: italic; }
.upc-reply { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.upc-reply textarea { flex: 1 1 100%; min-height: 40px; max-height: 160px; font-size: 13.5px; padding: 8px 11px; }
.upc-send {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0; flex-shrink: 0; margin-bottom: 3px;
  background: var(--cta-grad); border: none; border-radius: 50%; color: #fff; cursor: pointer; box-shadow: var(--bloom);
  transition: transform .32s var(--ease-spring), box-shadow .32s var(--ease-out), opacity .2s;
}
.upc-reply .upc-send { margin-bottom: 0; }
.upc-send svg { width: 16px; height: 16px; }
.upc-send:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(123, 30, 46, .45), 0 14px 40px rgba(245, 197, 24, .2); }
.upc-send:active { transform: scale(.9); transition-duration: .06s; }
.upc-send.loading { opacity: .6; cursor: progress; }
.upc-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.upc-acts .btn { padding: 5px 11px; font-size: 12.5px; }
.upc-acts .btn.icon { padding: 5px 7px; }
.upc-acts .btn.danger.confirm { background: var(--danger); color: #fff; border-color: transparent; }

/* notes from before the queue */
.upc-earlier { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.upc-earlier summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; font: 700 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-radius: 6px; }
.upc-earlier summary::-webkit-details-marker { display: none; }
.upc-earlier summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.upc-earlier summary svg { width: 13px; height: 13px; margin-left: auto; transition: transform .3s var(--ease-out); }
.upc-earlier[open] summary svg { transform: rotate(90deg); }
.upc-earlier-hint { margin: 8px 0; font-size: 12px; color: var(--muted); }
.upc-earlier-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.upc-earlier-list li { display: flex; align-items: center; gap: 6px; padding: 7px 6px 7px 10px; border-radius: 12px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line-soft); }
.upc-e-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.upc-e-text b { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upc-e-text span { font-size: 11.5px; color: var(--muted); }
.upc-earlier-list .btn { padding: 4px 10px; font-size: 12px; }
.upc-earlier-list .btn.icon { padding: 4px 6px; }
.upc-earlier-list .btn svg { width: 12px; height: 12px; }

/* drafts: the same rows, the words a button that opens one back into the box */
.upc-drafts-list .upc-e-text { padding: 0; border: none; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 6px; }
.upc-drafts-list .upc-e-text:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
.upc-drafts-list li.on .upc-e-text { cursor: text; }
.upc-drafts-list .btn.icon.confirm { padding: 4px 10px 4px 8px; gap: 5px; }
.upc .upc-drafts-list li { transition: background-color .16s var(--ease-out), border-color .16s var(--ease-out); }
.upc .upc-drafts-list li:hover { background: rgba(240, 238, 230, .7); }
.upc .upc-drafts-list li.on { background: var(--clay-soft); border-color: rgba(217, 119, 87, .45); }
.upc .upc-drafts-list li.fresh { animation: upc-fresh-clay 2.2s var(--ease-out); }

/* full history: who has had how many go live, then every finished update */
.upc-tally { margin: 10px 0 8px; }
.upc-tally:empty { display: none; }
.upc-tally-head { margin: 0 0 7px; font-size: 12.5px; color: var(--muted); }
.upc-tally-head b { color: var(--ink); font-weight: 700; }
.upc-tally-list { display: flex; flex-wrap: wrap; gap: 5px; }
.upc-tally-one {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 4px 0 10px;
  border-radius: 999px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .72); font: 600 12px var(--sans); color: var(--ink);
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out);
}
.upc-tally-one b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: rgba(14, 138, 95, .12); color: var(--ok); font: 700 11px var(--sans); }
.upc-tally-one:hover { border-color: var(--line); background: #FFFFFF; }
.upc-tally-one:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.upc-tally-one.mine { border-color: rgba(123, 30, 46, .3); }
.upc-tally-one.on { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.upc-tally-one.on b { background: rgba(255, 255, 255, .2); color: #FFFFFF; }
.upc-hist-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.upc-hist { border-radius: 12px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line-soft); }
.upc-hist.open { background: #FFFFFF; border-color: var(--line); }
.upc-hist-row { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: flex; align-items: center; gap: 9px; padding: 6px 6px 6px 8px; border-radius: 12px; }
.upc-hist-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.upc-hist-row .upc-chev { height: 22px; }
.upc-hist.open .upc-chev { transform: rotate(90deg); color: var(--ink); }
.upc-hist-ico { flex-shrink: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.upc-hist-ico svg { width: 11px; height: 11px; }
.upc-hist-ico.t-ok { background: rgba(14, 138, 95, .14); color: var(--ok); }
.upc-hist-ico.t-wait { background: rgba(26, 26, 26, .07); color: var(--muted); }
.upc-hist-more { display: flex; flex-direction: column; gap: 8px; padding: 2px 12px 11px 39px; }
.upc-hist-sum { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink); }
@media (max-width: 720px) { .upc-hist-more { padding-left: 12px; } }

/* GitHub, while the engine has none */
.upc-gh-form { display: flex; gap: 11px; padding: 12px; border-radius: 16px; border: 1px solid rgba(123, 30, 46, .3); background: rgba(123, 30, 46, .05); }
.upc-gh-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--cta-grad); color: #fff; flex-shrink: 0; }
.upc-gh-ico svg { width: 15px; height: 15px; }
.upc-gh-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.upc-gh-body > b { font-size: 13.5px; }
.upc-gh-body p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.upc-gh-body p b { color: var(--ink); }
.upc-gh-row { display: flex; gap: 6px; }
.upc-gh-row input { font: 13px var(--mono); padding: 7px 10px; }
.upc-gh-err { color: var(--danger-ink) !important; }
.upc-gh-err:empty { display: none; }

.upc-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px 12px 18px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.upc-foot kbd { margin-right: 2px; }
.upc-foot .upc-push-now { flex-shrink: 0; gap: 4px; }
.upc-foot .upc-push-now svg { width: 11px; height: 11px; }

/* ---- the panel wears Claude's own skin ----
   The same skin as the editor's Claude panel (app.css, "the Claude panel
   wears Claude's own skin"): warm paper, near-black ink, clay accent, pill
   controls, hairline rules — and its composer at the foot, its round send,
   its sand bubble for what you said and Claude's star beside what Claude
   says. The variables are the chat's, so the shared composer pieces
   (.comp-btn, .comp-send, .msg-av) look the same here as there. Overrides
   the daylight rules above; the black screen and the news keep theirs. */
.upc {
  --clay: #D97757;
  --clay-soft: #FBE9E2;
  --cl-ink: #141413;
  --cl-muted: #7C7A72;
  --cl-paper: #FAF9F5;
  --cl-sand: #F0EEE6;
  --cl-line: rgba(20, 20, 19, .11);
  --cl-line-soft: rgba(20, 20, 19, .07);
  --cl-card: #FFFFFF;
  --cl-rest: 0 1px 2px rgba(20, 20, 19, .05), 0 2px 8px rgba(20, 20, 19, .045);
  --cl-lift: 0 6px 18px rgba(20, 20, 19, .1), 0 2px 26px rgba(217, 119, 87, .1);
  background: var(--cl-paper); color: var(--cl-ink);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-color: var(--cl-line);
  box-shadow: 0 22px 60px rgba(20, 20, 19, .22), 0 4px 30px rgba(217, 119, 87, .12);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.upc, .upc * { scrollbar-color: rgba(20, 20, 19, .22) transparent; }
.upc :focus-visible { outline-color: var(--clay) !important; }
.upc-grip::after { background: var(--cl-line); }
.upc-grip[data-grip="xy"]::after { background: none; border-color: var(--cl-line); }
.upc-grip:not([data-grip="xy"]):hover::after, .upc-grip:not([data-grip="xy"]).dragging::after { background: var(--clay); }
.upc-grip[data-grip="xy"]:hover::after, .upc-grip[data-grip="xy"].dragging::after { border-color: var(--clay); }

/* header: Claude's star on a clay tile, the way Claude signs its messages */
.upc-head { align-items: center; padding: 13px 12px 11px 15px; border-bottom: 1px solid var(--cl-line); }
.upc-mark {
  width: 30px; height: 30px; border-radius: 9px; color: #fff;
  background: linear-gradient(160deg, #E48A6B 0%, #C96442 100%);
  box-shadow: 0 1px 2px rgba(150, 64, 36, .25), 0 3px 10px rgba(217, 119, 87, .3), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.upc-mark .cl-star { width: 15px; height: 15px; }
.upc-titles h2 { font: 700 15px/1.25 var(--sans); letter-spacing: -.005em; color: var(--cl-ink); }
.upc-titles p { font-size: 12px; color: var(--cl-muted); }
.upc .upc-x { color: var(--cl-muted); }
.upc .upc-x:hover { background: var(--cl-sand); color: var(--cl-ink); }

/* the feed — its edges fade rather than cut a row in half, as the chat's do */
.upc-scroll {
  padding: 12px 14px 14px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}
.upc .upc-label, .upc .upc-sec-head h3, .upc .upc-kicker, .upc .upc-earlier summary { color: var(--cl-muted); }
.upc .upc-count:not(:empty) { background: rgba(20, 20, 19, .07); color: var(--cl-muted); }
.upc .upc-empty { border-color: var(--cl-line); color: var(--cl-muted); }
.upc .upc-earlier { border-top-color: var(--cl-line); }
.upc .upc-earlier-hint, .upc .upc-fine, .upc .upc-meta, .upc .upd-rep-where { color: var(--cl-muted); }

/* the search bar under the header — it looks through Full history; while there
   is a search, everything else in the feed steps aside for the results */
.upc-search { position: relative; display: flex; align-items: center; margin: 10px 14px 0; }
.upc-search > svg { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--cl-muted); pointer-events: none; }
.upc .upc-search input { width: 100%; padding: 8px 74px 8px 33px; border: 1px solid var(--cl-line); border-radius: 999px; font: 500 13px var(--sans); }
.upc .upc-search input::placeholder { color: var(--cl-muted); }
.upc-q-n { position: absolute; right: 30px; font-size: 11.5px; color: var(--cl-muted); pointer-events: none; }
.upc-scroll.searching > :not(.upc-history) { display: none !important; }
.upc-scroll.searching .upc-history { border-top: 0; padding-top: 0; }
.upc-scroll.searching .upc-history > .upc-earlier-hint { display: none; }
.upc-hist mark { background: var(--clay-soft); color: inherit; border-radius: 3px; box-shadow: 0 0 0 1px var(--clay-soft); }

/* the house buttons inside the panel take the chat's pills */
.upc .btn {
  background: var(--cl-sand); border-color: var(--cl-line); color: var(--cl-ink);
  box-shadow: none; border-radius: 999px; font-weight: 600;
}
.upc .btn:hover { background: var(--clay-soft); border-color: var(--clay); box-shadow: none; transform: none; }
.upc .btn:active { transform: scale(.95); }
.upc .btn.ghost { background: transparent; border-color: transparent; }
.upc .btn.ghost:hover { background: var(--cl-sand); border-color: transparent; }
.upc .btn.primary { background: var(--clay); border-color: transparent; color: #fff; box-shadow: 0 2px 10px rgba(217, 119, 87, .3); }
.upc .btn.primary:hover { background: #C86643; box-shadow: 0 4px 16px rgba(217, 119, 87, .4); }
.upc .btn.danger { background: #fff; border-color: rgba(192, 58, 49, .35); color: #8C2D24; }
.upc .btn.danger:hover { background: rgba(192, 58, 49, .08); border-color: rgba(192, 58, 49, .55); }
.upc .btn.danger.confirm, .upc .upc-status .btn.confirm { background: #C03A31; border-color: transparent; color: #fff; }
.upc .btn:disabled { opacity: .5; cursor: default; transform: none; }
.upc .upd-link { color: #A64B28; }
.upc .upd-link.quiet { color: var(--cl-muted); }
.upc .upd-link.quiet:hover { color: var(--cl-ink); }
.upc kbd { color: var(--cl-ink); background: #fff; border-color: var(--cl-line); }
.upc input:not([type="file"]) { background: #fff; border-color: var(--cl-line); color: var(--cl-ink); }
.upc input:not([type="file"]):focus { border-color: var(--clay); box-shadow: 0 0 0 2.5px rgba(217, 119, 87, .16); }

/* the rollout and GitHub cards: clay where they were maroon */
.upc .upc-status, .upc .upc-gh-form { border-color: rgba(217, 119, 87, .45); background: var(--clay-soft); }
.upc .upc-status.live { background: var(--cl-ink); border-color: transparent; }
.upc .upc-status.hold { background: var(--cl-card); border-color: var(--cl-line); }
.upc .upc-st-ico, .upc .upc-gh-ico { background: var(--clay); box-shadow: 0 2px 10px rgba(217, 119, 87, .3); }
.upc .upc-status.live .upc-st-ico { background: rgba(255, 255, 255, .12); box-shadow: none; }
.upc .upc-st-text b, .upc .upc-gh-body > b { color: var(--cl-ink); }
.upc .upc-st-text p, .upc .upc-gh-body p { color: var(--cl-muted); }

/* the queue: each update a card on the paper, lifted while it is open — the chat list's rows */
.upc .upc-item, .upc .upc-hist, .upc .upc-earlier-list li { background: transparent; border-color: var(--cl-line-soft); box-shadow: none; }
.upc .upc-item:hover, .upc .upc-hist:hover { background: rgba(240, 238, 230, .7); border-color: transparent; }
.upc .upc-item.open, .upc .upc-hist.open { background: var(--cl-card); border-color: var(--cl-line-soft); box-shadow: var(--cl-rest); }
.upc .upc-item.s-attention { background: var(--cl-card); border-color: rgba(217, 119, 87, .5); box-shadow: 0 0 0 3px rgba(217, 119, 87, .12), var(--cl-rest); }
.upc .upc-item.s-attention .upc-state { color: #A64B28; }
.upc .upc-item.s-ready .upc-state { color: #3F7050; }
.upc .upc-item.fresh { animation: upc-fresh-clay 2.2s var(--ease-out); }
@keyframes upc-fresh-clay {
  0% { border-color: rgba(217, 119, 87, .6); }
  18% { box-shadow: 0 0 0 4px rgba(217, 119, 87, .16), 0 0 26px rgba(217, 119, 87, .3); border-color: rgba(217, 119, 87, .6); }
  100% { box-shadow: none; }
}
.upc .upc-title, .upc .upc-e-text b { color: var(--cl-ink); font-weight: 650; }
.upc .upc-runon { background: #fff; border: 1px solid var(--cl-line); color: var(--cl-muted); line-height: 16px; }
.upc .upc-badge.t-busy { background: var(--clay-soft); color: var(--clay); box-shadow: none; }
.upc .upc-badge.t-wait { background: var(--cl-sand); color: var(--cl-muted); }
.upc .upc-badge.t-ok { background: #4A7C59; box-shadow: 0 3px 10px rgba(74, 124, 89, .28); }
.upc .upc-badge.t-ask { background: var(--clay); color: #fff; animation-name: upc-ask-clay; }
@keyframes upc-ask-clay { 0% { box-shadow: 0 0 0 0 rgba(217, 119, 87, .6); } 70%, 100% { box-shadow: 0 0 0 9px rgba(217, 119, 87, 0); } }
.upc .upc-badge.t-live { background: var(--cl-ink); }
.upc .upc-hist-ico.t-ok { background: rgba(74, 124, 89, .12); color: #4A7C59; }
.upc .upc-hist-ico.t-wait { background: var(--cl-sand); color: var(--cl-muted); }
.upc .upc-tally-one { background: #fff; border-color: var(--cl-line-soft); color: var(--cl-ink); }
.upc .upc-tally-one:hover { border-color: var(--clay); }
.upc .upc-tally-one.on { background: var(--cl-ink); border-color: var(--cl-ink); color: #fff; }
.upc .upc-tally-one b { background: rgba(74, 124, 89, .12); color: #3F7050; }
.upc .upc-chev { color: var(--cl-muted); }
.upc .upc-item.open .upc-chev, .upc .upc-hist.open .upc-chev { color: var(--cl-ink); }
.upc .upc-quick { background: #fff; border-color: var(--cl-line); color: var(--cl-ink); box-shadow: var(--cl-rest); }
.upc .upc-quick:hover { border-color: var(--clay); }
/* what Claude is doing right now: the chat's step line, a light passing over it */
.upc .upc-live { font: 500 11.5px/1.4 var(--mono); }
.upc .upc-live i { background: var(--clay); box-shadow: 0 0 7px rgba(217, 119, 87, .6); }
.upc .upc-live span {
  background: linear-gradient(90deg, var(--cl-muted) 0%, var(--cl-muted) 35%, var(--cl-ink) 50%, var(--cl-muted) 65%, var(--cl-muted) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: cl-shimmer 2.2s linear infinite;
}

/* inside an open update, the thread reads as the chat does: what was asked in
   the sand bubble on the right, Claude under its own name on the left */
.upc .upc-more-in { padding-left: 12px; }
.upc .upc-asked {
  align-self: flex-end; max-width: 92%; flex-direction: column; align-items: flex-end; gap: 7px;
  padding: 9px 13px; border-radius: 18px 18px 6px 18px;
  background: linear-gradient(180deg, #F6F4EF 0%, #EFECE4 100%); border: 1px solid var(--cl-line-soft);
  box-shadow: 0 1px 2px rgba(20, 20, 19, .05), 0 4px 14px rgba(20, 20, 19, .05), inset 0 1px 0 rgba(255, 255, 255, .85);
}
.upc .upc-asked p { align-self: stretch; padding: 0; border: none; font-size: 13px; line-height: 1.55; color: var(--cl-ink); max-height: 160px; }
.upc .upc-shot, .upc .upc-att-one { border-color: var(--cl-line); }
.upc .upc-att { justify-content: flex-end; }
.upc .upc-att-one i, .upc .upd-chip i { background: var(--cl-sand); color: var(--cl-muted); }
.upc .upc-ask {
  padding: 11px 13px 12px; border-radius: 12px; background: var(--cl-card); color: var(--cl-ink);
  border: 1px solid rgba(217, 119, 87, .5); box-shadow: 0 0 0 3px rgba(217, 119, 87, .12), var(--cl-lift);
}
.upc .upc-ask.k-error, .upc .upc-ask.k-held { border-color: rgba(192, 58, 49, .3); background: rgba(192, 58, 49, .05); box-shadow: none; }
.upc .upc-ask.k-stopped { border-color: var(--cl-line); box-shadow: var(--cl-rest); }
.upc .upc-ask > b { color: #A64B28; }
.upc .upc-ask.k-error > b, .upc .upc-ask.k-held > b { color: #8C2D24; }
.upc-by { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; }
.upc-by .msg-av { width: 22px; height: 22px; border-radius: 7px; }
.upc-by .msg-av .cl-star { width: 12px; height: 12px; }
.upc .upc-by b { margin: 0; font: 700 12.5px var(--sans); letter-spacing: -.005em; text-transform: none; color: var(--cl-ink); }
.upc .upc-ask.k-error .upc-by b, .upc .upc-ask.k-held .upc-by b { color: #8C2D24; }
.upc .upc-release { background: rgba(74, 124, 89, .07); border-color: rgba(74, 124, 89, .24); }
.upc .upc-release .upc-kicker { color: #3F7050; }
.upc .upc-release b { color: var(--cl-ink); }
.upc .upc-livedot { color: #A64B28; }
.upc .upc-livedot::before { background: var(--clay); }
/* Claude's log: the chat's folded tool work, opened — a white card with a
   hairline timeline, not a terminal */
.upc .upc-log {
  padding: 7px 10px 7px 8px; background: var(--cl-card); color: var(--cl-muted);
  border: 1px solid var(--cl-line-soft); box-shadow: var(--cl-rest);
  font: 400 11.3px/1.6 var(--mono); scrollbar-color: rgba(20, 20, 19, .22) transparent;
}
.upc .upc-log li { position: relative; padding-left: 20px; }
.upc .upc-log li::before { content: ''; position: absolute; left: 7.5px; top: 0; bottom: 0; width: 1px; background: var(--cl-line); }
.upc .upc-log li::after {
  content: ''; position: absolute; left: 5.5px; top: .8em; width: 5px; height: 5px;
  border-radius: 50%; background: var(--cl-card); box-shadow: inset 0 0 0 1.2px rgba(20, 20, 19, .28);
}
.upc .upc-log .k-claude { color: var(--cl-ink); font: 400 12.5px/1.55 var(--sans); padding-top: 3px; padding-bottom: 3px; }
.upc .upc-log .k-claude::after { background: var(--clay); box-shadow: none; }
.upc .upc-log .k-user { color: #A64B28; font-family: var(--sans); font-weight: 600; }
.upc .upc-log .k-ok { color: #3F7050; }
.upc .upc-log .k-err { color: #8C2D24; }
.upc .upc-log .k-note { color: var(--cl-muted); }
/* A picture Claude made or looked at: a little preview, opens full size */
.upc-log .k-img { display: flex; align-items: flex-end; gap: 8px; padding-top: 4px; padding-bottom: 4px; white-space: normal; }
.upc-pic { flex-shrink: 0; display: block; line-height: 0; border-radius: 7px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .14); background: repeating-conic-gradient(rgba(127, 127, 127, .12) 0 25%, transparent 0 50%) 0 0 / 10px 10px; transition: transform .2s var(--ease-out), box-shadow .2s; }
.upc-pic:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(20, 20, 20, .18); }
.upc-pic:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.upc-pic img { display: block; max-width: 168px; max-height: 104px; min-width: 32px; min-height: 24px; object-fit: contain; }
.upc-pic-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; opacity: .8; }
.upc .upc-pic { border-color: var(--cl-line-soft); }

/* the composers — the new note at the panel's foot, and a message to one
   update — are the chat's: one rounded card, clay ring while you type */
.upc-compose { flex-shrink: 0; gap: 0; padding: 10px 11px 0; border-top: 1px solid var(--cl-line); }
.upc-compose-card, .upc .upc-reply {
  display: flex; flex-direction: column; gap: 4px; padding: 8px;
  background: #fff; border: 1px solid rgba(20, 20, 19, .16); border-radius: 20px;
  transition: border-color .14s var(--ease-out), box-shadow .14s var(--ease-out);
}
.upc-compose-card:focus-within, .upc .upc-reply:focus-within { border-color: var(--clay); box-shadow: 0 0 0 2.5px rgba(217, 119, 87, .16); }
.upc .upc-compose-card textarea, .upc .upc-reply textarea {
  flex: none; resize: none; min-height: 26px; overflow-y: auto; padding: 4px 6px 0;
  background: transparent; border: none; border-radius: 0; box-shadow: none;
  font: 400 13.5px/1.5 var(--sans); color: var(--cl-ink);
}
.upc #upd-rep-msg { min-height: 44px; max-height: 30vh; }
.upc .upc-reply textarea { max-height: 180px; }
.upc .upc-compose-card textarea::placeholder, .upc .upc-reply textarea::placeholder { color: var(--cl-muted); }
.upc .upc-compose-card textarea:focus, .upc .upc-reply textarea:focus { border: none; box-shadow: none; outline: none; }
.upc-compose-foot, .upc-reply-foot { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0 2px 1px; min-width: 0; }
.upc .upd-files { padding: 2px 2px 0; }
.upc .upd-chip { background: var(--cl-paper); border-color: var(--cl-line); color: var(--cl-ink); }
.upc .upd-rep-shot:empty { display: none; }
.upc .upd-rep-shot.has-shot { margin: 2px 2px 0; padding: 7px; border-radius: 14px; background: var(--cl-paper); border-color: var(--cl-line-soft); }
.upc .upd-rep-shot .upd-rep-thumb { width: 92px; height: 58px; border-color: var(--cl-line); }
.upc .upd-rep-shot-meta { color: var(--cl-muted); }
.upc .upd-rep-shot-meta b { color: var(--cl-ink); }
/* the model and effort, as the chat's pills — tinted the same per model */
.upc .upc-pick { flex: 0 1 auto; gap: 4px; margin-left: 2px; }
.upc .upc-pick select {
  height: 29px; padding: 0 24px 0 10px; max-width: 132px; background-color: transparent; background-position: right 8px center;
  border: 1px solid var(--cl-line); border-radius: 999px; box-shadow: none;
  font: 600 11px var(--sans); letter-spacing: .01em; color: var(--cl-muted); cursor: pointer;
  transition: background-color .16s var(--ease-out), color .16s var(--ease-out), border-color .16s var(--ease-out);
}
.upc .upc-pick select:hover:not(:disabled) { background-color: var(--cl-sand); color: var(--cl-ink); }
.upc .upc-pick select:focus { border-color: var(--clay); box-shadow: none; }
.upc .upc-pick select[data-family="haiku"] { color: #4A7C59; border-color: rgba(74, 124, 89, .35); background-color: rgba(74, 124, 89, .08); }
.upc .upc-pick select[data-family="sonnet"] { color: #A64B28; border-color: rgba(217, 119, 87, .45); background-color: var(--clay-soft); }
.upc .upc-pick select[data-family="opus"] { color: #6B4E8F; border-color: rgba(107, 78, 143, .35); background-color: rgba(107, 78, 143, .08); }
.upc .upc-pick select[data-family="fable"] { color: #4A3B8A; border-color: rgba(74, 59, 138, .4); background-color: rgba(74, 59, 138, .1); }
.upc .comp-send { flex-shrink: 0; padding: 0; }
.upc .comp-send.loading { opacity: .55; cursor: progress; }
.upc .comp-send:disabled { cursor: progress; }
.upc .upc-reply { flex-wrap: nowrap; align-items: stretch; }
.upc .upc-reply .upd-files { flex: none; }
/* the box with the send up beside it — out of the row of tools below, so a
   narrow panel or long model names never push it off the card */
.upc-compose-row { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.upc .upc-compose-row textarea { flex: 1 1 auto; min-width: 0; }
.upc .upc-split { margin-top: 2px; }
.upc .upc-split .upc-send {
  width: 32px; height: 29px; margin: 0; padding: 0 0 0 1px; border-radius: 999px 0 0 999px;
  background: var(--clay); box-shadow: none; transform: none;
}
.upc .upc-split .upc-send:hover { background: #C86643; box-shadow: none; transform: none; }
.upc .upc-split .comp-send-more { height: 29px; }
.upc-compose-foot, .upc-reply-foot { flex-wrap: wrap; row-gap: 4px; }
.upc .upc-pick select { min-width: 88px; max-width: 110px; }
/* the send menu: the Claude panel's, hung from whichever chevron opened it */
.upc .upc-send-menu { position: absolute; width: 268px; max-width: calc(100% - 12px); z-index: 60; }
.upc .upc-send-menu .mm-row:disabled { opacity: .45; cursor: default; background: none; }
.upc .upc-send-menu .mm-tick { opacity: 1; }
/* the plan's 5-hour usage, beside the model — the Claude panel's band, small */
.upc-usage {
  display: inline-flex; align-items: center; gap: 5px; height: 29px; padding: 0 9px; flex-shrink: 0; margin-left: 2px;
  border: 1px solid var(--cl-line); border-radius: 999px; cursor: default; user-select: none;
  font: 600 11px var(--sans); color: var(--cl-muted); font-variant-numeric: tabular-nums;
}
.upc-usage[hidden] { display: none; }
.upc-usage b { font-weight: 700; color: var(--cl-ink); }
.upc-usage-bar { position: relative; width: 18px; height: 5px; border-radius: 3px; overflow: hidden; background: rgba(20, 20, 19, .09); }
.upc-usage-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: var(--clay); transition: width .55s var(--ease-out); }
.upc-usage.warn .upc-usage-bar i { background: #E2650F; }
.upc-usage.hot .upc-usage-bar i { background: #DD4B14; }
.upc-usage.hot b { color: #B8400F; }
.upc-compose-meta { display: flex; align-items: baseline; gap: 10px; min-height: 8px; padding: 5px 6px 0; }
.upc-compose-meta .upd-rep-note { flex: 1; min-width: 0; font-size: 11.5px; color: var(--cl-muted); }
.upc-compose-meta .upd-rep-note.error { color: #8C2D24; }
.upc-compose-meta .upd-rep-where { flex: none; margin-left: auto; font-size: 11px; }
.upc .upc-foot { border-top: none; padding: 6px 16px 11px 17px; font-size: 11.5px; color: var(--cl-muted); }
@media (max-width: 420px) { .upc .upc-pick select { max-width: 96px; } }

/* ===================================================================
   Before it goes dark: the bar, and the pill
   =================================================================== */
.upd-gate-bar {
  position: fixed; top: 66px; left: 50%; z-index: 880;
  display: flex; align-items: center; gap: 12px;
  width: min(960px, calc(100vw - 24px)); padding: 10px 10px 10px 12px;
  background: rgba(255, 255, 255, .92); border: 1px solid rgba(123, 30, 46, .35); border-radius: 18px;
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: 0 14px 40px rgba(26, 26, 26, .2), 0 2px 24px rgba(123, 30, 46, .18), inset 0 1px 0 rgba(255, 255, 255, .9);
  opacity: 0; transform: translate(-50%, -12px) scale(.985);
  transition: opacity .24s var(--ease-out), transform .46s var(--ease-spring);
}
.upd-gate-bar.open { opacity: 1; transform: translate(-50%, 0); }
.upd-gate-bar p { margin: 0; flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.upd-gate-bar p b { color: var(--ink); font-weight: 700; }
.upd-gate-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0; background: #0B0B0B; color: #fff; box-shadow: 0 4px 14px rgba(20, 20, 20, .25); }
.upd-gate-icon svg { width: 16px; height: 16px; }
.upd-gate-icon .upd-spin { width: 14px; height: 14px; }
.upd-gate-icon.pausing svg { animation: upd-breathe 2s ease-in-out infinite; }
@keyframes upd-breathe { 50% { opacity: .45; } }
.upd-gate-clock { font: 500 12px var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); padding: 0 4px; }
.upd-gate-acts { display: flex; gap: 6px; flex-shrink: 0; }
.upd-gate-acts .btn { padding: 6px 12px; font-size: 12.5px; white-space: nowrap; }
.upd-gate-acts .btn.upd-gate-x { padding: 6px 7px; }
.upd-gate-x svg { width: 14px; height: 14px; }
body.upd-paused #chat-send { opacity: .45; }
@media (max-width: 760px) {
  .upd-gate-bar { flex-wrap: wrap; top: auto; bottom: 12px; transform: translate(-50%, 12px); }
  .upd-gate-bar.open { transform: translate(-50%, 0); }
  .upd-gate-acts { width: 100%; justify-content: flex-end; }
}

.upd-live {
  all: unset; box-sizing: border-box; cursor: pointer;
  position: fixed; left: 50%; bottom: 18px; z-index: 870;
  display: flex; align-items: center; gap: 10px; max-width: min(520px, calc(100vw - 24px)); padding: 7px 8px;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: 0 10px 30px rgba(26, 26, 26, .16), 0 2px 22px rgba(123, 30, 46, .14);
  opacity: 0; transform: translate(-50%, 12px);
  transition: opacity .22s var(--ease-out), transform .42s var(--ease-spring), box-shadow .32s var(--ease-out), border-color .2s var(--ease-out);
}
.upd-live.open { opacity: 1; transform: translate(-50%, 0); }
.upd-live:hover { border-color: rgba(123, 30, 46, .45); box-shadow: 0 14px 36px rgba(26, 26, 26, .2), 0 2px 30px rgba(123, 30, 46, .22); transform: translate(-50%, -1px); }
.upd-live:active { transform: translate(-50%, 1px) scale(.98); transition-duration: .06s; }
.upd-live:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.upd-live.asking { border-color: rgba(245, 197, 24, .8); }
.upd-live-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: var(--cta-grad); color: #fff; }
.upd-live-ico .upd-spin { width: 13px; height: 13px; }
.upd-live-ico .cl-star { width: 15px; height: 15px; }
.upd-live-ico.ask { background: var(--gold); }
.upd-live-ico.ask i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); animation: upd-pulse 1s var(--ease-out) infinite; }
.upd-live-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.upd-live-text b { font: 700 13px var(--sans); color: var(--ink); white-space: nowrap; }
.upd-live-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.upd-live-time { font: 500 12px var(--mono); color: var(--muted); white-space: nowrap; }
.upd-live-time:empty { display: none; }
.upd-live-open { padding: 5px 12px; border-radius: 999px; font: 600 12px var(--sans); color: var(--accent-deep); background: var(--accent-soft); white-space: nowrap; }

/* ===================================================================
   The black screen
   The app pulls out of focus as it darkens to pure black; the slash beats
   like a heart, white and glowing, rings going out from it; under it what
   is coming and how far along it is; a clock along the bottom and the
   update's log in the corner. Lifting is the same in reverse: the black
   thins and the app comes back into focus, where it was.
   =================================================================== */
.upk {
  position: fixed; inset: 0; z-index: 2147483000;
  display: grid; place-items: center; overflow: hidden;
  color: #FFFFFF;
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px) saturate(1); -webkit-backdrop-filter: blur(0px) saturate(1);
  /* how it lifts (the black goes last, after what is on it) */
  transition: background-color 1.1s cubic-bezier(.4, 0, .2, 1) .22s, backdrop-filter 1.15s cubic-bezier(.4, 0, .2, 1) .2s, -webkit-backdrop-filter 1.15s cubic-bezier(.4, 0, .2, 1) .2s;
  -webkit-font-smoothing: antialiased;
}
.upk.open {
  background-color: rgba(0, 0, 0, 1);
  backdrop-filter: blur(18px) saturate(.55); -webkit-backdrop-filter: blur(18px) saturate(.55);
  /* how it falls: the page softens first, then the dark comes down */
  transition: background-color 1.05s cubic-bezier(.45, 0, .2, 1), backdrop-filter .7s cubic-bezier(.3, 0, .2, 1), -webkit-backdrop-filter .7s cubic-bezier(.3, 0, .2, 1);
}
.upk.instant, .upk.instant * { transition: none !important; }
/* The Updates panel stays up where it is, bottom-right: the black is cut away
   around it (a clip-path set from updates.js), and the log moves up to the
   top-right corner, in the room above the panel (--upk-t, the panel's top),
   newest line at the bottom. Nothing else moves; the middle only wraps short
   of the panel (--upk-cw) rather than run under it. */
.upk.keeps-panel .upk-center, .upk.keeps-claude .upk-center { width: min(660px, var(--upk-cw, 660px)); }
/* …and takes no pointer itself then: the wheel would stop at the black's whole
   rectangle, cut or not, and the kept panels would not scroll. The shield's
   rectangles (updPaintShield) stop the pointer everywhere else. */
.upk.keeps-panel, .upk.keeps-claude { pointer-events: none; }
.upk.keeps-panel .upk-tab, .upk.keeps-claude .upk-tab, .upk.keeps-panel .upk-escape, .upk.keeps-claude .upk-escape { pointer-events: auto; }
.upk-shield { position: absolute; inset: 0; pointer-events: none; }
.upk-shield i { position: absolute; pointer-events: auto; }
.upk.keeps-panel .upk-log {
  top: max(58px, env(safe-area-inset-top)); bottom: auto;
  max-height: max(0px, calc(var(--upk-t, 100vh) - 74px));
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
}
.upk-vignette {
  position: absolute; inset: -10%; pointer-events: none;
  background:
    radial-gradient(42vmax 34vmax at 50% 44%, rgba(255, 255, 255, .055), transparent 70%),
    radial-gradient(70vmax 50vmax at 50% 120%, rgba(123, 30, 46, .16), transparent 70%);
  opacity: 0; transition: opacity 1.2s ease .3s;
}
.upk.open .upk-vignette { opacity: 1; }

.upk-center {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  width: min(660px, calc(100vw - 48px)); margin-top: -4vh;
  opacity: 0; transform: translateY(12px) scale(.985); filter: blur(8px);
  transition: opacity .4s ease, transform .5s ease, filter .4s ease;
}
.upk.open .upk-center {
  opacity: 1; transform: none; filter: blur(0);
  transition: opacity .8s var(--ease-out) .5s, transform 1s var(--ease-out) .5s, filter .8s var(--ease-out) .5s;
}

/* the slash: a heartbeat, a glow that swells with it, rings going out */
.upk-logo { position: relative; width: 150px; height: 150px; display: grid; place-items: center; margin-bottom: 26px; }
.upk.open .upk-logo { animation: upk-arrive 1.2s var(--ease-spring) .45s both; }
.upk.resume .upk-logo { animation: none; }
@keyframes upk-arrive { from { transform: scale(.35); opacity: 0; } 55% { opacity: 1; } to { transform: none; opacity: 1; } }
.upk-mark { position: relative; z-index: 2; display: block; width: 54px; height: 81px; animation: upk-beat 2.2s cubic-bezier(.3, .7, .3, 1) infinite; will-change: transform; }
.upk-mark .upd-slash {
  display: block; width: 100%; height: 100%; fill: #FFFFFF;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, .95)) drop-shadow(0 0 14px rgba(255, 255, 255, .6)) drop-shadow(0 0 38px rgba(255, 255, 255, .28));
}
@keyframes upk-beat {
  0% { transform: scale(1); }
  9% { transform: scale(1.17); }
  20% { transform: scale(.93); }
  31% { transform: scale(1.07); }
  44% { transform: scale(.99); }
  56%, 100% { transform: scale(1); }
}
.upk-halo {
  position: absolute; inset: 0; border-radius: 50%; z-index: 1; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, .16) 30%, rgba(255, 255, 255, 0) 64%);
  animation: upk-halo 2.2s cubic-bezier(.3, .7, .3, 1) infinite; will-change: transform, opacity;
}
@keyframes upk-halo {
  0% { opacity: .4; transform: scale(.78); }
  9% { opacity: 1; transform: scale(1.12); }
  31% { opacity: .7; transform: scale(.97); }
  100% { opacity: .4; transform: scale(.78); }
}
.upk-ring {
  position: absolute; inset: 36px; border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(255, 255, 255, .6); opacity: 0;
  animation: upk-ring 2.2s cubic-bezier(.15, .6, .3, 1) infinite; will-change: transform, opacity;
}
.upk-ring.two { animation-delay: .22s; border-color: rgba(255, 255, 255, .32); }
@keyframes upk-ring { 0% { transform: scale(.6); opacity: 0; } 7% { opacity: .85; } 72%, 100% { transform: scale(1.75); opacity: 0; } }
/* done: one bright breath, then still */
.upk.done .upk-mark { animation: upk-done .9s var(--ease-out) both; }
.upk.done .upk-halo { animation: upk-flash 1.1s var(--ease-out) both; }
.upk.done .upk-ring { animation: upk-ring 1.1s cubic-bezier(.15, .6, .3, 1) 1 both; }
@keyframes upk-done { 0% { transform: scale(1); } 30% { transform: scale(1.22); } 100% { transform: scale(1.04); } }
@keyframes upk-flash { 0% { opacity: .5; transform: scale(.9); } 30% { opacity: 1; transform: scale(1.35); } 100% { opacity: .55; transform: scale(1.05); } }

.upk-kicker { margin: 0 0 10px; font: 700 10.5px var(--sans); letter-spacing: .26em; text-transform: uppercase; color: rgba(255, 255, 255, .46); }
.upk-title {
  margin: 0; max-width: 100%; font: 800 clamp(22px, 3.2vw, 30px)/1.2 var(--display); letter-spacing: -.02em; color: #FFFFFF;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance;
}
.upk-more { margin: 7px 0 0; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .52); }
.upk-more:empty { display: none; }
.upk-steps { list-style: none; display: flex; align-items: center; gap: 0; margin: 26px 0 0; padding: 0; }
.upk-steps li {
  display: inline-flex; align-items: center; gap: 7px; font: 700 10px var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .26); transition: color .5s var(--ease-out);
}
.upk-steps li + li::before { content: ''; width: 22px; height: 1px; margin: 0 10px 0 3px; background: currentColor; opacity: .5; }
.upk-steps li i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; box-sizing: border-box; transition: background .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.upk-steps li.done { color: rgba(255, 255, 255, .58); }
.upk-steps li.done i { background: currentColor; }
.upk-steps li.now { color: #FFFFFF; }
.upk-steps li.now i { background: #FFFFFF; box-shadow: 0 0 0 3px rgba(255, 255, 255, .14), 0 0 12px rgba(255, 255, 255, .9); animation: upk-now 1.4s ease-in-out infinite; }
@keyframes upk-now { 50% { box-shadow: 0 0 0 5px rgba(255, 255, 255, .06), 0 0 18px rgba(255, 255, 255, 1); } }
.upk-status { margin: 16px 0 0; min-height: 1.5em; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .78); }
.upk-bar { position: relative; width: min(260px, 60vw); height: 2px; margin-top: 14px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.upk-bar i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px;
  background: #FFFFFF; box-shadow: 0 0 10px rgba(255, 255, 255, .8);
  transition: width 1s var(--ease-out);
}
.upk-bar::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 34%; left: -34%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: upk-sheen 1.9s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes upk-sheen { to { left: 100%; } }

/* the clock along the bottom */
.upk-foot {
  position: absolute; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: baseline; gap: 12px; white-space: nowrap;
  opacity: 0; transition: opacity .4s ease;
}
.upk.open .upk-foot { opacity: 1; transition: opacity .8s var(--ease-out) .8s; }
.upk-clock { font: 500 15px var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .04em; color: rgba(255, 255, 255, .86); }
.upk-eta { font-size: 12px; color: rgba(255, 255, 255, .42); }
.upk-eta::before { content: ''; display: inline-block; width: 3px; height: 3px; margin: 0 10px 3px 0; border-radius: 50%; background: rgba(255, 255, 255, .3); vertical-align: middle; }

/* the log in the corner: Claude's CLI log for the update, then the rollout as it happens */
.upk-log {
  position: absolute; right: max(28px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom));
  width: min(470px, 38vw); pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 52%); mask-image: linear-gradient(to bottom, transparent 0%, #000 52%);
  opacity: 0; transition: opacity .4s ease;
}
.upk.open .upk-log { opacity: 1; transition: opacity .9s var(--ease-out) .95s; }
.upk-log ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font: 400 11px/1.75 var(--mono); }
.upk-log li { display: flex; gap: 12px; min-width: 0; color: rgba(255, 255, 255, .5); transition: color .6s ease; }
.upk-log li .t { flex: 0 0 56px; text-align: right; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .26); padding-top: 1px; }
.upk-log li .x { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upk-log li.src-claude .t, .upk-log li.src-claude-head .t { color: rgba(217, 119, 87, .85); }
.upk-log li.src-claude-head .x { color: rgba(255, 255, 255, .8); font-weight: 500; }
.upk-log li.src-ok .x { color: rgba(111, 221, 176, .85); }
.upk-log li.src-warn .x { color: rgba(245, 197, 24, .85); }
.upk-log li.src-error .x { color: rgba(255, 156, 147, .9); }
.upk-log li:last-child { color: rgba(255, 255, 255, .92); }
.upk-log li:last-child .x::after { content: ''; display: inline-block; width: 6px; height: 11px; margin-left: 6px; vertical-align: -1px; background: var(--gold); animation: upk-caret 1.05s steps(1) infinite; }
.upk-log li.new { animation: upk-line .45s var(--ease-out); }
@keyframes upk-line { from { opacity: 0; transform: translateY(7px); } }
@keyframes upk-caret { 50% { opacity: 0; } }

.upk-escape { position: absolute; top: max(20px, env(safe-area-inset-top)); right: 24px; font-size: 12px; color: rgba(255, 255, 255, .5); animation: view-in .5s var(--ease-out); }
.upk-link { all: unset; cursor: pointer; margin-left: 6px; color: rgba(255, 255, 255, .9); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; border-radius: 4px; }
.upk-link:hover { color: #FFFFFF; }
.upk-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* lifting: what is on the black goes first, then the black thins and the app comes back into focus */
/* The edge tabs: the editor's rails (app.css, .col-rail), in the black's own
   colours — they bring the Claude panel (left) and the Updates panel (right)
   up through it (updates.js, updCurtainOpen). */
.upk-tab {
  position: absolute; top: 50%; z-index: 3; display: flex; align-items: center; gap: 6px;
  transform: translateY(-50%); cursor: pointer; writing-mode: vertical-rl;
  font: 700 10.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16);
  padding: 12px 8px 12px 6px;
  opacity: 0; transition: opacity .8s var(--ease-out) .9s, color .2s ease, background-color .2s ease, border-color .2s ease;
}
.upk.open .upk-tab { opacity: 1; }
.upk-tab[hidden] { display: none; }
.upk-tab.is-left { left: 0; border-left: none; border-radius: 0 12px 12px 0; }
.upk-tab.is-right { right: 0; border-right: none; border-radius: 12px 0 0 12px; padding: 12px 6px 12px 8px; }
.upk-tab svg { width: 13px; height: 13px; rotate: 90deg; }
.upk-tab:hover { color: #FFFFFF; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .34); }
.upk-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.upk.lifting .upk-tab { opacity: 0; transition: opacity .3s ease; }
.upk.lifting .upk-center { opacity: 0; transform: scale(.94); filter: blur(6px); transition: opacity .45s ease, transform .6s var(--ease-out), filter .45s ease; }
.upk.lifting .upk-foot, .upk.lifting .upk-log, .upk.lifting .upk-vignette { opacity: 0; transition: opacity .35s ease; }

@media (max-width: 760px) {
  .upk-center { margin-top: -12vh; }
  .upk-logo { width: 120px; height: 120px; margin-bottom: 18px; }
  .upk-mark { width: 44px; height: 66px; }
  .upk-steps li { letter-spacing: .08em; }
  .upk-steps li + li::before { width: 10px; margin: 0 6px 0 2px; }
  .upk-log { left: 16px; right: 16px; width: auto; bottom: 64px; }
  .upk-log ol { max-height: 7.5em; overflow: hidden; justify-content: flex-end; }
  .upk-foot { bottom: 22px; }
}

/* ===================================================================
   What changed — the note after an update, and the light on it
   =================================================================== */
.upn {
  position: fixed; right: 22px; bottom: 22px; z-index: 2147482500;   /* above the dimmed page around the light */
  width: min(410px, calc(100vw - 24px)); max-height: calc(100vh - 44px);
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 22px 60px rgba(26, 26, 26, .24), 0 4px 30px rgba(123, 30, 46, .16), inset 0 1px 0 rgba(255, 255, 255, .9);
  opacity: 0; transform: translateY(20px) scale(.96); transform-origin: bottom right;
  transition: opacity .26s var(--ease-out), transform .55s var(--ease-spring);
}
.upn.open { opacity: 1; transform: none; }
.upn-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 14px 6px 18px; }
.upn-tick { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: var(--ok); color: #fff; box-shadow: 0 6px 20px rgba(14, 138, 95, .35); }
.upn.open .upn-tick { animation: nbadge-pop .7s var(--ease-spring) .15s both; }
.upn-tick svg { width: 19px; height: 19px; }
.upn.quiet .upn-tick { background: rgba(26, 26, 26, .08); color: var(--muted); box-shadow: none; }
.upn-titles { flex: 1; min-width: 0; padding-top: 2px; }
.upn-titles h2 { margin: 0; font: 800 17px/1.25 var(--display); letter-spacing: -.01em; color: #111111; }
.upn-titles p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.upn-list { list-style: none; margin: 0; padding: 6px 18px 4px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.upn-list li { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.upn-list li:first-child { border-top: 0; }
.upn.open .upn-list li { animation: upn-in .5s var(--ease-out) both; }
.upn.open .upn-list li:nth-child(2) { animation-delay: .07s; }
.upn.open .upn-list li:nth-child(3) { animation-delay: .14s; }
.upn.open .upn-list li:nth-child(n+4) { animation-delay: .2s; }
@keyframes upn-in { from { opacity: 0; transform: translateY(6px); } }
.upn-dot { width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--cta-grad); box-shadow: 0 0 0 3px rgba(123, 30, 46, .12); flex-shrink: 0; }
.upn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upn-text b { font-size: 14px; line-height: 1.35; color: var(--ink); }
.upn-text p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.upn-where { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11.5px; font-weight: 600; color: var(--accent-deep); }
.upn-where svg { width: 13px; height: 13px; }
.upn-list .btn { padding: 5px 11px; font-size: 12.5px; flex-shrink: 0; }
.upn-foot { display: flex; justify-content: flex-end; padding: 8px 14px 14px; }

/* the light on what changed: a maroon ring with a gold glow, the page dimmed around it for a moment */
.upd-spot {
  position: fixed; left: 0; top: 0; z-index: 2147482000; pointer-events: none;
  border-radius: 12px; border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, .55), 0 0 30px 6px rgba(245, 197, 24, .42);
  opacity: 0; will-change: transform;
  transition: opacity .4s var(--ease-out);
}
.upd-spot::before {
  content: ''; position: absolute; inset: -2px; border-radius: inherit;
  box-shadow: 0 0 0 200vmax rgba(14, 14, 14, .36); opacity: 0;
  transition: opacity .55s var(--ease-out);
}
.upd-spot::after {
  content: ''; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid rgba(245, 197, 24, .9);
  opacity: 0;
}
.upd-spot.on { opacity: 1; }
.upd-spot.on::before { opacity: 1; }
.upd-spot.on::after { animation: upd-spot-pulse 1.5s var(--ease-out) .2s 3; }
.upd-spot.settled::before { opacity: 0; transition: opacity 1.4s var(--ease-out); }
.upd-spot.off { opacity: 0; transition: opacity .5s var(--ease-out); }
@keyframes upd-spot-pulse { 0% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: scale(1.14); } }
.upd-spot-tag {
  position: absolute; left: -2px; top: -30px; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--cta-grad); color: #fff;
  font: 700 11px var(--sans); letter-spacing: .02em; white-space: nowrap;
  box-shadow: var(--bloom); transform: translateY(4px); opacity: 0;
  transition: transform .5s var(--ease-spring) .2s, opacity .3s var(--ease-out) .2s;
}
.upd-spot-tag svg { width: 12px; height: 12px; }
.upd-spot.on .upd-spot-tag { transform: none; opacity: 1; }
.upd-spot.tag-below .upd-spot-tag { top: auto; bottom: -30px; }

/* ===================================================================
   The markup sheet
   =================================================================== */
.upd-mk {
  position: fixed; inset: 0; z-index: 950; display: flex; flex-direction: column;
  background: rgba(29, 29, 29, .62);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .22s var(--ease-out);
}
.upd-mk:focus { outline: none; }
.upd-mk.open { opacity: 1; }
.upd-mk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px;
  background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  transform: translateY(-8px); transition: transform .42s var(--ease-spring);
}
.upd-mk.open .upd-mk-bar { transform: none; }
.upd-mk-title { display: flex; flex-direction: column; margin-right: 6px; }
.upd-mk-title b { font: 800 14.5px var(--display); color: #111111; }
.upd-mk-title span { font-size: 12px; color: var(--muted); }
.upd-mk-tools .btn { padding: 6px 12px; }
.upd-mk-inks { display: flex; gap: 6px; padding: 0 4px; }
.upd-ink {
  all: unset; cursor: pointer; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line);
  transition: transform .32s var(--ease-spring), box-shadow .2s var(--ease-out);
}
.upd-ink:hover { transform: scale(1.12); }
.upd-ink:active { transform: scale(.9); transition-duration: .06s; }
.upd-ink.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.upd-ink:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.upd-mk-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 28px; }
.upd-mk-sheet {
  position: relative; border-radius: 10px; overflow: hidden; background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .25);
  transform: scale(.97); transition: transform .42s var(--ease-spring);
}
.upd-mk.open .upd-mk-sheet { transform: none; }
.upd-mk-sheet img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.upd-mk-svg { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; overflow: visible; }
.upd-mk-svg[data-tool="note"] { cursor: copy; }
.upd-mk-ask {
  position: absolute; z-index: 2; display: flex; gap: 6px; align-items: center;
  padding: 5px 5px 5px 6px; border-radius: 14px;
  background: rgba(255, 255, 255, .96); border: 1.5px solid var(--ink, var(--accent));
  box-shadow: 0 8px 26px rgba(26, 26, 26, .25);
  animation: view-in .22s var(--ease-out);
}
.upd-mk-ask input { padding: 6px 9px; font-size: 13px; border-radius: 9px; border-color: transparent; background: transparent; }
.upd-mk-ask input:focus { box-shadow: none; border-color: transparent; background: transparent; }
.upd-mk-ask .btn { padding: 5px 8px; flex-shrink: 0; }

/* ---- the quick note: right-click any part of the builder (updates.js, 2b) ----
   A small card of the panel's glass at the pointer, over everything but the
   black screen; a maroon ring with a gold glow holds the piece it is about. */
.upq {
  position: fixed; z-index: 970; width: min(360px, calc(100vw - 16px)); padding: 12px 12px 10px;
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 48px rgba(26, 26, 26, .22), 0 4px 30px rgba(123, 30, 46, .14), inset 0 1px 0 rgba(255, 255, 255, .9);
  opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top left;
  transition: opacity .17s var(--ease-out), transform .32s var(--ease-spring);
}
.upq.open { opacity: 1; transform: none; }
.upq.closing { opacity: 0; transform: translateY(-4px) scale(.98); transition-duration: .14s; pointer-events: none; }
.upq-head { display: flex; align-items: center; gap: 10px; }
.upq-mark {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  background: #0B0B0B; box-shadow: 0 3px 10px rgba(20, 20, 20, .26), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.upq-mark .upd-slash { width: 10px; height: 15px; fill: #fff; filter: drop-shadow(0 0 3px rgba(255, 255, 255, .7)); }
.upq-what { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.upq-kick { font: 700 10px var(--sans); letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.upq-name { font: 700 13.5px var(--display); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upq-x { margin: -4px -4px 0 0; }
.upq textarea { resize: none; min-height: 72px; max-height: 40vh; font-size: 14px; line-height: 1.5; }
.upq-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.upq-note:empty { display: none; }
.upq-note.error { color: var(--danger-ink); }
.upq.done .upq-note { color: var(--ok); font-weight: 600; }
.upq-foot { display: flex; align-items: center; gap: 6px; }
.upq-hint { flex: 1; min-width: 0; font-size: 11.5px; color: var(--muted); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upq-foot .btn { white-space: nowrap; }
.upq-foot .btn.primary kbd { margin-left: 4px; background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .35); }
.upq-ring {
  position: fixed; left: 0; top: 0; z-index: 965; pointer-events: none;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 30, 46, .14), 0 0 18px var(--gold-soft);
  opacity: 0; transition: opacity .18s var(--ease-out);
}
.upq-ring.on { opacity: 1; }

@media (max-width: 720px) {
  .upc, .upn { right: 12px; bottom: 12px; }
  .upc-more-in { padding-left: 12px; }
  .upd-mk-title span { display: none; }
  .upd-mk-tools .hl { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .upc, .upn, .upd-live, .upd-gate-bar, .upd-mk, .upd-mk-bar, .upd-mk-sheet, .upc-item, .upc-more, .upc-chev { transition-duration: .01s !important; }
  .upc-item.fresh, .upc-drafts-list li.fresh, .upc-badge.t-ask, .upc-badge.t-ok, .upc-live i, .upc-live span.tick, .upc-livedot::before, .upd-gate-icon svg,
  .upd-live-ico.ask i, .upc-log li.new, .upn.open .upn-tick, .upn.open .upn-list li { animation: none !important; }
  /* the black screen: a plain fade, a still slash with its glow */
  .upk, .upk.open, .upk-center, .upk.open .upk-center, .upk-foot, .upk-log, .upk-vignette { transition-duration: .2s !important; transition-delay: 0s !important; }
  .upk, .upk.open { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .upk-center { filter: none !important; transform: none !important; }
  .upk.open .upk-logo, .upk-mark, .upk-halo, .upk-ring, .upk.done .upk-mark, .upk.done .upk-halo, .upk.done .upk-ring, .upk-bar::after,
  .upk-steps li.now i, .upk-log li.new, .upk-log li:last-child .x::after { animation: none !important; }
  .upk-ring { display: none; }
  .upk-halo { opacity: .6; }
  .upd-spot, .upd-spot::before, .upd-spot-tag { transition-duration: .01s !important; }
  .upq, .upq-ring { transition-duration: .01s !important; }
  .upd-spot.on::after { animation: none !important; }
}
