.team-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;align-items:start}.team-card,.team-empty{min-width:0;background:#fff;border:2px solid #354653;border-radius:22px;box-shadow:4px 4px 0 #e4e9ed;overflow:hidden}.team-card summary{display:flex;flex-direction:column;align-items:center;position:relative;padding:18px 18px 0;cursor:pointer;list-style:none;text-align:center}.team-card summary::-webkit-details-marker{display:none}.team-card summary:focus-visible{outline:3px solid #a37422;outline-offset:-5px;border-radius:20px}.team-office{align-self:flex-start;padding:5px 12px;font-size:14px;font-weight:800;border:1px solid #cadbd2;background:#eef8f2;border-radius:10px;line-height:1.4}.team-card:nth-child(3n+2) .team-office{background:#f2edfa;border-color:#ddd2ee}.team-card:nth-child(3n) .team-office{background:#fff8df;border-color:#eadcae}.team-avatar{display:grid;place-items:center;width:100%;height:222px;margin:8px 0 4px}.team-character{width:100%;height:222px;object-fit:contain;max-width:245px}.team-character[hidden]{display:none}.team-image-fallback{font-size:14px;color:#586e80;padding:30px}.team-image-fallback[hidden]{display:none}.team-nickname{font-size:26px;font-weight:850;line-height:1.25;color:#293947;overflow-wrap:anywhere}.team-fullname{font-size:13px;color:#536575;line-height:1.65;margin:7px 0 18px;max-width:27ch}.team-disclosure{display:flex;width:calc(100% + 36px);margin:0 -18px;justify-content:center;align-items:center;gap:14px;background:#fafbfc;border-top:1px solid #e0e6ea;padding:12px;font-size:13px;font-weight:700;color:#456458}.team-card .when-open{display:none}.team-card[open] .when-open{display:inline}.team-card[open] .when-closed{display:none}.team-card[open] .team-disclosure>span:last-child{transform:rotate(180deg)}.team-profile{padding:18px 20px;border-top:1px solid #dce5df;background:#fbfdfc;font-size:14px;line-height:1.65;text-align:left}.team-profile h3{font-size:14px;margin:0 0 7px}.team-profile p{margin:0 0 14px}.team-profile p:last-child{margin-bottom:0}.team-office-name{font-size:12px;color:#586e80;border-top:1px solid #e0e7e3;padding-top:12px}.team-source-note{font-size:12px;margin:0 0 20px}.team-empty{padding:24px;text-align:center;border-style:dashed;box-shadow:none;background:#fcfdfd}.team-empty h2{font-size:18px;line-height:1.5}.team-empty .tag{float:left}.team-empty-art{clear:both;padding:35px 0 20px;font-size:65px;color:#8cae9b}.team-no-results{grid-column:1/-1}.team-toolbar select{max-width:100%;min-width:0}.team-toolbar input{flex:1;min-width:200px}.team-card:hover .team-disclosure{background:#eef6f1}
@media(max-width:1100px){.team-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.team-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.team-card summary{padding:12px 10px 0}.team-avatar,.team-character{height:170px}.team-office{font-size:11px;padding:4px 8px}.team-nickname{font-size:23px}.team-fullname{font-size:12px;margin:6px 0 14px;min-height:40px}.team-disclosure{font-size:11px;width:calc(100% + 20px);margin:0 -10px;padding:11px 5px;gap:6px}.team-profile{padding:14px;font-size:13px}.team-grid .team-empty{padding:15px}.team-empty h2{font-size:15px}.team-empty-art{padding-top:25px}.team-toolbar input{min-width:0;flex-basis:100%}}@media(max-width:359px){.team-grid{grid-template-columns:1fr}.team-avatar,.team-character{height:210px}}@media print{.team-grid{grid-template-columns:repeat(3,1fr)}.team-card{break-inside:avoid;box-shadow:none}.team-character{height:150px}.team-avatar{height:150px}}

/* Match character height using a common260x320logical frame. Wider canvases
   include gesture space; their padding must not shrink the character on phones. */
.team-avatar{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);align-items:end}
.team-character{width:calc(100% * var(--team-frame-width,260) / 260 * var(--team-figure-scale,1));max-width:calc(245px * var(--team-frame-width,260) / 260 * var(--team-figure-scale,1));height:calc(222px * var(--team-figure-scale,1))}

@media(max-width:700px){.team-character{height:calc(170px * var(--team-figure-scale,1))}}
@media(max-width:359px){.team-character{height:calc(210px * var(--team-figure-scale,1))}}
@media print{.team-character{height:calc(150px * var(--team-figure-scale,1))}}

/* Portrait-first team gathering. Profile text is disclosed on selection. */
.team-grid{grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:0;align-items:start;padding:16px 20px;isolation:isolate}
.team-card{border:0;background:transparent;box-shadow:none;overflow:visible;position:relative;border-radius:24px}
.team-card summary{padding:16px 0 0;border-radius:24px;transition:background .2s ease}
.team-avatar{margin:0;height:210px;width:190px;max-width:none;transition:transform .3s ease,filter .3s ease}
.team-character{height:calc(210px * var(--team-figure-scale,1));pointer-events:none;mix-blend-mode:multiply}
.team-card summary:hover{background:#f0faf3}
.team-card{z-index:1}.team-card:focus-within{z-index:3}.team-card[open]{grid-column:span 2;z-index:5}
.team-card[open] summary{background:radial-gradient(ellipse at 50% 70%,#daf5e3,transparent 65%)}
.team-card[open] .team-avatar{transform:translateY(-16px) scale(1.12);filter:drop-shadow(0 12px 6px #17633425)}
.team-profile{position:relative;margin:4px 8px 16px;border:2px solid #287746;border-radius:22px;background:#fff;box-shadow:4px 6px 0 #dfefe3;padding:24px;animation:team-reveal .25s ease-out}
.team-profile .team-nickname{margin:0 32px 4px 0;font-size:26px}
.team-profile .team-fullname{max-width:none;margin:0 0 12px}
.team-profile .team-office{display:inline-block;margin-bottom:18px}
.team-close{position:absolute;right:10px;top:10px;min-width:44px;min-height:44px;border:0;border-radius:50%;background:#edf7ef;color:#174b2c;font-size:26px;cursor:pointer}
.team-close:focus-visible{outline:3px solid #176b36;outline-offset:2px}
.team-empty{margin:12px 8px;padding:18px;font-size:12px}
.team-empty-art{padding:10px;font-size:32px}
.team-empty h2{font-size:15px}
@keyframes team-reveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

@media(max-width:700px){.team-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:16px 12px}.team-avatar{height:180px;width:150px}.team-character{height:calc(180px * var(--team-figure-scale,1))}.team-profile{margin:4px 4px 14px;padding:20px}.team-card summary{padding:12px 0 0}}
@media(prefers-reduced-motion:reduce){.team-avatar,.team-card summary{transition:none}.team-profile{animation:none}.team-card[open] .team-avatar{transform:none}}
html:root .team-grid .team-card{background:transparent;box-shadow:none}
/* Blend white portrait canvases across neighboring stacking contexts. */
.team-grid .team-card{mix-blend-mode:multiply}
/* Keep overlapping artwork decorative; each person's own summary owns taps. */
.team-avatar{pointer-events:none}
@media(max-width:700px){
 .team-grid{padding:16px 18px}
 .team-avatar{width:calc(100% + 28px);max-width:150px}
 .team-card[open]{grid-column:1/-1}
 .team-profile{font-size:16px;line-height:1.6;overflow-wrap:anywhere;margin:8px 0 18px}
 .team-profile .team-fullname,.team-profile .team-office-name{font-size:14px}
 .team-profile .team-fullname{min-height:0}
 .team-profile h3{font-size:16px}
}
