/* talk.css — the craftsman's talk panel (lab, 22.10.2026). Desktop: a tall panel on the right, him at full height on the studio ground.
   Phone: a sheet from the bottom, his face by default. While it is open he has stepped out of the hero (body.talking hides the still). */
.talk { position: fixed; z-index: 80; right: 16px; top: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px)); display: flex; flex-direction: column;
  background: var(--studio); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 70px -30px rgba(30, 20, 14, .55);
  opacity: 0; transform: translateX(24px); transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1); overflow: hidden; }
.talk.in { opacity: 1; transform: none; }
.talk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 4px 18px; }
.talk-title { margin: 0; font: 400 21px/1.1 var(--display); font-variation-settings: "opsz" 30, "SOFT" 40, "WONK" 0; display: flex; align-items: center; gap: 10px; }
.talk-title .tag { font-size: 8.5px; color: var(--ink-3); border-color: var(--line); }
.talk-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 400 22px/1 var(--text); cursor: pointer; }
.talk-stage { position: relative; flex: 1 1 auto; min-height: 0; display: grid; place-items: center; margin: 0 12px; border-radius: 10px;
  background: radial-gradient(120% 70% at 50% 92%, var(--studio-hi), var(--studio) 70%); }
.talk-stage canvas { display: block; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.talk-stage canvas.floor { top: auto; bottom: 0; transform: translateX(-50%); }   /* full figure: smaller = still standing on the floor */
.talk-veil[hidden], .talk[hidden] { display: none; }
.talk-veil { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; color: var(--ink-3); font-size: 15px; }
.talk-lines { padding: 10px 18px 0; min-height: 4.6em; }
.talk-lines p { margin: 0 0 4px; font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.talk-lines span { font: 600 9.5px/1 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-right: 6px; }
.talk-lines q { quotes: none; }
.talk-lines q:empty::before { content: "…"; color: var(--ink-3); }
.talk-lines .him q { color: var(--ink); }
.talk-lines .you q { color: var(--ink-2); }
.talk-bar { display: flex; align-items: center; gap: 9px; padding: 8px 18px 0; }
.talk-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
.talk[data-state="live"] .talk-dot { background: #3E8A54; box-shadow: 0 0 0 4px rgba(62, 138, 84, .18); }
.talk[data-state="live"].speaking .talk-dot { background: var(--verm); box-shadow: 0 0 0 4px rgba(179, 48, 27, .16); }
.talk-state { flex: 1 1 auto; font-size: 14px; color: var(--ink-2); }
.talk .btn.small { padding: 8px 15px; font-size: 14px; min-height: 0; }
.talk-type { display: flex; gap: 8px; padding: 10px 18px 0; margin: 0; }
.talk-type input { flex: 1 1 auto; min-width: 0; font: 400 15px/1.2 var(--text); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; }
.talk-type input:focus-visible, .talk button:focus-visible { outline: 2px solid var(--verm); outline-offset: 2px; }
.talk-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 18px 0; }
/* the recorder (lab): Rec toggles it; Weird (or W) marks »a shape looked wrong just now« */
.talk .rec-tools { display: inline-flex; gap: 6px; }
.talk .seg1.rec::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--verm); margin-right: 6px; vertical-align: 0; }
.talk .seg1.rec[aria-pressed="true"] { background: var(--verm); color: var(--paper); border-color: var(--verm); }
.talk .seg1.rec[aria-pressed="true"]::before { background: var(--paper); animation: rec-blink 1s steps(2) infinite; }
.talk .seg1.mark { border-color: var(--verm); color: var(--verm); font-weight: 600; }
.talk .seg1.mark.hit { background: var(--verm); color: var(--paper); }
.talk .seg1.mark[hidden] { display: none; }
@keyframes rec-blink { 50% { opacity: .25; } }
/* the size slider (lab): how big he is on screen; the readout = his height and his mouth's width in screen px */
/* the slider gets the whole row, the readout its own line under it (beside it, the full view's long readout squeezed the slider to a dot
   on phones: 4 px wide at 360 px) */
.talk-size { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 3px; padding: 10px 18px 0; }
.talk-size label { flex: none; font: 600 9.5px/1 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.talk-size input { flex: 1 1 160px; min-width: 120px; margin: 0; accent-color: var(--verm); }
.talk-size output { flex: 1 0 100%; min-width: 0; font: 400 11px/1.2 var(--mono); color: var(--ink-2); }
.talk .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.talk .seg button, .talk .seg1 { font: 500 12.5px/1 var(--text); color: var(--ink-2); background: transparent; border: 0; padding: 8px 12px; cursor: pointer; }
.talk .seg1 { border: 1px solid var(--line); border-radius: 999px; }
.talk .seg button[aria-pressed="true"], .talk .seg1[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.talk-meta { margin: 0; padding: 8px 18px 12px; font: 400 11px/1.35 var(--mono); color: var(--ink-3); overflow-wrap: anywhere; }
body.talking #hero-maker { opacity: 0; transition: opacity .3s ease; }
body.talking #guide-home { opacity: 0; pointer-events: none; }
/* the corner (23.10): the maker in full body, centred on the capsule; talk.js sets his box (size = his frame height, the lab chip).
   Tap him = a live call right there; tap the capsule = the lab panel. »On«: he stands on the button (drawn over its top edge); »behind«:
   the button in front of his shins */
#guide-home .capsule { z-index: 3; cursor: pointer; }
#guide-home .maker-home { position: absolute; z-index: 4; left: 0; bottom: 42px; width: 102px; height: 240px; pointer-events: auto; cursor: pointer; }
#guide-home.behind .maker-home { z-index: 2; }
#guide-home .maker-home:focus-visible, #guide-home .capsule:focus-visible { outline: 2px solid var(--verm); outline-offset: 3px; }
/* during a call in the corner he stays, even where the page hides the corner (the hero in view), and the hero's still steps out */
#guide-home.call { opacity: 1; transform: none; pointer-events: auto; }
body.corner-call #hero-maker { opacity: 0; transition: opacity .3s ease; }
/* the lab chip: the corner maker's size + where he stands (bottom left, clear of the corner); hidden while the panel is open */
.corner-tool { position: fixed; z-index: 70; left: calc(10px + env(safe-area-inset-left, 0px)); bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: min(48vw, 250px); display: grid; gap: 7px; padding: 9px 10px 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 30px -18px rgba(30, 20, 14, .5); color: var(--ink-2); }
.corner-tool[hidden], .corner-show[hidden] { display: none; }
.corner-tool .ct-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.corner-tool label { flex: 1 1 auto; min-width: 0; font: 600 9.5px/1 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.corner-tool output { min-width: 0; font: 400 11px/1.25 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.corner-tool .ct-x { flex: none; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 400 16px/1 var(--text); cursor: pointer; }
.corner-tool input { width: 100%; margin: 0; height: 24px; accent-color: var(--verm); }
.corner-tool .seg { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.corner-tool .seg button { flex: 1 1 0; min-width: 0; font: 500 11.5px/1 var(--text); color: var(--ink-2); background: transparent; border: 0; padding: 7px 4px; cursor: pointer; white-space: nowrap; }
.corner-tool .seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.corner-tool .ct-sub { font: 600 9px/1 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 2px 0 -2px; }
.corner-tool .seg.rest { display: grid; grid-template-columns: 1fr 1fr; border-radius: 10px; }
.corner-tool .seg.rest button { padding: 7px 4px; }
.corner-tool .seg.rest button:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.corner-tool .seg.rest button:nth-child(odd) { border-right: 1px solid var(--line); }
.corner-tool button:focus-visible, .corner-show:focus-visible, .corner-tool input:focus-visible { outline: 2px solid var(--verm); outline-offset: 2px; }
.corner-show { position: fixed; z-index: 70; left: calc(10px + env(safe-area-inset-left, 0px)); bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  font: 500 12px/1 var(--text); color: var(--paper); background: var(--ink); border: 0; border-radius: 999px; padding: 9px 12px; cursor: pointer; }
body.talking .corner-tool, body.talking .corner-show { display: none; }
#guide-home .maker-home img, #guide-home .maker-home canvas { position: absolute; left: 0; top: 0; bottom: auto; width: 100%; height: 100%; }
#guide-home .maker-home canvas { opacity: 0; }
#guide-home .maker-home.drawn canvas { opacity: 1; }   /* »drawn«: the page's own .live class draws a hairline */
#guide-home .maker-home.drawn img { opacity: 0; }
@media (max-width: 759px) {
  .talk { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; height: min(86vh, 760px); transform: translateY(24px); }
  .talk-lines { min-height: 3.2em; }
  .talk-lines p { -webkit-line-clamp: 2; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .talk { transition: none; } }
#guide-home .maker-home.lean img { opacity: 0; }   /* the standing still would show stretched in the wider lean box before the lean still draws */
#guide-home .maker-front { position: absolute; z-index: 5; display: none; pointer-events: none; }   /* the lean's fingers + fan over the button's front (taps go to the button) */
body.talking #guide-home .maker-front, #guide-home.call:not(.climb) .maker-front { display: none !important; }   /* .climb: he climbs up / down in a call, his knees + hands over the button */
/* LIVE (17.11.2026, only on pages with <html data-vg-live>; talk.js cornerNote): the small line beside the corner = the page's voice
   notice while a call starts / runs, or why a call could not start. Its own fixed element (talk.js places it left of the capsule,
   bottom-aligned with it), so it is never over him (he stands on the capsule) nor over the capsule's words, and it shows even where the
   page hides the corner. */
.corner-note { position: fixed; z-index: 60; right: 180px; bottom: 14px; width: max-content; max-width: 250px;
  margin: 0; padding: 7px 10px 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 20px -14px rgba(30, 20, 14, .5);
  font: 400 12px/1.4 var(--text); color: var(--ink-2); text-align: left; text-wrap: pretty; }
.corner-note[hidden] { display: none; }
.corner-note a { color: inherit; }
