/* A little companion, watching a real gallery inside its desktop screen. */
.template-library{position:relative;height:860px;isolation:isolate;overflow:hidden;background:#f6c7b5;scroll-margin-top:20px;color:var(--ink)}
.template-library:before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(115deg,#fff3e6a6,transparent 65%),linear-gradient(0deg,#fff0e3a1,transparent 35%);z-index:-1}
.template-sun{position:absolute;width:510px;aspect-ratio:1;left:13%;top:66px;border-radius:50%;background:#e0edaa;opacity:.85;z-index:-1}
.template-copy{position:absolute;left:6%;bottom:65px;z-index:5}
.template-copy h2{font-size:clamp(38px,3.7vw,57px);line-height:1.25;letter-spacing:-.055em;font-weight:800;margin:0 0 26px}
.template-copy .button{box-shadow:none;min-height:48px;padding:13px 26px}
.template-computer{position:absolute;width:57%;right:4%;bottom:185px;z-index:2}
.template-monitor{border:10px solid var(--ink);border-bottom-width:0;border-radius:27px;overflow:hidden;background:var(--ink);box-shadow:13px 14px 0 #35213e1c}
.template-wall{position:relative;overflow:hidden;background:#efe6d8;aspect-ratio:1.67}
.template-screen-shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(0deg,#34253b99,transparent 23%,transparent 76%,#34253b66),linear-gradient(110deg,#fff5e134,transparent 54%);box-shadow:inset 0 0 32px #35213e25;z-index:2}
.template-chin{height:37px;display:flex;align-items:center;justify-content:center;background:var(--ink);color:#f7d9b6;position:relative}
.template-chin svg{width:18px;height:18px;opacity:.75}.template-chin i{width:5px;height:5px;border-radius:50%;background:var(--lime);position:absolute;right:20px}
.template-stand{height:65px;width:19%;margin:auto;background:#bda7a9;border:4px solid var(--ink);border-top:0;clip-path:polygon(12% 0,88% 0,100% 100%,0 100%)}
.template-base{height:16px;width:35%;margin:auto;background:#efded4;border:4px solid var(--ink);border-radius:60% 60% 6px 6px}
.template-desk{position:absolute;bottom:178px;left:34%;right:-2%;height:9px;border-radius:8px;background:var(--ink);box-shadow:0 16px 0 #35213e09;z-index:1}
.template-cat{height:auto;position:absolute;width:clamp(280px,25vw,375px);left:27%;bottom:179px;z-index:3;overflow:visible}
.template-cat img{display:block;width:100%;height:auto;filter:drop-shadow(0 9px 4px #35213e16);transform-origin:50% 100%;animation:template-breathe 5s ease-in-out infinite;animation-play-state:paused}
.template-library.is-playing .template-cat img{animation-play-state:running}
@keyframes template-breathe{0%,100%{transform:scaleY(1)}50%{transform:scaleY(1.012)}}
.template-belt{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;position:absolute;left:-3%;top:-110px;width:110%;transform:rotate(-8deg);transform-origin:50% 40%}
.template-track{display:flex;flex-direction:column;animation:template-rise 34s linear infinite;animation-play-state:paused;will-change:transform}
.template-column:nth-child(2) .template-track{animation-duration:40s;animation-direction:reverse;animation-delay:-13s}
.template-column:nth-child(3) .template-track{animation-duration:31s;animation-delay:-7s}
.template-group{display:flex;flex-direction:column;gap:14px;padding-bottom:14px}
.template-card{display:block;position:relative;width:100%;padding:12px 4px;border-radius:14px;background:var(--card-tone);color:var(--ink);overflow:hidden;box-shadow:0 2px 0 #35213e10}
.template-card img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain}
.template-card:focus-visible{outline-offset:-4px;outline-width:3px}
.template-wall[data-running="true"] .template-track{animation-play-state:running}
@keyframes template-rise{from{transform:translateY(0)}to{transform:translateY(-50%)}}
.template-dialog{width:min(780px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:0;border-radius:22px;background:var(--cream);color:var(--ink);overflow:auto;box-shadow:0 22px 90px #160d2355}
.template-dialog::backdrop{background:#24142ddb;backdrop-filter:blur(7px)}
.template-dialog[open]{animation:template-open .24s cubic-bezier(.2,.8,.2,1)}
@keyframes template-open{from{opacity:0;transform:translateY(15px) scale(.98)}to{opacity:1;transform:none}}
.template-dialog-top,.template-dialog-bottom{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:20px 28px}
.template-dialog-top{font-size:14px}.template-close,.template-paging button{color:var(--ink);background:transparent;padding:11px 16px;min-height:44px;border:1px solid #35213e3d;border-radius:24px;font-size:14px}
.template-close:hover,.template-paging button:hover{background:var(--lime)}
.template-preview{background:var(--preview-tone);padding:12px 20px;transition:background .2s}
.template-preview-image{display:block;width:100%;height:auto;max-height:58dvh;object-fit:contain}
.template-dialog h3{font-size:25px;margin:0 0 6px}.template-position{font:13px Consolas,monospace}.template-paging{display:flex;gap:10px}

.template-library.is-static .template-wall{overflow:auto}
.template-library.is-static .template-belt{position:relative;left:auto;top:auto;width:auto;padding:16px;transform:none;align-items:start}
.template-library.is-static .template-track{animation:none;transform:none;will-change:auto}
.template-library.is-static [data-clone]{display:none}
.template-library.is-static .template-screen-shade{display:none}
.template-library.is-static .template-cat img{animation:none}
@media(min-width:1600px){.template-library{height:960px}.template-computer{width:55%;max-width:1080px}.template-cat{left:30%}}
@media(max-width:1100px){.template-library{height:760px}.template-computer{width:64%;right:3%;bottom:235px}.template-cat{left:17%;bottom:229px;width:300px}.template-desk{left:24%;bottom:228px}.template-sun{width:440px;left:3%;top:55px}.template-copy{bottom:52px}.template-copy h2{font-size:43px;margin-bottom:20px}}
@media(max-width:700px){.template-library{height:790px}.template-computer{width:88%;right:5%;bottom:355px}.template-monitor{border-width:7px;border-bottom-width:0;border-radius:18px}.template-wall{aspect-ratio:1.3}.template-chin{height:25px}.template-chin svg{width:14px;height:14px}.template-stand{height:42px;border-width:3px}.template-base{height:12px;border-width:3px;width:38%}.template-desk{left:8%;right:-2%;bottom:348px;height:6px}.template-cat{width:215px;left:auto;right:2%;bottom:245px;transform:scaleX(-1)}.template-sun{width:360px;left:-115px;top:210px}.template-copy{left:7%;bottom:48px}.template-copy h2{font-size:38px;margin-bottom:20px}.template-belt{gap:9px;width:120%;left:-9%;top:-95px}.template-group{gap:9px;padding-bottom:9px}.template-card{padding:8px 0;border-radius:10px}.template-dialog-top,.template-dialog-bottom{padding:16px 20px}.template-dialog h3{font-size:22px}.template-preview{padding:15px 0}.template-paging{gap:5px}.template-paging button{padding:10px 13px}.template-library.is-static .template-belt{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px}.template-library.is-static .template-column:last-child{grid-column:1/-1}.template-library.is-static .template-column:last-child .template-group{display:grid;grid-template-columns:1fr 1fr}}
@media(max-width:380px){.template-library{height:750px}.template-copy h2{font-size:33px}.template-cat{width:195px}.template-dialog-bottom{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.template-dialog,.template-preview{animation:none!important;transition:none!important}}
