.cmc-app{--cmc-ink:#392821;--cmc-muted:#765f50;--cmc-cream:#fff8eb;max-width:1120px;margin:1.5rem auto;padding:clamp(1rem,3vw,1.8rem);border:1px solid #e9ddca;border-radius:28px;background:linear-gradient(145deg,#fffaf1,#f6ecdc);color:var(--cmc-ink);font-family:system-ui,-apple-system,"Segoe UI",sans-serif;box-shadow:0 16px 40px #5a402016}
.cmc-app *{box-sizing:border-box}
.cmc-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin:0 0 1.2rem}
.cmc-kicker{font-size:.72rem;font-weight:900;letter-spacing:.12em;color:#557661}
.cmc-header h2{margin:.28rem 0 .35rem;font-size:clamp(1.45rem,3vw,2.1rem);line-height:1.1;color:var(--cmc-ink)}
.cmc-header p{margin:0;color:var(--cmc-muted);line-height:1.45}
.cmc-save-indicator{max-width:250px;min-height:2.7rem;padding:.65rem .85rem;border:1px solid #dfd2bd;border-radius:14px;background:#fffdf8;color:#5d4b3f;font-size:.88rem;font-weight:700;line-height:1.35}
.cmc-status-wrap{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}.cmc-refresh-inventory{min-height:40px;padding:.55rem .7rem;border:1px solid #cdbda7;border-radius:11px;background:#fff;color:#594436;font:800 .78rem/1.1 system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer}.cmc-refresh-inventory[hidden]{display:none!important}.cmc-refresh-inventory:disabled{opacity:.6;cursor:wait}
.cmc-refresh-inventory:focus-visible{outline:3px solid #ef754e;outline-offset:3px}.cmc-item-card:disabled{cursor:wait;opacity:.72;transform:none;box-shadow:none}
.cmc-save-indicator.is-saved{border-color:#a9c6a8;background:#edf5e8;color:#315d42}.cmc-save-indicator.is-error{border-color:#e6b0a1;background:#fff0ea;color:#873b2a}
.cmc-layout{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(350px,1.1fr);gap:clamp(1rem,3vw,1.8rem);align-items:start}
.cmc-preview-wrap{position:sticky;top:1rem;padding:12px;border:1px solid #ebdeca;border-radius:22px;background:#fffcf6;box-shadow:0 8px 22px #644b3012}
.cmc-preview{position:relative;overflow:hidden;width:100%;aspect-ratio:4/5;border-radius:16px;background:#fff4e4}
.cmc-preview canvas{display:block;width:100%!important;height:100%!important}
.cmc-loading{position:absolute;inset:0;display:grid;place-items:center;color:#715a47;font-weight:800}
.cmc-style-note{margin:.55rem .35rem .25rem;color:#725d4d;font-size:.8rem;line-height:1.4;text-align:center}
.cmc-build-version{margin:-.1rem .35rem .45rem;color:#806f5d;font-size:.68rem;line-height:1.2;text-align:right;letter-spacing:.02em}
.cmc-name-wrap{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.75rem;margin:.8rem .2rem .15rem}
.cmc-name-wrap label{font-size:.9rem;font-weight:800;color:#594436}.cmc-name{min-width:0;min-height:42px;padding:.55rem .75rem;border:1px solid #d8c7af;border-radius:11px;background:white;color:var(--cmc-ink);font:700 1rem/1.2 system-ui,-apple-system,"Segoe UI",sans-serif}
.cmc-editor{display:grid;gap:.8rem}.cmc-edit-section{overflow:hidden;border:1px solid #e7dac7;border-radius:17px;background:#fffdf8}
.cmc-edit-section summary{padding:.85rem 1rem;color:#584436;font-size:.98rem;font-weight:900;cursor:pointer;list-style:none}.cmc-edit-section summary::-webkit-details-marker{display:none}.cmc-edit-section summary::after{content:"＋";float:right;color:#557661}.cmc-edit-section[open] summary::after{content:"−"}
.cmc-edit-section-inner{display:grid;gap:.6rem;padding:0 .65rem .7rem}.cmc-choice-group{min-width:0;margin:0;padding:.65rem .75rem .75rem;border:1px solid #e7dac7;border-radius:15px;background:#fffaf1}.cmc-choice-group legend{padding:0 .35rem;color:#584436;font-size:.88rem;font-weight:850}
.cmc-choice-list,.cmc-shape-list{display:flex;flex-wrap:wrap;gap:.5rem}
.cmc-choice{display:inline-flex;align-items:center;gap:.42rem;min-height:40px;padding:.46rem .68rem;border:1px solid #ddd0bd;border-radius:999px;background:#fff;color:#594738;font:700 .85rem/1.1 system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer;transition:transform .14s ease,border-color .14s ease,background .14s ease}
.cmc-choice:hover{transform:translateY(-1px);border-color:#799b82}.cmc-choice[aria-pressed=true]{border-color:#416b58;background:#eaf2e7;color:#2f5c45;box-shadow:0 0 0 2px #416b5820}.cmc-choice[hidden]{display:none!important}
.cmc-choice:focus-visible,.cmc-save:focus-visible,.cmc-randomize:focus-visible,.cmc-export:focus-visible,.cmc-reset-button:focus-visible,.cmc-qa-toggle:focus-visible,.cmc-pose:focus-visible,.cmc-name:focus-visible,.cmc-edit-section summary:focus-visible{outline:3px solid #ef754e;outline-offset:3px}
.cmc-shape-choice{display:grid;justify-items:center;align-content:start;gap:.48rem;flex:1 1 135px;min-height:112px;padding:.75rem .55rem;border-radius:16px;white-space:normal;text-align:center}
.cmc-shape-icon{display:block;width:44px;height:44px;background:var(--shape-color);border:3px solid #493027;box-shadow:inset 0 0 0 2px #ffffff35}
.cmc-shape-choice[data-value="circle"] .cmc-shape-icon{border-radius:50%;--shape-color:#27b8b4}.cmc-shape-choice[data-value="triangle"] .cmc-shape-icon{clip-path:polygon(50% 0,100% 100%,0 100%);border:0;--shape-color:#f07860;filter:drop-shadow(1px 2px 0 #493027)}
.cmc-shape-choice[data-value="square"] .cmc-shape-icon{border-radius:12px;--shape-color:#91b98d}.cmc-shape-choice[data-value="star"] .cmc-shape-icon{clip-path:polygon(50% 0,62% 35%,100% 36%,70% 58%,80% 96%,50% 74%,20% 96%,30% 58%,0 36%,38% 35%);border:0;--shape-color:#f4b833;filter:drop-shadow(1px 2px 0 #493027)}
.cmc-shape-choice[data-value="oval"] .cmc-shape-icon{width:37px;border-radius:50%;--shape-color:#b77bce}.cmc-shape-choice[data-value="diamond"] .cmc-shape-icon{transform:rotate(45deg) scale(.78);--shape-color:#54a9d8}
.cmc-color-choice::before{content:"";width:14px;height:14px;flex:0 0 14px;border:1px solid #594738;border-radius:50%;background:var(--swatch,#ddd)}
.cmc-color-choice[data-value="cream"]{--swatch:#fff0cf}.cmc-color-choice[data-value="coral"]{--swatch:#f07860}.cmc-color-choice[data-value="sage"]{--swatch:#91b98d}.cmc-color-choice[data-value="blue"]{--swatch:#54a9d8}.cmc-color-choice[data-value="mustard"]{--swatch:#f4b833}
.cmc-actions{display:flex;flex-wrap:wrap;gap:.55rem;margin-top:.2rem}.cmc-actions button{min-height:48px;padding:.7rem .85rem;border-radius:14px;font:850 .9rem/1 system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer}
.cmc-randomize,.cmc-export{border:1px solid #cdbda7;background:#fffaf0;color:#594436}.cmc-save{flex:1;border:0;background:#ed633b;color:#fffaf2;box-shadow:0 4px 0 #ac452a}.cmc-save:hover{background:#db542e}.cmc-save:disabled{opacity:.65;cursor:wait}
.cmc-pose-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:.45rem;margin:.7rem .1rem .2rem}.cmc-pose{min-height:40px;padding:.45rem .75rem;border:1px solid #e5d7c1;border-radius:999px;background:#fffaf0;color:#594436;font:800 .83rem/1 system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer;transition:transform .14s ease,background .14s ease}.cmc-pose:hover{transform:translateY(-1px);background:#f5ead8}
.cmc-login-note{margin:.1rem 0 0;color:#6e594a;font-size:.9rem;line-height:1.4}.cmc-login-note a{color:#315e49;font-weight:800}
.cmc-reset-progress{margin-top:1rem;padding:.8rem .9rem;border:1px solid #ddcfc0;border-radius:14px;background:#fffaf3}.cmc-reset-progress p{margin:.5rem 0 0;color:#675749;font-size:.78rem;line-height:1.45}.cmc-reset-button,.cmc-qa-toggle{min-height:42px;padding:.6rem .8rem;border:1px solid #bca996;border-radius:11px;background:#fff;color:#594436;font:800 .82rem/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer}.cmc-reset-button{border-color:#c98972;color:#873b2a}.cmc-reset-button:hover{background:#fff0ea}.cmc-reset-button:disabled,.cmc-qa-toggle:disabled{opacity:.6;cursor:wait}.cmc-admin-qa-panel{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;margin:.4rem .2rem .8rem}.cmc-admin-qa-note{margin:0;padding:.55rem .7rem;border:1px solid #d6b45a;border-radius:10px;background:#fff5d9;color:#624b1d;font-size:.74rem;font-weight:700;line-height:1.4}
@media(max-width:760px){.cmc-header{display:block}.cmc-save-indicator{max-width:none;margin-top:.8rem}.cmc-layout{grid-template-columns:1fr}.cmc-preview-wrap{position:relative;top:auto;width:min(100%,520px);margin:0 auto}.cmc-editor{grid-template-columns:1fr}.cmc-actions{display:grid;grid-template-columns:1fr 1fr}.cmc-actions .cmc-save{grid-column:1/-1}.cmc-actions button{min-height:52px}.cmc-pose{min-height:44px}}
@media(max-width:600px){.cmc-preview{aspect-ratio:1/1}}
@media(prefers-reduced-motion:reduce){.cmc-choice,.cmc-pose{transition:none}.cmc-choice:hover,.cmc-pose:hover{transform:none}}
.cmc-inventory-intro{margin:.1rem .25rem .25rem;color:#765f50;font-size:.84rem;line-height:1.45}
.cmc-inventory-section{padding:.7rem;border:1px solid #e8dcc9;border-radius:16px;background:#fffaf1}
.cmc-inventory-section h3{display:flex;justify-content:space-between;align-items:center;margin:0 0 .55rem;color:#584436;font-size:.9rem}
.cmc-inventory-section h3 span{color:#8b7866;font-size:.68rem;font-weight:750;text-transform:uppercase;letter-spacing:.06em}
.cmc-inventory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
.cmc-item-card{position:relative;display:grid;grid-template-columns:54px minmax(0,1fr);grid-template-rows:auto auto auto;align-items:center;column-gap:.55rem;min-width:0;min-height:94px;padding:.55rem;border:1px solid #d7c7b1;border-radius:13px;background:linear-gradient(145deg,#fff,#fff9ed);color:#49382d;text-align:left;cursor:pointer;transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease}
.cmc-item-card:hover{transform:translateY(-1px);box-shadow:0 4px 10px #49302718}.cmc-item-card:focus-visible{outline:3px solid #ef754e;outline-offset:2px}
.cmc-item-card.is-equipped{border:2px solid #477b5b;background:linear-gradient(145deg,#f4faef,#eaf3e4);box-shadow:0 0 0 2px #477b5b20}
.cmc-item-card.is-locked{cursor:pointer}.cmc-item-card.is-locked::after{content:"🔒";position:absolute;top:5px;right:6px;display:grid;place-items:center;width:22px;height:22px;border:1px solid #dfc9a2;border-radius:50%;background:#fff8e8;font-size:.68rem}
.cmc-item-icon{position:relative;display:block;grid-column:1;grid-row:1/4;width:52px;height:54px;overflow:hidden;border-radius:10px;background:radial-gradient(ellipse at 50% 90%,#49302717 0 32%,transparent 34%)}
.cmc-item-icon::before,.cmc-item-icon::after{content:"";position:absolute;display:block}
.cmc-item-icon[data-item="hat-toque"]::before{left:11px;bottom:13px;width:31px;height:29px;border:2px solid #493027;border-radius:55% 55% 8px 8px;background:#fff0cf;box-shadow:-7px 6px 0 -2px #fff0cf,7px 6px 0 -2px #fff0cf}
.cmc-item-icon[data-item="hat-toque"]::after{left:7px;bottom:8px;width:39px;height:9px;border:2px solid #493027;border-radius:6px;background:#fff0cf}
.cmc-item-icon[data-item="hat-bandana"]::before{left:7px;bottom:11px;width:40px;height:35px;clip-path:polygon(50% 0,100% 78%,84% 100%,16% 100%,0 78%);background:#e7654d;filter:drop-shadow(0 2px 0 #493027)}
.cmc-item-icon[data-item="hat-bandana"]::after{right:4px;bottom:13px;width:10px;height:10px;border:2px solid #493027;border-radius:50%;background:#f4b833}
.cmc-item-icon[data-item="hat-cap"]::before{left:9px;bottom:15px;width:35px;height:28px;border:2px solid #493027;border-radius:55% 55% 8px 8px;background:repeating-linear-gradient(90deg,#f5c758 0 7px,#fff3cf 7px 13px)}
.cmc-item-icon[data-item="hat-cap"]::after{left:4px;bottom:10px;width:45px;height:9px;border:2px solid #493027;border-radius:6px;background:#f07860}
.cmc-item-icon[data-item="hat-pleated"]::before{left:10px;bottom:14px;width:32px;height:36px;border:2px solid #493027;border-radius:48% 48% 7px 7px;background:repeating-linear-gradient(90deg,#fff0cf 0 6px,#ffe4a3 6px 9px)}
.cmc-item-icon[data-item="hat-pleated"]::after{left:5px;bottom:9px;width:42px;height:10px;border:2px solid #493027;border-radius:5px;background:#f4b833}
.cmc-item-icon[data-item="hat-champion"]::before{left:8px;bottom:13px;width:37px;height:37px;border:2px solid #493027;border-radius:48% 48% 7px 7px;background:repeating-linear-gradient(90deg,#ffefb2 0 8px,#f4b833 8px 11px)}
.cmc-item-icon[data-item="hat-champion"]::after{left:4px;bottom:8px;width:45px;height:11px;border:2px solid #493027;border-radius:6px;background:linear-gradient(90deg,#e96d53 0 18%,#f4b833 18% 82%,#e96d53 82%)}
.cmc-item-icon[data-item="apron-bib"]::before{left:10px;top:10px;width:32px;height:39px;border:2px solid #493027;border-radius:7px 7px 10px 10px;background:#fff0cf;clip-path:polygon(19% 0,81% 0,100% 100%,0 100%)}
.cmc-item-icon[data-item="apron-bib"]::after{left:17px;top:7px;width:18px;height:8px;border:2px solid #493027;border-bottom:0;border-radius:8px 8px 0 0;background:transparent}
.cmc-item-icon[data-item="apron-pocket"]::before{left:9px;top:9px;width:34px;height:41px;border:2px solid #493027;border-radius:7px 7px 10px 10px;background:#65b7bd;clip-path:polygon(18% 0,82% 0,100% 100%,0 100%)}
.cmc-item-icon[data-item="apron-pocket"]::after{left:16px;bottom:12px;width:20px;height:13px;border:2px solid #493027;border-radius:4px;background:#f4b833}
.cmc-item-icon[data-item="apron-recipe"]::before{left:8px;top:8px;width:36px;height:43px;border:2px solid #493027;border-radius:7px 7px 10px 10px;background:linear-gradient(90deg,#f07860 0 29%,#f4b833 29% 62%,#54a9d8 62%);clip-path:polygon(18% 0,82% 0,100% 100%,0 100%)}
.cmc-item-icon[data-item="apron-recipe"]::after{left:16px;bottom:12px;width:21px;height:12px;border:2px solid #493027;border-radius:4px;background:#fff0cf}
.cmc-item-icon[data-item="apron-star"]::before{left:7px;top:8px;width:38px;height:44px;border:3px solid #e1ad38;border-radius:8px 8px 11px 11px;background:linear-gradient(180deg,#f07860 0 34%,#d9594e 34%);clip-path:polygon(17% 0,83% 0,100% 100%,0 100%)}
.cmc-item-icon[data-item="apron-star"]::after{left:19px;top:25px;width:15px;height:15px;background:#ffe38a;clip-path:polygon(50% 0,62% 35%,100% 36%,70% 59%,80% 100%,50% 77%,20% 100%,30% 59%,0 36%,38% 35%);filter:drop-shadow(0 1px 1px #493027)}
.cmc-item-icon[data-item="apron-champion"]::before{left:6px;top:6px;width:40px;height:47px;border:3px solid #9b6c2e;border-radius:9px 9px 12px 12px;background:linear-gradient(180deg,#f9df80 0 29%,#e9a94e 30% 100%);clip-path:polygon(17% 0,83% 0,100% 100%,0 100%);box-shadow:inset 0 0 0 3px #fff4c2}
.cmc-item-icon[data-item="apron-champion"]::after{left:18px;top:24px;width:18px;height:18px;background:#fff1bd;clip-path:polygon(50% 0,62% 35%,100% 36%,70% 59%,80% 100%,50% 77%,20% 100%,30% 59%,0 36%,38% 35%);filter:drop-shadow(0 1px 1px #654522)}
.cmc-item-name{grid-column:2;align-self:end;min-height:2.2em;padding-right:1.15rem;color:#49382d;font-size:.76rem;line-height:1.15}
.cmc-item-state{grid-column:2;align-self:start;margin-top:.14rem;color:#6d5948;font-size:.64rem;font-weight:750;line-height:1.2}
.cmc-item-tier{grid-column:2;align-self:end;margin-top:.28rem;color:#8a735c;font-size:.55rem;font-weight:900;letter-spacing:.08em;line-height:1.1}
.cmc-item-card[data-tier="1"]{border-color:#d99a75}.cmc-item-card[data-tier="2"]{border-color:#83a9a2}.cmc-item-card[data-tier="3"]{border-color:#d7b34a}.cmc-item-card[data-tier="4"]{border-color:#7eacc5}.cmc-item-card[data-tier="5"]{border-color:#b48ac2}.cmc-item-card[data-tier="6"]{border-color:#df9b47}.cmc-item-card[data-tier="7"]{border:2px solid #c99a3c;background:linear-gradient(145deg,#fff9df,#f9e8b5);box-shadow:inset 0 0 0 2px #e8c76455,0 2px 8px #b4863624}
.cmc-item-card[data-tier="7"] .cmc-item-tier{color:#815b1f}.cmc-item-card[data-tier="7"]::before{content:"✦";position:absolute;right:8px;bottom:7px;color:#d49a22;font-size:.72rem}
@media(max-width:460px){.cmc-inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem}.cmc-item-card{grid-template-columns:44px minmax(0,1fr);min-height:90px;padding:.4rem;column-gap:.4rem}.cmc-item-icon{width:44px;height:50px}.cmc-item-name{font-size:.7rem}.cmc-item-tier{font-size:.5rem}}
@media(prefers-reduced-motion:reduce){.cmc-item-card{transition:none}.cmc-item-card:hover{transform:none}}

/* Sample C depth with Sample D's graphic outlines. */
.cmc-app{--cmc-ink:#172a30;--cmc-muted:#566b6b}
.cmc-header h2,.cmc-item-name,.cmc-item-card{color:#172a30}
.cmc-kicker{color:#426c69}
.cmc-shape-icon{border-color:#172a30;box-shadow:inset 0 2px 5px #ffffff48,0 3px 0 #172a3030}
.cmc-shape-choice[data-value="circle"] .cmc-shape-icon{--shape-color:#267f82}
.cmc-shape-choice[data-value="triangle"] .cmc-shape-icon{--shape-color:#d65d46}
.cmc-shape-choice[data-value="square"] .cmc-shape-icon{--shape-color:#91a77a}
.cmc-shape-choice[data-value="star"] .cmc-shape-icon{--shape-color:#d6a13c}
.cmc-shape-choice[data-value="oval"] .cmc-shape-icon{--shape-color:#936e9e}
.cmc-shape-choice[data-value="diamond"] .cmc-shape-icon{--shape-color:#5a8da3}
.cmc-color-choice[data-value="cream"]{--swatch:#f3e5c5}.cmc-color-choice[data-value="coral"]{--swatch:#d65d46}.cmc-color-choice[data-value="sage"]{--swatch:#91a77a}.cmc-color-choice[data-value="blue"]{--swatch:#5a8da3}.cmc-color-choice[data-value="mustard"]{--swatch:#d6a13c}
.cmc-name-field{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.4rem;min-width:0}
.cmc-name-randomize{min-height:42px;padding:.45rem .6rem;border:1px solid #c8bca8;border-radius:11px;background:#f7f1e6;color:#263d40;font:800 .76rem/1.1 system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer}
.cmc-name-randomize:hover{border-color:#426c69;background:#edf2eb}.cmc-name-randomize:focus-visible{outline:3px solid #d65d46;outline-offset:2px}
.cmc-item-card.is-locked{border-style:dashed;background:linear-gradient(145deg,#eeeae2,#e4e0d7);box-shadow:inset 0 0 0 1px #ffffff70}
.cmc-item-card.is-locked:hover{border-color:#8c735e;box-shadow:0 4px 10px #172a3025}
.cmc-item-card.is-locked .cmc-item-icon,.cmc-item-card.is-locked .cmc-expression-icon{filter:grayscale(.78) brightness(.82);opacity:.8}
.cmc-item-card.is-locked .cmc-item-name{color:#4d5250}
.cmc-item-card.is-locked .cmc-item-state{color:#713e2d;font-weight:900}
.cmc-item-card.is-locked::after{content:"🔒 LOCKED";top:6px;right:6px;width:auto;height:20px;padding:0 .42rem;border:1px solid #b79a76;border-radius:999px;background:#fff7e8;color:#674425;font:900 .53rem/18px system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:.04em;box-shadow:0 1px 4px #172a3020}
.cmc-item-card.is-equipped{border-color:#426c69;background:linear-gradient(145deg,#f4f7ed,#e8efe4);box-shadow:0 0 0 2px #426c6920}
.cmc-expression-icon{position:relative;display:block;grid-column:1;grid-row:1/4;width:48px;height:48px;margin:auto;border:3px solid #172a30;border-radius:50%;background:radial-gradient(ellipse at 34% 27%,#fff 0 10%,#f3e5c5 48%,#cdbb99 100%);box-shadow:inset -3px -4px 0 #172a3015,0 3px 0 #172a3025}
.cmc-expression-card .cmc-item-name{align-self:center}
.cmc-item-icon.has-art::before,.cmc-item-icon.has-art::after{display:none}
.cmc-item-icon.has-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.cmc-expression-icon img{position:absolute;inset:-4px;width:calc(100% + 8px);height:calc(100% + 8px);object-fit:contain;pointer-events:none}
.cmc-save.is-saved{background:#537b63;box-shadow:0 4px 0 #395a46;cursor:default}
.cmc-save.is-saved:hover{background:#537b63}
.cmc-save.is-saved:disabled{opacity:1;cursor:default}
@media(max-width:600px){.cmc-name-wrap{grid-template-columns:1fr;gap:.35rem}.cmc-name-field{grid-template-columns:minmax(0,1fr) auto}.cmc-name-randomize{font-size:.69rem;padding:.42rem}.cmc-expression-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Compact square inventory tiles: more collectibles remain visible at once. */
.cmc-inventory-grid,.cmc-expression-grid{grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:.45rem}
.cmc-item-card{aspect-ratio:1;min-height:0;padding:.42rem .35rem .34rem;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto auto;justify-items:center;align-content:stretch;gap:.08rem;text-align:center}
.cmc-item-icon{grid-column:1;grid-row:1;width:54px;height:50px;margin:auto}
.cmc-item-name{grid-column:1;grid-row:2;align-self:center;min-height:2.2em;padding:0 .05rem;font-size:.72rem;line-height:1.08;overflow-wrap:anywhere}
.cmc-item-state{grid-column:1;grid-row:3;align-self:center;margin:0;font-size:.61rem;line-height:1.1}
.cmc-item-tier{grid-column:1;grid-row:4;align-self:center;margin:.1rem 0 0;font-size:.49rem;line-height:1.05}
.cmc-item-card.is-locked::after{content:"🔒";top:4px;right:4px;display:grid;place-items:center;width:20px;height:20px;padding:0;font-size:.65rem;line-height:1}
.cmc-expression-icon{grid-column:1;grid-row:1;width:48px;height:48px}
.cmc-expression-card .cmc-item-name{align-self:center}
@media(max-width:520px){.cmc-inventory-grid,.cmc-expression-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.38rem}.cmc-item-card{padding:.36rem .28rem .3rem}.cmc-item-name{font-size:.68rem}.cmc-item-tier{font-size:.46rem}}
@media(max-width:340px){.cmc-inventory-grid,.cmc-expression-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.cmc-shape-choice[data-value="circle"] .cmc-shape-icon{--shape-color:#16858a}
.cmc-shape-choice[data-value="triangle"] .cmc-shape-icon{--shape-color:#c95743}
.cmc-shape-choice[data-value="square"] .cmc-shape-icon{--shape-color:#82976c}
.cmc-shape-choice[data-value="star"] .cmc-shape-icon{--shape-color:#c7912e}
.cmc-shape-choice[data-value="oval"] .cmc-shape-icon{--shape-color:#8e6797}
.cmc-shape-choice[data-value="diamond"] .cmc-shape-icon{--shape-color:#7b83d7}

.cmc-none-icon{display:grid;place-items:center;font-size:2rem;color:#566b6b;border:1px dashed #b6bcb1;border-radius:50%;width:46px;height:46px}

/* Phone inventory cards favour readable names and unlock details over density. */
@media(max-width:600px){
  .cmc-inventory-grid,.cmc-expression-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}
  .cmc-item-card{aspect-ratio:auto;min-height:108px;padding:.58rem .5rem;grid-template-columns:44px minmax(0,1fr);grid-template-rows:1fr auto auto;justify-items:stretch;align-content:center;gap:.12rem .5rem;text-align:left}
  .cmc-item-icon,.cmc-expression-icon{grid-column:1;grid-row:1/4;width:42px;height:50px;margin:auto}
  .cmc-item-name{grid-column:2;grid-row:1;align-self:end;min-height:0;padding:0;font-size:.82rem;line-height:1.15;overflow-wrap:normal}
  .cmc-item-state{grid-column:2;grid-row:2;align-self:center;margin:0;font-size:.7rem;line-height:1.2}
  .cmc-item-tier{grid-column:2;grid-row:3;align-self:start;margin:.08rem 0 0;font-size:.62rem;line-height:1.15;letter-spacing:.03em}
  .cmc-item-card.is-locked::after{top:4px;right:4px;width:18px;height:18px;font-size:.6rem}
  .cmc-expression-card .cmc-item-name{align-self:end}
}
@media(max-width:380px){
  .cmc-item-card{min-height:100px;padding:.5rem .42rem;grid-template-columns:38px minmax(0,1fr);gap:.1rem .38rem}
  .cmc-item-icon,.cmc-expression-icon{width:36px;height:44px}
  .cmc-item-name{font-size:.76rem}
  .cmc-item-tier{font-size:.58rem}
}
.cmc-guest-draft-notice{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.65rem;margin:0 0 .85rem;padding:.75rem .9rem;border:1px solid #b7c9a6;border-radius:14px;background:#f1f6e9;color:#314b39;font-size:.88rem;line-height:1.4}
.cmc-guest-draft-notice[hidden]{display:none}
.cmc-guest-draft-actions{display:flex;gap:.45rem}
.cmc-guest-draft-actions button{min-height:40px;padding:.48rem .7rem;border:1px solid #8ca586;border-radius:10px;background:#fff;color:#314b39;font:800 .78rem/1.1 system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer}
.cmc-guest-draft-actions button:first-child{background:#426c52;color:#fff}
.cmc-guest-draft-actions button:focus-visible{outline:3px solid #d65d46;outline-offset:2px}

/* Owned collection and one visible reward keep later discoveries a surprise. */
.cmc-item-card[hidden],.cmc-reward-reveal[hidden]{display:none!important}
.cmc-item-card .cmc-item-tier{display:none}
.cmc-collection-heading h3{margin:0;color:#172a30;font-size:1.15rem}
.cmc-collection-heading p{margin:.35rem 0 0;color:#685344;font-size:.86rem;line-height:1.4}
.cmc-next-reward{display:flex;align-items:center;gap:16px;padding:18px;margin:0 0 16px;border:1px solid #d9c69f;border-radius:18px;background:linear-gradient(120deg,#fff8e8,#f0f3e6);color:#263f3b}
.cmc-next-reward>strong{font-size:1rem}.cmc-next-reward>p{margin:0;font-size:.9rem}
.cmc-reward-art{width:66px;height:66px;flex:0 0 66px;display:grid;place-items:center}
.cmc-reward-art img{width:100%;height:100%;object-fit:contain}
.cmc-reward-art.is-mystery{border-radius:50%;background:#416e67;color:#fff8e6;font:bold 40px/1 system-ui;box-shadow:0 3px 0 #284e48}
.cmc-reward-copy{flex:1;min-width:0}.cmc-reward-copy strong,.cmc-reward-copy span,.cmc-reward-copy small{display:block}
.cmc-reward-copy strong{font-size:1rem}.cmc-reward-copy p{margin:6px 0;font-size:.88rem;line-height:1.4}.cmc-reward-copy span{font-size:.88rem;margin-top:5px}.cmc-reward-copy small{margin-top:6px;color:#6f6049;font-size:.76rem}
.cmc-next-reward progress{display:block;width:100%;height:12px;margin-top:7px;border:0;border-radius:9px;overflow:hidden;accent-color:#f15b2a}
.cmc-next-reward progress::-webkit-progress-bar{background:#e2d8bd;border-radius:9px}.cmc-next-reward progress::-webkit-progress-value{background:#f15b2a;border-radius:9px;transition:width .45s ease}
.cmc-reward-reveal{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;padding:14px 18px;border:2px solid #e3b960;border-radius:16px;background:#fff2cd;color:#4e3e25;animation:cmc-reward-pop .45s ease-out}
.cmc-reward-reveal button{flex-shrink:0;border:0;border-radius:10px;background:#416e67;color:white;padding:10px 14px;font:800 .86rem/1.2 system-ui;cursor:pointer}
.cmc-item-card.is-new-reward{animation:cmc-reward-pop .55s ease-out}
@keyframes cmc-reward-pop{0%{transform:scale(.94);opacity:.45}100%{transform:scale(1);opacity:1}}
@media(max-width:520px){.cmc-next-reward{padding:14px;gap:12px}.cmc-reward-art{width:50px;height:50px;flex-basis:50px}.cmc-reward-reveal{align-items:flex-start;flex-direction:column}}
@media(prefers-reduced-motion:reduce){.cmc-item-card.is-new-reward,.cmc-reward-reveal{animation:none}.cmc-next-reward progress::-webkit-progress-value{transition:none}}

/* Complete shape collection and explicit save state. */
.cmc-shape-thumbnail{width:76px;height:76px;object-fit:contain;display:block;margin:auto}.cmc-unsaved{color:#874017;font-weight:750;margin:.6rem 0}.cmc-unsaved[hidden]{display:none!important}

.cmc-journey{margin:16px 0;padding:16px;border:1px solid #dfc49f;border-radius:18px;background:#fff7e9}.cmc-journey label{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0}.cmc-journey select,.cmc-journey input{max-width:65%;padding:8px;border:1px solid #c9b18b;border-radius:8px}.cmc-journey button{padding:9px 12px;border:1px solid #c9b18b;border-radius:10px;margin:4px;background:#f1e2c9;cursor:pointer}.cmc-journey h3,.cmc-journey h4{margin:6px 0}.cmc-permanent-medals{font-size:12px;padding:8px 0}

.cmc-reward-image.is-face{position:relative;display:inline-block;width:58px;height:58px;flex-shrink:0;border-radius:50%;background:#91c5be;border:2px solid #ead2a7;overflow:hidden}
.cmc-reward-image.is-face img{position:absolute;inset:9px 0;width:100%;height:40px;object-fit:contain}
.cmc-ladder-notice,.kl-ladder-notice{background:#fff0d2;border:1px solid #d5b584;border-radius:12px;padding:10px;margin:8px 0;font-size:12px}.cmc-ladder-notice p,.kl-ladder-notice p{margin:0 0 8px}.cmc-ladder-notice button,.kl-ladder-notice button{border:1px solid #cbb489;border-radius:8px;padding:6px 10px;background:#fff8e9;cursor:pointer}

.cmc-next-reward{flex-wrap:wrap}.cmc-next-reward .cmc-ladder-notice{flex-basis:100%;width:100%;margin:0 0 6px}.cmc-reward-art .cmc-reward-image.is-face{width:58px;height:58px}
