.creature-game{color:var(--ink,#452453);padding:clamp(12px,2.4vw,32px);max-width:1320px;margin:auto}.hbt-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:22px}.hbt-heading h1{font-size:clamp(26px,3.3vw,44px);line-height:1.1;margin:8px 0 12px}.hbt-heading p{margin:0}.hbt-heading .tiny{letter-spacing:.16em;font-size:11px}.hbt-heading button{flex-shrink:0;display:flex;gap:10px;align-items:center}.hbt-heading [data-count]{white-space:nowrap}.hbt-workshop{display:grid;grid-template-columns:minmax(280px,1fr) minmax(330px,1fr);gap:24px;align-items:stretch}.hbt-stage{position:relative;isolation:isolate;overflow:hidden;border:1px solid #d7d5bd;border-radius:28px;background:radial-gradient(ellipse at 45% 35%,#fffbe9 5%,#e4f1e2 48%,#b8d7bd 100%);min-height:420px;display:grid;place-items:center}.hbt-stage:before,.hbt-stage:after{content:'';position:absolute;z-index:-1;bottom:-35%;width:100%;height:65%;border-radius:50%;background:#90bfa2;transform:rotate(15deg);left:-35%}.hbt-stage:after{left:45%;background:#b6cea1;transform:rotate(-22deg)}.hbt-stage canvas{width:auto;max-width:100%;height:clamp(380px,39vw,560px);object-fit:contain;position:relative;z-index:2;filter:drop-shadow(0 10px 9px #47724a25)}.hbt-stage-ground{position:absolute;width:65%;height:7%;bottom:7%;border-radius:50%;background:#8fa97855}.hbt-stars{position:absolute;inset:22px 0 auto;text-align:center;font-size:24px;color:#b89c45;letter-spacing:80px;padding-left:80px}.hbt-stars span{font-size:16px}.hbt-creature-caption{position:absolute;bottom:9px;font-size:12px;color:#49684e;z-index:3;margin:0}.hbt-selector{border:1px solid #e2d4e7;border-radius:24px;background:#fffdf8;overflow:hidden;display:flex;flex-direction:column;min-width:0}.hbt-tabs{display:grid;grid-template-columns:repeat(4,1fr);padding:10px;gap:6px;border-bottom:1px solid #e8deed;background:#f6edf6}.hbt-tabs button{border:0;border-radius:13px;background:transparent;padding:14px 6px;color:#63446e;font:inherit;font-weight:700;cursor:pointer;min-height:48px}.hbt-tabs button[aria-selected=true]{background:#5d376d;color:#fff}.hbt-parts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-content:start;gap:10px;padding:16px;overflow:auto;height:clamp(360px,39vw,550px);scrollbar-color:#b7a3c0 #f6edf6}.hbt-part{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:130px;padding:8px 5px;border:2px solid transparent;border-radius:18px;background:#f7f1f8;color:#51315c;font:inherit;font-size:12px;font-weight:600;cursor:pointer}.hbt-part img{width:100%;height:90px;object-fit:contain;transition:transform .18s}.hbt-part:hover img{transform:scale(1.05)}.hbt-part[aria-pressed=true]{background:#fff3c9;border-color:#b88d2e}.hbt-part:focus-visible,.hbt-tabs button:focus-visible{outline:3px solid #86589b;outline-offset:2px}.hbt-actions{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-top:22px}.hbt-name{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700;flex:1;min-width:200px}.hbt-name input{font:inherit;font-size:17px;color:#452453;border:1px solid #c9b3d3;border-radius:12px;background:#fffdf8;min-height:48px;padding:10px 14px;width:100%;box-sizing:border-box}.hbt-actions .ui-button{min-height:48px}.hbt-status{font-size:14px;min-height:1.5em;margin:14px 0 0}.hbt-dialog{box-sizing:border-box;background:#fffbf4;color:#452453;border:1px solid #d4bddb;border-radius:24px;width:min(1050px,94vw);max-height:88dvh;padding:clamp(16px,3vw,32px)}.hbt-dialog::backdrop{background:#2c153caa;backdrop-filter:blur(4px)}.hbt-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:14px}.hbt-dialog h2{margin:0;font-size:26px}.hbt-dialog-content{margin-top:18px}.hbt-saved-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px}.hbt-saved{padding:14px;border-radius:18px;background:#f3eaf5;text-align:center;min-width:0}.hbt-saved canvas{width:100%;height:190px;object-fit:contain}.hbt-saved h3{font-size:16px;overflow-wrap:anywhere;margin:6px 0 12px}.hbt-saved>div{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}.hbt-saved .ui-button{font-size:12px;min-height:40px;padding:8px 10px}
@media(max-width:760px){.hbt-heading{align-items:flex-start}.hbt-heading button{font-size:12px;display:block;padding:10px}.hbt-heading [data-count]{display:block;margin-top:5px}.hbt-workshop{grid-template-columns:1fr;gap:14px}.hbt-stage{min-height:0;height:clamp(260px,39dvh,390px)}.hbt-stage canvas{position:absolute;inset:10px 10px 26px;width:calc(100% - 20px);height:calc(100% - 36px);max-height:none}.hbt-parts{grid-template-columns:repeat(4,minmax(0,1fr));height:185px;padding:10px;gap:6px}.hbt-part{min-height:100px;font-size:10px}.hbt-part img{height:66px}.hbt-tabs button{padding:10px 5px}.hbt-actions{gap:8px;margin-top:14px}.hbt-name{flex-basis:100%}.hbt-actions .ui-button{flex:1;font-size:12px;padding:10px 8px}.hbt-heading h1{font-size:26px}.hbt-heading p:not(.tiny){font-size:13px}.hbt-stars{font-size:16px;top:12px}.hbt-creature-caption{font-size:10px}.hbt-saved-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.hbt-part img{transition:none}}

/* Workshop copy sits on the shared purple shell; cards keep their own ink colors. */
.hbt-heading,.hbt-name,.hbt-status{color:#fff8e5}

@media(max-width:760px){.hbt-actions .ui-picture-button{flex:1;min-width:0;padding-inline:8px}}

.hbt-simple-preview{display:block;width:100%;height:90px;border-radius:10px;background:radial-gradient(ellipse at 45% 35%,#fffbe9,#e4f1e2 48%,#b8d7bd)}
/* The phone workshop fills the viewport; only the part strip scrolls horizontally. */
@media(max-width:760px){
 body[data-reader]:has(#creature-game) .reader-top{display:none!important}
 body[data-reader]:has(#creature-game) .shell{padding:0;min-height:100dvh}
 body[data-reader]:has(#creature-game) .frame{max-width:none}
 .creature-game:has(#creature-game){height:100dvh;max-width:none;margin:0;padding:calc(16px + env(safe-area-inset-top)) 8px 8px;display:flex;flex-direction:column;overflow:hidden;gap:6px}
 #creature-game{display:flex;flex-direction:column;flex:1;min-height:0}
 .workshop-back{align-self:flex-start;min-height:34px;margin:0;padding:6px 12px;font-size:12px}
 .hbt-heading{gap:8px;margin:0 0 6px;min-height:42px;align-items:center}
 .hbt-heading h1{font-size:20px;line-height:1.1;margin:0}
 .hbt-heading p{display:none}
 .hbt-heading button{min-height:38px;padding:5px 8px;font-size:11px}
 .hbt-heading [data-count]{margin:2px 0 0}
 .hbt-workshop{flex:1;min-height:0;display:flex;flex-direction:column;gap:6px}
 .hbt-stage{flex:1;min-height:80px;height:auto;border-radius:20px}
 .hbt-selector{flex:none;border-radius:16px}
 .hbt-tabs{padding:4px;gap:2px}
 .hbt-tabs button{min-height:36px;padding:4px 2px;font-size:11px;border-radius:10px}
 .hbt-parts{display:flex;align-items:stretch;height:82px;padding:5px;gap:5px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity}
 .hbt-part{display:grid;grid-template-rows:38px 20px;gap:2px;flex:0 0 86px;min-height:70px;max-height:70px;padding:3px;font-size:9px;border-radius:10px;scroll-snap-align:start}
 .hbt-part img,.hbt-simple-preview{height:38px;min-height:38px;flex-shrink:0;object-fit:contain}
 .hbt-part>span:last-child{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-height:20px;line-height:10px;width:100%;text-align:center}
 .hbt-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:5px;margin-top:6px}
 .hbt-name{grid-column:1/-1;min-width:0;gap:0;font-size:0}
 .hbt-name input{min-height:34px;height:34px;padding:5px 10px;font-size:14px;border-radius:10px}
 .hbt-actions .ui-picture-button{min-height:44px;padding:3px;grid-template-rows:22px auto;gap:2px;font-size:clamp(9px,2.65vw,11px);border-radius:12px}
 .hbt-actions .ui-picture-button>span:last-child{white-space:nowrap}
 .hbt-actions .navicon{width:22px;height:20px}.hbt-actions .ui-icon{width:21px;height:21px}
 .hbt-status{font-size:11px;margin:5px 0 0;min-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body:has(#creature-game) .local-review-badge{display:none!important}
}

@media(max-width:760px){.hbt-actions{grid-template-columns:repeat(4,minmax(0,1fr))}.hbt-heading{min-height:32px}.hbt-stage canvas{bottom:10px;height:calc(100% - 20px)}}
.hbt-parts{scrollbar-width:none;-ms-overflow-style:none;touch-action:pan-y;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
@media(max-width:760px){.hbt-parts{touch-action:pan-x;overscroll-behavior-x:contain;overscroll-behavior-y:auto}}.hbt-parts::-webkit-scrollbar{display:none}

.hbt-part .hbt-head-preview{width:100%;height:90px;object-fit:contain}
@media(max-width:760px){.hbt-part .hbt-head-preview{height:38px;min-height:38px}}

.hbt-custom-head-banner{margin:12px 0 0;padding:10px 14px;border:1px solid #dfc394;border-radius:12px;background:#fff3d8;color:#603b71;font-size:13px;line-height:1.4;text-align:center}.hbt-custom-head-banner[hidden]{display:none}
@media(max-width:760px){.hbt-custom-head-banner{flex:none;margin:5px 0 0;padding:6px 9px;font-size:11px;line-height:1.3}.workshop-back .ui-icon{width:17px;height:17px}}

.hbt-custom-head-banner{display:flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}.hbt-custom-head-banner>.ui-icon{width:20px;height:20px;flex:none}.hbt-support-link{text-decoration:underline;text-underline-offset:3px;font-weight:700}.hbt-custom-head-banner:hover{background:#ffedbc}.hbt-custom-head-banner:focus-visible{outline:3px solid #ffd55e;outline-offset:3px}
/* Keep every thumbnail on the same baseline regardless of label wrapping. */
.hbt-part{display:grid;grid-template-rows:90px 32px;align-content:center;gap:4px}
.hbt-part>span:last-child{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:32px;max-height:32px;line-height:16px;width:100%;text-align:center}
@media(max-width:760px){.hbt-part{grid-template-rows:38px 20px;gap:2px}.hbt-part>span:last-child{min-height:20px;max-height:20px;line-height:10px}}

/* The tablet/desktop grid scrolls inside the selector; tabs stay outside it. */
@media(min-width:761px){.hbt-selector{min-height:0}.hbt-part-scroller{min-height:0;overflow:hidden}.hbt-parts{overflow-x:hidden;overflow-y:auto}}

.hbt-custom-heads-title{grid-column:1/-1;margin:8px 0 0;padding:12px 0 2px;border-top:1px solid #dfcfe5;color:#63446e;font-size:14px;line-height:1.3;font-weight:700}
@media(max-width:760px){.hbt-custom-heads-title{display:flex;align-items:center;flex:0 0 64px;margin:0 3px 0 8px;padding:6px 8px;border-top:0;border-left:1px solid #dfcfe5;font-size:11px;line-height:1.3}}

/* Pass-and-play uses the workshop's plum, parchment and gold palette. */
.hbt-mode-picker{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}

#creature-game:is(.hbt-at-entry,.hbt-in-mystery) > :is(.hbt-workshop,.hbt-actions,.hbt-custom-head-banner){display:none}
.hbt-in-mystery .hbt-status{display:none}
.hbt-mystery[hidden],.hbt-entry[hidden],.hbt-change-mode[hidden]{display:none}
.hbt-mystery{min-height:0;overflow:auto;border-radius:24px}
.hbt-mystery-card{box-sizing:border-box;padding:clamp(14px,3vw,30px);border:1px solid #d9bfda;border-radius:24px;background:radial-gradient(ellipse at 50% 0,#fff7dd,#f5e9f6 75%);color:#452453;text-align:center}
.hbt-mystery-card .tiny{color:#755084;letter-spacing:.12em}
.hbt-mystery-card h2{font:700 clamp(23px,4vw,38px)/1.16 Georgia,serif;margin:8px 0 16px}

.hbt-mystery .hbt-mystery-choices{height:auto;max-height:360px;min-height:0;background:#fffdf8;border:1px solid #e2d4e7;border-radius:16px}
@media(max-width:760px){
 .hbt-mode-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:6px}
 .hbt-mystery .hbt-mystery-choices{grid-template-columns:repeat(3,minmax(0,1fr))}
}


.hbt-entry{box-sizing:border-box;margin:8px auto 0;padding:clamp(24px,5vw,56px);width:min(100%,650px);text-align:center;border:1px solid #d9bfda;border-radius:28px;background:radial-gradient(ellipse at top,#fff8df,#f0e4f5);color:#452453}
.hbt-entry .tiny{color:#755084;letter-spacing:.12em}
.hbt-entry h2{margin:10px 0 22px;font:700 clamp(26px,5vw,42px)/1.1 Georgia,serif}
.hbt-entry .hbt-mode-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0}
.hbt-entry .hbt-mode-picker .ui-picture-button{
 grid-template-rows:1fr;
 place-items:center;
 min-width:0;
 min-height:clamp(76px,10vw,108px);
 width:100%;
 padding:10px 5px;
 font-size:clamp(22px,3.3vw,34px);
 font-weight:800;
 line-height:1.1;
}
.hbt-change-mode{align-self:flex-start;margin-bottom:10px}
.hbt-player-setup{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(185px,100%),1fr));gap:10px;max-width:720px;margin:0 auto 18px}
.hbt-player-setup fieldset{min-width:0;margin:0;padding:8px;border:1px solid #d9bfda;border-radius:16px}
.hbt-player-setup legend{font-weight:800;padding:0 6px}
.hbt-avatar-options{display:flex;justify-content:center;gap:8px}
.hbt-avatar-options label{display:grid;position:relative;justify-items:center;gap:3px;padding:6px;border:2px solid transparent;border-radius:12px;cursor:pointer}
.hbt-avatar-options input{position:absolute;opacity:0}
.hbt-avatar-options label:has(input:checked){border-color:#a579c1;background:#fff1c2}
.hbt-avatar-options label:has(input:focus-visible){outline:2px solid #755084;outline-offset:2px}
.hbt-player-avatar{width:48px;height:48px;object-fit:contain;border-radius:50%;background:#fff9e8}
.hbt-player-mark{display:inline-flex;align-items:center;gap:8px;color:#5c3870}
.hbt-switch-arrows,.hbt-reveal-sparkles{color:#8a4fa6;font:900 clamp(46px,11vw,90px)/1 system-ui,sans-serif}
.hbt-switch-card [data-ready],.hbt-reveal-card [data-reveal]{width:100%;min-width:0}
.hbt-switch-card h2{font-size:clamp(42px,10vw,78px);margin-block:5px 14px}
.hbt-reveal-card.is-revealing{background:radial-gradient(ellipse at center,#fff0a9,#f2e0fa 75%)}
@media(prefers-reduced-motion:no-preference){
 .hbt-switch-arrows{animation:hbt-pass .7s ease-in-out 3 alternate}
 .hbt-reveal-sparkles{animation:hbt-sparkle .75s ease-out}
 .hbt-reveal-result .hbt-stage canvas{animation:hbt-arrive .65s cubic-bezier(.2,.85,.32,1.12) both}
}
@keyframes hbt-pass{from{transform:translateX(-14px)}to{transform:translateX(14px)}}
@keyframes hbt-sparkle{from{transform:scale(.7);opacity:.45}to{transform:scale(1);opacity:1}}
@keyframes hbt-rumble{0%,100%{transform:scale(1)}25%{transform:rotate(-3deg) scale(1.05)}55%{transform:rotate(3deg) scale(1.1)}78%{transform:rotate(-2deg) scale(1.05)}}
@keyframes hbt-arrive{from{transform:scale(.68) rotate(-7deg);opacity:0}to{transform:scale(1);opacity:1}}

.hbt-avatar-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.hbt-player-setup{grid-template-columns:repeat(auto-fit,minmax(min(245px,100%),1fr));max-width:1020px}
.hbt-avatar-options label{background:#fffdf8;border-color:#dfcbe6;padding:7px}
.hbt-avatar-options .hbt-player-avatar{width:min(100%,148px);height:auto;aspect-ratio:1}
.hbt-handoff-avatar{margin:0 auto 14px}
.hbt-handoff-avatar .hbt-player-avatar{width:clamp(86px,14vw,135px);height:auto;aspect-ratio:1}
.hbt-handoff-avatar .hbt-player-mark{display:flex;flex-direction:column}
.hbt-switch-arrows .ui-icon{width:clamp(60px,19vw,135px);height:auto}
.hbt-picking-card{padding:clamp(8px,2vw,20px)}
.hbt-picking-card h2{margin:4px 0 12px}
.hbt-mystery .hbt-secret-workshop{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;text-align:left}
.hbt-secret-workshop .hbt-selector{padding:8px}
.hbt-secret-workshop .hbt-selector [data-lock]{align-self:stretch;margin-top:8px}
.hbt-secret-workshop .hbt-mystery-choices{height:clamp(165px,34vw,410px);max-height:none}
.hbt-secret-workshop .hbt-secret-stage{min-height:260px}
.hbt-reveal-card .hbt-secret-stage{min-height:0;height:clamp(230px,38vh,360px);max-width:440px;margin:0 auto 12px}
.hbt-reveal-card .hbt-secret-stage canvas{height:100%;max-height:100%;width:auto}
@media(max-width:760px){
 .hbt-player-setup{grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr))}
 .hbt-mystery .hbt-secret-workshop{gap:6px}
 .hbt-reveal-card .hbt-secret-stage canvas{width:calc(100% - 20px);height:calc(100% - 36px)}
}

.hbt-player-setup fieldset:disabled{opacity:.43}
.hbt-player-setup fieldset:disabled label{cursor:default}
.hbt-picking-card .hbt-player-avatar{width:clamp(72px,13vw,120px);height:auto;aspect-ratio:1}
.hbt-secret-workshop .hbt-confirm-part{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;font-size:clamp(22px,3vw,34px);font-weight:800}
.hbt-confirm-part .navicon .ui-icon{width:1em;height:1em}
.hbt-confirm-part .navicon{margin:0}
.hbt-secret-stage{background-position:center;background-size:cover}
.hbt-reveal-card .hbt-secret-stage canvas{position:absolute;inset:12px;width:calc(100% - 24px);height:calc(100% - 24px);object-fit:contain}
.hbt-reveal-card [data-reveal]{position:relative;overflow:hidden;margin-inline:auto}
@media(max-width:760px){
 .hbt-reveal-card .hbt-secret-stage canvas{width:calc(100% - 20px);height:calc(100% - 36px)}
}
@media(prefers-reduced-motion:no-preference){
 .hbt-picking-card .hbt-player-avatar{animation:hbt-avatar-wiggle .7s ease-in-out 2}
 .hbt-reveal-card .hbt-secret-stage canvas{animation:hbt-avatar-wiggle .8s ease-in-out infinite}
 .hbt-reveal-card.is-revealing .hbt-secret-stage canvas{animation:hbt-rumble .95s ease-in-out}
 .hbt-reveal-card [data-reveal]::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(110deg,transparent 34%,#fff9 48%,transparent 63%);animation:hbt-shimmer 2s ease-in-out infinite}
}
@keyframes hbt-avatar-wiggle{0%,100%{transform:rotate(0)}24%{transform:rotate(-5deg)}64%{transform:rotate(5deg)}}
@keyframes hbt-shimmer{0%{transform:translateX(-100%)}58%,100%{transform:translateX(100%)}}
.hbt-entry .hbt-mode-picker .ui-picture-button>span{min-width:0;max-width:100%}
@media(max-width:420px){.hbt-entry{padding-inline:12px}}


/* Illustrated scenery replaces the painted fallback hills and ground. */
.hbt-stage.has-scene{background-position:center;background-size:cover;background-repeat:no-repeat}
.hbt-stage.has-scene::before,.hbt-stage.has-scene::after,.hbt-stage.has-scene .hbt-stage-ground{display:none}
@media(max-width:760px){
 .hbt-entry{padding:18px 14px;margin-top:4px}
 .hbt-entry h2{margin:4px 0 14px}
 .hbt-entry .hbt-mode-picker{grid-template-columns:1fr;gap:8px}
 .hbt-entry .hbt-mode-picker .ui-picture-button{min-height:56px;font-size:24px}
 .hbt-change-mode{min-height:42px;width:100%;margin-bottom:4px;display:flex;justify-content:center;align-items:center;gap:6px;padding:4px 8px}
 .hbt-change-mode .navicon,.hbt-change-mode .ui-icon{width:24px;height:24px}
 .hbt-mystery .hbt-secret-workshop{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
 .hbt-secret-workshop .hbt-secret-stage{grid-row:1;min-height:0;height:clamp(175px,33dvh,300px)}
 .hbt-secret-workshop .hbt-mystery-choices{height:84px;overflow-x:auto;overflow-y:hidden}
 .hbt-secret-workshop .hbt-selector{padding:4px}
 .hbt-secret-workshop .hbt-selector [data-lock]{margin-top:4px;min-height:48px;padding-block:3px}
 .hbt-picking-card .hbt-player-avatar{width:64px}
 .hbt-picking-card h2{margin:2px 0 8px}
}
