/* #anywhere: where each shot's app sits (app px in a 700 x 438 canvas, 380 x 475 on phones) and the
   parts the rows add. Also the two pieces #models shares: Settings panes (.set-*, .dev-*) as the app
   draws them, and the flat wiring diagrams (.dg-*). The look of a shot lives in features.css. */

/* ---- shared: Settings panes, as app/src/overlays/settings draws them ---- */
.shot .set-win .pui-set { box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-top-color: rgba(255, 255, 255, 0.15); }
.shot .pui-set section { gap: 0; overflow: hidden; }
.shot .pui-set h4 { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.shot [hidden] { display: none !important; }
.set-kv { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 40px; border-bottom: 1px solid var(--line); color: var(--fg); }
.set-v { color: var(--fg-2); }
.set-sel { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel); color: var(--fg); }
.set-sel svg { width: 11px; height: 11px; color: var(--fg-3); }
.pui .set-btn { min-height: 28px; padding: 4px 11px; display: inline-flex; align-items: center; }
.pui .set-dis { opacity: 0.45; }
.dev-head { font: 500 12px var(--font-ui); color: var(--fg-3); padding: 16px 0 8px; }
.dev-note { margin: 0; color: var(--fg-3); padding: 6px 0; }
.dev-actions { display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.dev-mono { font: 400 11.5px var(--font-mono); }
.dev-item { display: flex; align-items: center; gap: 12px; min-height: 48px; border-top: 1px solid var(--line); color: var(--fg); }
.dev-grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dev-sub { color: var(--fg-3); font-size: 12px; }
.dev-reach { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); font-size: 12px; }
.dev-reach svg { width: 10px; height: 10px; color: var(--s-working); }
.dev-scope { border: 0; margin: 0 0 4px; padding: 0 0 10px 2px; display: flex; flex-direction: column; gap: 4px; }
.dev-scope legend { padding: 0 0 6px; float: left; width: 100%; }
.dev-scope label { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; min-height: 28px; }
.dev-scope label > span:nth-child(2) { color: var(--fg); white-space: nowrap; }
.dev-scope .dev-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-pair { display: flex; gap: 20px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.dev-qr { flex: none; width: 150px; height: 150px; border-radius: 6px; }
.dev-qr-bg { fill: var(--raise); }
.dev-qr-mod { fill: var(--fg); }
.dev-pair-side { display: flex; flex-direction: column; gap: 9px; min-width: 0; flex: 1; }
.dev-code { font: 500 30px/1.1 var(--font-mono); letter-spacing: 0.04em; color: var(--fg); font-variant-numeric: tabular-nums; }
.dev-count { color: var(--fg-3); font-variant-numeric: tabular-nums; }
.dev-payload { display: block; padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 6px; font: 400 11.5px/1.5 var(--font-mono); color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-form { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.set-fr { display: flex; align-items: center; gap: 12px; color: var(--fg); }
.set-fr > span:first-child { min-width: 90px; color: var(--fg-2); }
.set-fr--top { align-items: flex-start; }
.set-port { width: 90px; font-family: var(--font-mono); }
.dev-checks { display: flex; flex-direction: column; gap: 6px; }
.dev-checks label { display: flex; align-items: center; gap: 9px; }
.pui-field.focus .ph { display: none; }

/* ---- shared: flat wiring diagrams, drawn with the app's own cards ---- */
.dg { position: absolute; left: 0; top: 0; }
.dg-lg { width: 700px; height: 438px; }
.dg-sm { width: 380px; height: 475px; display: none; }
.sm > .pui-stage .dg-lg { display: none; }
.sm > .pui-stage .dg-sm { display: block; }
.dg-svg { position: absolute; inset: 0; overflow: visible; }
.dg-w { fill: none; stroke: rgba(228, 229, 232, 0.17); stroke-width: 1.5; transition: stroke 500ms var(--ease), opacity 500ms var(--ease); }
.dg-w.lit { stroke: color-mix(in srgb, var(--s-working) 85%, transparent); stroke-width: 2; }
.dg-w.dg-alt { stroke-dasharray: 3 6; }
.dg-w.dg-alt.lit { stroke: color-mix(in srgb, var(--s-paused) 80%, transparent); stroke-dasharray: none; }
.dg-w.fail { stroke: rgba(217, 109, 109, 0.75); stroke-dasharray: 6 7; }
.dg-pk { fill: #e4e5e8; opacity: 0; transition: opacity 300ms var(--ease); }
.dg-pk.on { opacity: 1; }
.dg-pk.no { fill: #e58a8a; }
.dg-node {
  position: absolute; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 16px;
  border-radius: 9px; background: var(--raise); border: 1px solid var(--line-2);
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 400ms var(--ease);
}
.dg-node b { display: flex; align-items: center; font-weight: 500; font-size: 14px; color: var(--fg); white-space: nowrap; }
.dg-node span { font-size: 12px; color: var(--fg-3); white-space: nowrap; transition: color 400ms var(--ease); }
.dg-node .pui-tag { font-size: 11px; }
.dg-node.lit { border-color: color-mix(in srgb, var(--s-working) 75%, transparent); }
.dg-node.no { border-color: rgba(217, 109, 109, 0.8); }
.dg-node.relay-on { border-color: color-mix(in srgb, var(--s-paused) 75%, transparent); }
.dg-relay { border-style: dashed; }
.dg-gw { align-items: center; text-align: center; gap: 7px; border-color: rgba(228, 229, 232, 0.26); }
.dg-gw b { font-size: 15.5px; }
.dg-gw .mono { font: 400 13px var(--font-mono); color: var(--fg-2); }
.dg-sub { font-size: 12px; }
.dg-log { font: 400 11.5px var(--font-mono) !important; color: var(--fg-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.dg-log.in { color: var(--fg-2) !important; }
.dg-chip {
  position: absolute; padding: 8px 12px; border-radius: 7px; background: var(--raise); border: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--fg-2); white-space: nowrap; box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.6);
}
.dg-chip b { color: #e58a8a; font: 500 13px var(--font-mono); margin-right: 4px; }
.dg-x { position: absolute; width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center; background: var(--raise); border: 1px solid rgba(217, 109, 109, 0.7); color: #e58a8a; }
.dg-x svg { width: 12px; height: 12px; }

/* ---- the phone, as mobile/src draws it ---- */
.any-ph .hd small { font-variant-numeric: tabular-nums; }
.any-ph .tb { align-items: center; }
.any-gear { display: inline-flex; color: var(--fg-3); }
.any-gear svg { width: 16px; height: 16px; }
.any-scr { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.any-ph .pui-mq { flex: none; gap: 9px; }
.any-ph .pui-mq .r1 .ic { color: var(--s-needs); width: 13px; height: 13px; }
.any-ph .pui-mq .q { color: var(--fg); font-size: 13.5px; }
.any-col { border: 0 !important; background: transparent !important; border-radius: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 12px 6px !important; }
.any-col .q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--fg-2) !important; }
.any-cmd { margin-left: 21px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--ground); font: 400 11.5px/1.5 var(--font-mono); color: var(--fg-2); }
.any-meta { font-size: 12px; color: var(--fg-3); }
.any-acts { display: flex; flex-direction: column; gap: 8px; }
.any-acts:empty { display: none; }
.any-pair-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.any-acts .pui-btn { display: flex; align-items: center; justify-content: center; }
.any-acts .pui-btn.primary { color: var(--accent-fg); }
.pui .any-quiet { background: transparent; color: var(--fg-2); }
.any-reply { display: flex; justify-content: space-between; align-items: center; min-height: 40px; border-radius: 10px; padding: 0 14px; font-size: 13px; }
.any-send { color: var(--fg-3); font-size: 12.5px; }
.any-empty { margin: 30px 0 0; text-align: center; color: var(--fg-3); font-size: 13.5px; }
.any-ph .pui-mq { transition: opacity 450ms var(--ease), transform 450ms var(--ease); }
.any-ph .pui-mq.gone { opacity: 0; transform: translateX(40px); }
.any-ph .pui-mq.arrive { opacity: 0; transform: translateY(-8px); }
.any-list { gap: 0 !important; padding: 0 18px !important; }
.any-host-h { font: 600 14px var(--font-ui); color: var(--fg); padding: 4px 0 8px; }
.any-repo { font-size: 12.5px; color: var(--fg-3); padding: 10px 0 4px; }
.any-li { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--fg); transition: background-color 200ms var(--ease); }
.any-li .ic { width: 14px; height: 14px; }
.any-li .any-nm { display: flex; flex-direction: column; gap: 2px; }
.any-li .any-nm i { font-style: normal; font-size: 12.5px; color: var(--fg-3); }
.any-age { margin-left: auto; color: var(--fg-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.any-li.press { background: var(--sel); }
.any-tvh { display: flex !important; align-items: center !important; gap: 10px !important; font-size: 17px !important; }
.any-tvh .ic { width: 14px; height: 14px; }
.any-back { font: 400 13.5px var(--font-ui); color: var(--accent); margin-right: 4px; }
.any-tv .pui-term { flex: 1; margin: 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel); font-size: 11.5px; white-space: pre; }
.any-tvr { margin: 10px 12px 10px; }

/* the desktop window with one tile */
.any-one { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }

/* 1 your phone, paired: the phone in front, the studio window behind it running off the right edge */
#anywhere-phone .any-desk { --x: 318px; --y: 62px; --w: 640px; --h: 470px; }
#anywhere-phone .any-ph { left: 48px; top: 30px; }
.shot[data-shot='phone'] .shot-light { --lx: 28%; --ly: 38%; }
.sm > #anywhere-phone .any-desk { display: none; }
.sm > #anywhere-phone .any-ph { left: 40px; top: 36px; }

/* 2 answer with a tap: the phone centred, the queue at the panel's middle */
#anywhere-answer .any-ph { left: 200px; top: -34px; }
.shot[data-shot='answer'] .shot-light { --lx: 50%; --ly: 42%; }
.sm > #anywhere-answer .any-ph { left: 40px; top: -26px; }

/* 3 three screens: three phones in a row, the outer two cut by the panel */
#anywhere-screens .any-ph-q { left: -66px; top: 44px; }
#anywhere-screens .any-ph-i { left: 200px; top: 26px; }
#anywhere-screens .any-ph-t { left: 466px; top: 44px; }
.shot[data-shot='screens'] .shot-light { --lx: 50%; --ly: 40%; }
/* the side phones fall back into the shadow, so the eye goes to the middle one */
#anywhere-screens .any-ph-q, #anywhere-screens .any-ph-t { filter: brightness(0.6) saturate(0.8); }
.sm > #anywhere-screens .any-ph-q, .sm > #anywhere-screens .any-ph-t { display: none; }
.sm > #anywhere-screens .any-ph-i { left: 40px; top: 30px; }

/* 4-7 Settings, Devices: the whole nav shows; the pane runs off the panel's right and bottom edges.
   On phones the nav sits just off the left edge and the pane fills the frame. */
.shot .set-win { --x: 48px; --w: 660px; --h: 560px; }
.any-set-pair { --y: 30px; }
.any-set-scope { --y: 40px; }
.any-set-port { --y: 36px; }
.shot[data-shot='pair'] .shot-light { --lx: 52%; --ly: 66%; }
.shot[data-shot='scopes'] .shot-light { --lx: 46%; --ly: 52%; }
.shot[data-shot='port'] .shot-light { --lx: 40%; --ly: 54%; }
.sm > .pui-stage .set-win { --x: -170px; --w: 560px; }
.sm > #anywhere-pair .set-win { --y: 26px; }
.sm > .pui-stage .dev-pair { flex-direction: column; gap: 12px; }
.sm > .pui-stage .dev-scope .dev-sub { display: none; }

/* 5 the mesh */
.any-mesh .dg-x { left: 458px; top: 143px; }
.dg-sm.any-mesh .dg-x { left: 246px; top: 131px; }
.shot[data-shot='mesh'] .shot-light { --lx: 50%; --ly: 50%; }

@media (prefers-reduced-motion: reduce) { .any-ph .pui-mq, .dg-w, .dg-node, .dg-pk { transition: none; } }

/* diagram node positions (generated with the page markup) */
#anywhere-mesh .dg-lg [data-n="studio"] { left: 250px; top: 40px; width: 200px; height: 70px; }
#anywhere-mesh .dg-lg [data-n="laptop"] { left: 34px; top: 200px; width: 200px; height: 70px; }
#anywhere-mesh .dg-lg [data-n="phone"] { left: 466px; top: 200px; width: 200px; height: 70px; }
#anywhere-mesh .dg-lg [data-n="relay"] { left: 250px; top: 338px; width: 200px; height: 70px; }
#anywhere-mesh .dg-sm [data-n="studio"] { left: 90px; top: 30px; width: 200px; height: 66px; }
#anywhere-mesh .dg-sm [data-n="laptop"] { left: 14px; top: 190px; width: 160px; height: 66px; }
#anywhere-mesh .dg-sm [data-n="phone"] { left: 206px; top: 190px; width: 160px; height: 66px; }
#anywhere-mesh .dg-sm [data-n="relay"] { left: 90px; top: 360px; width: 200px; height: 66px; }
