.kids-template-panel[hidden],.kids-template-panel [hidden]{display:none!important}
.kids-template-entry{position:absolute;left:18px;bottom:38px;z-index:7;min-height:40px;padding:9px 18px;border:1px solid #caa26c;border-radius:24px;background:#fff5e1;color:#654626;font-family:inherit;font-weight:600;font-size:13px;cursor:pointer;box-shadow:0 4px 14px #6f4c2010}
.kids-template-entry::before{content:'';display:inline-block;vertical-align:middle;width:20px;height:20px;background:url('/children-socks-icon.svg') center/contain no-repeat;margin-right:6px}
.kids-template-panel{box-sizing:border-box;position:absolute;left:18px;bottom:90px;top:65px;width:250px;z-index:7;display:flex;flex-direction:column;gap:10px;overflow:auto;padding:16px;background:#fffaf1;border:1px solid #e1cdb1;border-radius:20px;box-shadow:0 12px 32px #68451e20;color:#604326;text-align:left;overscroll-behavior:contain}
.kids-template-panel header{display:flex;justify-content:space-between;gap:8px;flex:none}.kids-template-panel h3{margin:0;font-size:18px}.kids-template-panel p{position:static!important;margin:6px 0 0;font-size:12px;line-height:1.6}
.kids-template-panel [data-close]{width:30px;height:30px;flex:none;border:0;background:transparent;color:#604326;font-size:24px;cursor:pointer}
.kids-template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow:auto;min-height:100px;flex:1 1 auto;align-content:start;scrollbar-gutter:stable;overscroll-behavior:contain}
.kids-template-grid button{position:relative;display:grid;gap:5px;padding:7px;border:1px solid #e7d7c2;border-radius:14px;background:#fffdf8;color:#604326;cursor:pointer;font:inherit;font-size:12px}
.kids-template-grid img{width:100%;height:auto;aspect-ratio:2/3;border-radius:9px;object-fit:contain;background:#fff}.kids-template-grid span{font-size:11px;color:#8b735c}.kids-template-grid i{display:none;position:absolute;right:5px;top:5px;width:22px;height:22px;border-radius:50%;background:#b9893f;color:#fff;font-style:normal;line-height:22px}
.kids-template-grid .selected{border-color:#ba8b40;background:#fff0d4}.kids-template-grid .selected i{display:block}
.kids-template-panel .kids-template-reminder{padding:9px;border-radius:10px;background:#f5e6ce}.kids-template-status{color:#857052}
.kids-template-actions{display:flex;gap:8px;flex:none}.kids-template-panel [data-apply],.kids-template-panel [data-cancel],.kids-template-panel [data-restore]{border:1px solid #cfaf80;border-radius:10px;padding:9px 12px;background:#fff8eb;color:#654626;cursor:pointer;min-height:38px;font:inherit;font-size:12px;flex:none}
.kids-template-panel [data-apply]{flex:1;background:#60462d;color:#fff}.kids-template-panel button:disabled{cursor:wait;opacity:.6}.kids-template-panel button:focus-visible,.kids-template-entry:focus-visible{outline:2px solid #a17736;outline-offset:2px}
.children-socks-stage.kids-templates-open:not(.kids-templates-compact)>.children-socks-model{left:278px;width:calc(100% - 278px)}
.children-socks-stage.kids-templates-open:not(.kids-templates-compact)>.children-socks-sheet,.children-socks-stage.kids-templates-open:not(.kids-templates-compact)>.children-socks-official{left:284px;width:calc(100% - 300px)}
.children-socks-stage.kids-templates-open:not(.kids-templates-compact)>.product-model-loading{left:278px}
.children-socks-stage.kids-templates-open:not(.kids-templates-compact)>.children-socks-effects{left:284px}
.kids-templates-compact .kids-template-panel{top:auto;bottom:86px;left:10px;right:10px;width:auto;max-height:calc(100% - 144px);padding:12px;gap:6px}.kids-templates-compact .kids-template-grid{grid-template-columns:repeat(3,minmax(85px,1fr));min-height:60px;max-height:175px}.kids-templates-compact .kids-template-grid img{max-height:98px}.kids-templates-compact .kids-template-panel h3{font-size:16px}.kids-templates-compact .kids-template-panel header p{display:none}.kids-templates-compact .kids-template-entry{left:12px;font-size:12px;padding:8px 12px}
.children-socks-template-note{font-size:12px;color:#806c53;line-height:1.6;padding:10px;border:1px solid #e4d1b7;border-radius:10px;background:#fff7e8}
/* Keep a separate rotation area above the scrollable chooser on narrow stages. */
.kids-templates-compact .kids-template-panel{height:min(310px,calc(100% - 220px));max-height:none}
.children-socks-stage.kids-templates-open.kids-templates-compact>.children-socks-model,.children-socks-stage.kids-templates-open.kids-templates-compact>.children-socks-sheet,.children-socks-stage.kids-templates-open.kids-templates-compact>.children-socks-official{top:58px;bottom:auto;height:calc(100% - min(310px,calc(100% - 220px)) - 146px)}
.children-socks-stage.kids-templates-open.kids-templates-compact>.product-model-loading{bottom:calc(min(310px,calc(100% - 220px)) + 88px)}
.children-socks-stage.kids-templates-open.kids-templates-compact>.children-socks-effects{bottom:calc(min(310px,calc(100% - 220px)) + 88px)}
