.machine-cast{--cast-arc-offset:12px;display:flex;align-items:center;justify-content:center;gap:8px;height:130px;margin:0 auto 16px;width:min(360px,100%)}
.machine-avatar{display:block;width:100%;height:100%;overflow:visible;contain:layout style}
.cast-slot{position:relative;top:var(--cast-arc-offset);width:106px;height:106px;flex:none}.cast-slot:nth-child(2){top:calc(-1 * var(--cast-arc-offset));width:132px;height:132px}.cast-slot:nth-child(1){transform:rotate(-8deg)}.cast-slot:nth-child(3){transform:rotate(8deg)}
.cast-link{display:inline-block;color:#aaa;text-decoration:none;font-size:11px;letter-spacing:.04em;margin-bottom:26px;border-bottom:1px solid #555;padding:5px 1px}.cast-link:hover{color:#fff;border-color:#fff}
.avatar-studio{max-width:1200px;margin:auto;padding:38px 32px 64px}.studio-back{color:#aaa;text-decoration:none;font-size:14px}.studio-header{padding:52px 0 30px}.studio-header h1{font-size:clamp(40px,6vw,68px);margin:12px 0 18px}.studio-header p{color:#aaa;max-width:640px;line-height:1.6;font-size:18px}.studio-controls{display:flex;flex-wrap:wrap;align-items:end;gap:16px;padding:22px;background:#1e1e1e;border:1px solid #333;border-radius:22px;margin-bottom:28px}.studio-controls label{display:grid;gap:9px;font-size:12px;color:#aaa;flex:1;min-width:180px}.studio-controls select,.studio-controls button{font:inherit;color:#eee;background:#292929;border:1px solid #555;border-radius:12px;padding:12px 16px;min-height:46px}.studio-controls button{cursor:pointer;background:#eee;color:#171717;font-size:14px}.cast-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.avatar-card{margin:0;background:#1b1b1b;border:1px solid #303030;border-radius:24px;padding:18px;min-width:0}.avatar-card .portrait{height:180px;max-width:190px;margin:0 auto 14px}.avatar-card figcaption{display:flex;justify-content:space-between;gap:8px;color:#bbb;font-size:13px}.avatar-card figcaption strong{color:#f5f5f5;font-weight:500}.studio-note{font-size:13px;color:#999;line-height:1.6;margin-top:28px}.reduced-motion-note{display:none}.avatar-studio a:focus-visible,.avatar-studio select:focus-visible,.avatar-studio button:focus-visible,.cast-link:focus-visible{outline:2px solid #ffe332;outline-offset:5px}
@media(max-width:800px){.cast-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.avatar-card .portrait{height:150px}}
@media(max-width:600px){.machine-cast{--cast-arc-offset:9px;height:110px;gap:2px;margin-bottom:12px;width:290px}.cast-slot{width:88px;height:88px}.cast-slot:nth-child(2){width:108px;height:108px}.cast-link{margin-bottom:22px}.avatar-studio{padding:24px 18px 40px}.studio-header{padding-top:34px}.studio-header p{font-size:16px}.cast-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.avatar-card{padding:12px;border-radius:20px}.avatar-card .portrait{height:136px}.avatar-card figcaption{font-size:11px}.studio-controls{padding:18px;gap:14px}.studio-controls label{min-width:100%}.studio-controls button{width:100%}}
@media(prefers-reduced-motion:reduce){.reduced-motion-note{display:block}.cast-slot{transform:none!important}}

/* A right-aligned huddle keeps every character above the footer divider. */
.machine-footer{display:flex;flex-direction:column;align-items:stretch;gap:0;margin:48px 0 0;border-top:0;padding:0}
.machine-footer .footer-meta{display:flex;justify-content:space-between;align-items:center;gap:24px;border-top:1px solid var(--line);padding:28px 40px 30px;font-size:12px}
.machine-footer .footer-meta>span{font-weight:500;color:#d1d1d1;letter-spacing:.04em}
.machine-footer .footer-meta a{margin:0}
.footer-cast{order:-1;flex-shrink:0;position:relative;width:min(680px,calc(100% - 80px));aspect-ratio:2/1;margin:0 40px 24px auto;pointer-events:none}
.footer-cast-slot{position:absolute;left:var(--cluster-x);bottom:var(--cluster-y);width:var(--cluster-size,25%);aspect-ratio:1;transform:rotate(var(--lean,0deg))}
.footer-cast-slot:nth-child(1){--cluster-x:0%;--cluster-y:3%;--lean:-9deg}
.footer-cast-slot:nth-child(2){--cluster-x:14%;--cluster-y:43%;--lean:-12deg}
.footer-cast-slot:nth-child(3){--cluster-x:37%;--cluster-y:37%;--cluster-size:24%;--lean:8deg}
.footer-cast-slot:nth-child(4){--cluster-x:77%;--cluster-y:0%;--cluster-size:22%;--lean:9deg}
.footer-cast-slot:nth-child(5){--cluster-x:60%;--cluster-y:49%;--cluster-size:24%;--lean:18deg}
.footer-cast-slot:nth-child(6){--cluster-x:25%;--cluster-y:0%;--cluster-size:26%;--lean:-6deg}
.footer-cast-slot:nth-child(7){--cluster-x:51%;--cluster-y:0%;--cluster-size:27%;--lean:7deg}
@media(max-width:600px){.machine-footer{margin-top:32px}.machine-footer .footer-meta{padding:24px 20px 30px;gap:16px;flex-wrap:wrap}.footer-cast{width:calc(100% - 40px);margin-right:20px;margin-bottom:20px}}

/* Portraits follow the heading size and remain decorative within the disclosure. */
.branch-title{display:flex;align-items:center;gap:9px;width:100%;min-width:0}
.branch-name{min-width:0;overflow-wrap:anywhere}
.plugin-avatar{display:block;flex:0 0 1.25em;width:1.25em;height:1.25em;pointer-events:none}

.machine-root-title{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.root-avatar{display:block;flex:none;width:112px;height:112px;pointer-events:none}
@media(max-width:600px){.root-avatar{width:96px;height:96px}}

/* Every cast member has a shareable profile, with the same live portrait controls. */
.avatar-profile-link{display:flex;flex-direction:column;text-decoration:none;transition:background .2s,border-color .2s,transform .2s}
.avatar-profile-link:hover{background:#242424;border-color:#777;transform:translateY(-4px)}
.avatar-caption{display:flex;justify-content:space-between;gap:8px;font-size:13px;color:#aaa}
.avatar-caption strong{font-weight:500;color:#f5f5f5}
.avatar-role{color:#aaa;font-size:13px;line-height:1.5;margin:12px 0 20px}
.avatar-cta{display:flex;align-items:center;gap:8px;margin-top:auto;font-size:13px;color:#eee}
.studio-back{display:inline-flex;align-items:center;min-height:44px}
.profile-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:64px;margin:36px 0 48px;align-items:start}
.profile-stage{min-width:0;background:#1b1b1b;border:1px solid #333;border-radius:28px;padding:30px;text-align:center}
.profile-portrait{width:min(300px,100%);aspect-ratio:1;margin:0 auto 24px}
.profile-number{display:block;font-size:11px;letter-spacing:.12em;color:#aaa}
.profile-colors{min-width:0;border:0;margin:0 0 24px;padding:0}
.profile-colors legend{float:none;width:100%;padding:0;margin-bottom:10px;font-size:13px;color:#bbb;text-align:center}
.color-swatches{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.color-swatch{position:relative;display:grid;place-items:center;width:44px;height:44px;flex:none;cursor:pointer}
.color-swatch input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.color-swatch-chip{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;pointer-events:none}
.color-swatch input:checked+.color-swatch-chip{outline:2px solid #f5f5f5;outline-offset:4px}
.color-swatch input:checked+.color-swatch-chip:after{content:'✓';color:#19191b;font-size:20px;font-weight:700}
.color-swatch input:focus-visible+.color-swatch-chip{outline:3px solid #fff;outline-offset:4px;box-shadow:0 0 0 7px #141414,0 0 0 9px #fff}
.color-swatch:hover .color-swatch-chip{box-shadow:0 0 0 3px #ffffff40}
.profile-story{padding-top:16px;min-width:0}
.profile-story .eyebrow{color:var(--character-color);font-size:14px;line-height:1.5;margin:0 0 16px}
.profile-story h1{font-size:clamp(56px,7vw,88px);margin-bottom:24px;overflow-wrap:anywhere}
.profile-intro{font-size:clamp(22px,2.3vw,28px);line-height:1.3;letter-spacing:-.02em;margin:0 0 24px}
.profile-bio{font-size:17px;line-height:1.8;color:#bbb;margin:0}
.profile-story blockquote{font-size:21px;line-height:1.5;margin:30px 0;padding:4px 0 4px 22px;border-left:3px solid var(--character-color);color:var(--character-color)}
.profile-facts{margin:0;display:grid;gap:18px}
.profile-facts div{border-top:1px solid #333;padding-top:18px}
.profile-facts dt{font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:#aaa;margin-bottom:7px}
.profile-facts dd{font-size:15px;line-height:1.6;margin:0;color:#ddd}
.profile-playground{text-align:left;margin-top:28px;border-top:1px solid #333;padding-top:24px}
.profile-playground h2{font-weight:500;font-size:21px;letter-spacing:-.02em;margin:0 0 10px}
.profile-playground>p{font-size:14px;line-height:1.6;color:#aaa;margin:0 0 18px}
.profile-playground .studio-controls{padding:0;background:none;border:0;border-radius:0;margin:0;gap:14px}
.profile-playground .studio-controls label{min-width:100%}
.profile-playground .studio-controls select{width:100%;min-width:0;font-size:16px}
.profile-playground .studio-controls button{width:100%}
.profile-playground .reduced-motion-note{margin-top:18px}
.profile-nav{display:grid;grid-template-columns:1fr auto 1fr;gap:20px;border-top:1px solid #333;padding-top:24px;align-items:center}
.profile-nav a{display:flex;flex-direction:column;justify-content:center;text-decoration:none;gap:8px;min-height:60px;padding:8px 0}
.profile-nav a:hover{color:var(--character-color)}
.profile-nav a:last-child{text-align:right}
.profile-nav span{font-size:12px;color:#aaa}.profile-nav strong{font-size:20px;font-weight:500}
.profile-nav .profile-all{font-size:13px;color:#bbb;text-decoration:underline;text-underline-offset:5px}
@media(max-width:800px){.profile-layout{gap:28px}.profile-stage{padding:22px}.profile-portrait{max-width:230px}.profile-bio{font-size:16px}}
@media(max-width:600px){.avatar-caption{font-size:11px;flex-wrap:wrap}.avatar-role{font-size:12px}.profile-layout{grid-template-columns:minmax(0,1fr);gap:30px;margin-top:24px}.profile-stage{padding:24px}.profile-portrait{max-width:210px;margin-bottom:18px}.profile-story{padding-top:0}.profile-story h1{font-size:64px}.profile-nav{gap:12px}.profile-nav strong{font-size:18px}.profile-nav .profile-all{font-size:11px}.avatar-profile-link:hover{transform:none}}
@media(prefers-reduced-motion:reduce){.avatar-profile-link:hover{transform:none}}
@media(max-width:600px){.profile-story{display:contents}.profile-heading{grid-row:1}.profile-heading .eyebrow{color:var(--character-color);font-size:14px;line-height:1.5;margin:0 0 16px}.profile-heading h1{font-size:64px;margin-bottom:20px;overflow-wrap:anywhere}.profile-intro{margin-bottom:0}.profile-stage{grid-row:2}.profile-story blockquote{margin:0}}

/* Shared palette on cast panels and controls. */
.avatar-card,.profile-stage,.studio-controls{background:var(--surface);border-color:var(--line)}
.avatar-profile-link:hover{background:#222c40;border-color:var(--violet)}
.studio-controls select{background:#151b29;border-color:var(--line)}
.studio-controls button{background:var(--mint);color:#19191b;border-color:var(--mint)}
.studio-controls button:hover{background:#59ebc9}

/* The cast is a shared brand asset on every page. */
.brand-header .brand{gap:10px}
.brand-avatar{display:block;width:40px;height:40px;flex:0 0 40px}
.brand-nav{display:flex;align-items:center;gap:8px}
.brand-nav a{display:inline-flex;align-items:center;min-height:44px;padding:10px 14px;border-radius:100px;text-decoration:none;color:var(--muted);font-size:14px}
.brand-nav a:hover,.brand-nav a[aria-current=page]{background:var(--surface);color:var(--ink)}
.detail-avatar{display:block;width:76px;height:76px;margin:0 0 18px}
.machine-footer .footer-meta a{text-decoration:none;min-height:44px;display:inline-flex;align-items:center;gap:8px}
@media(max-width:760px){.contact-character{display:block;width:104px;height:104px;margin:22px 0 16px}}
@media(max-width:600px){.brand-header{flex-wrap:wrap;gap:8px;padding:18px 20px}.brand-header .brand{font-size:19px}.brand-avatar{width:34px;height:34px;flex-basis:34px}.brand-nav{gap:2px}.brand-nav a{font-size:12px;padding:10px}}
@media(max-width:420px){.brand-header .brand{font-size:18px;gap:6px}.brand-nav a{padding:10px 7px}.brand-header{column-gap:4px;padding-inline:16px}}
