/* A compact, touch-friendly picker with a persistent preview and next step. */
.part-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}
.part-tab,.part-tab:last-child{min-height:44px;font-size:11px;padding:6px 2px}
.part-tab:last-child{grid-column:auto}
.character-controls{max-height:none;scroll-padding:8px;scrollbar-gutter:stable}
.hair-group-label{font-size:11px;font-weight:600;color:#526247;margin:0 0 8px}
.hair-palette{grid-column:1/-1;border:1px solid #c6ceb9;border-radius:5px;background:#faf9ef;color:#526247}
.hair-palette summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;padding:8px 10px;font-size:11px;cursor:pointer;list-style:none}
.hair-palette summary::-webkit-details-marker{display:none}
.hair-palette summary::after{content:'+';font-size:16px;line-height:1}
.hair-palette[open] summary::after{content:'−'}
.hair-color-name{margin-left:auto;color:#697564;font-size:10px}
.hair-palette .palette-group{padding:0 6px 5px;margin:0}
.hair-palette .part-label{display:none}
.hair-palette summary:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.character-controls>.palette-group:first-child .part-label,.hair-group-label+.palette-group .part-label{margin-top:0}
.palette-group{margin-bottom:10px}
.palette{gap:2px}
.color-swatch{width:44px;height:44px;padding:7px;flex:0 0 44px}
.part-options{gap:7px}
.part-option{min-width:0;min-height:98px;padding:6px 3px;line-height:1.4}
.part-option img{height:66px;width:auto;max-width:100%;image-rendering:pixelated}
.part-option span{overflow-wrap:anywhere}
.part-option-hair{min-height:91px}
.part-option-hair img{height:60px}
.part-option-eyes,.part-option-nose,.part-option-mouth,.part-option-glasses{min-height:80px}
.part-option-eyes img,.part-option-nose img,.part-option-mouth img,.part-option-glasses img{height:44px}
.part-option-hat img{height:52px}
.part-option-setup{min-height:132px;background:#e9eddc}
.part-option-setup img{height:96px;max-height:96px}
.part-option-setup span{font-weight:600}
.text-choices button{min-height:44px}
.style-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.part-option-pixelStyle{min-height:188px;background:#e9eddc;padding:9px 5px}
.part-option-pixelStyle img{height:120px;max-height:120px;width:88px;max-width:100%;object-fit:contain}
.part-option-pixelStyle span{font-size:12px;font-weight:700}
.style-description{font-size:9px;font-weight:400;color:#617056;line-height:1.5}
/* The two style cards already contain live full-body previews. Give them that space. */
.customizer:has(.style-options)>.character-preview{display:none}
.character-controls button:focus-visible,.part-tab:focus-visible,.gender-option:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.gender-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:22px 0 16px}
.gender-option{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-width:0;min-height:178px;padding:12px 8px;border:1px solid #c6ceb9;border-radius:8px;background:#e9eddc;color:var(--green);font:inherit;font-size:13px;font-weight:600}
.gender-option:hover,.gender-option[aria-pressed="true"]{border-color:var(--green);background:#dce5ce}
.gender-option canvas{display:block;width:88px;height:120px;image-rendering:pixelated;max-width:100%}
.gender-note{font-size:11px;line-height:1.8;color:#617056;text-align:center}
.prepared-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin:18px 0}
.prepared-option{grid-column:span 2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:135px;padding:10px 5px;border:2px solid transparent;border-radius:8px;background:#e9eddc;color:var(--green);font:inherit;cursor:pointer}
.prepared-option img{display:block;width:100%;height:87px;object-fit:contain;image-rendering:pixelated;pointer-events:none}
.prepared-option strong{font-size:10px;font-weight:600;line-height:1.5;word-break:keep-all}
.prepared-option:hover,.prepared-option[aria-pressed="true"]{border-color:var(--green);background:#dce5ce}
.prepared-option:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.prepared-option:disabled{opacity:.65;cursor:wait}
.prepared-special{grid-column:span 3;min-height:164px;background:#e1e9d6}
.prepared-special img{height:103px}
.prepared-heading{grid-column:1/-1;margin:8px 0 2px;font-size:13px;font-weight:600;color:var(--ink);line-height:1.8}
.prepared-heading:not(:first-child){margin-top:20px}
.prepared-celebrity{grid-column:span 2;min-height:155px}
.prepared-celebrity img{height:108px}
.prepared-kind{font-size:8px;line-height:1.5;color:#617056;word-break:keep-all}
#ready-step .sheet-description{margin-bottom:12px}
#ready-step #back-ready{min-height:44px}
#gender-step #open-ready{margin:16px 0 12px}
#back-gender{min-height:36px;border:0;padding:6px 0;background:none;color:#526247;font-size:11px;text-decoration:underline;text-underline-offset:3px;align-self:flex-start;flex-shrink:0}
#choose-step>.step-count{display:flex;align-items:center;gap:6px}
#choose-step>.step-count span{margin-left:0}
#back-gender{margin-left:auto;margin-right:32px}
.sheet:has(#choose-step:not([hidden])) .sheet-close{top:3px;right:9px}
@media(max-height:650px){
  .part-tabs{margin-bottom:4px;padding-bottom:4px}
  .part-tab,.part-tab:last-child{min-height:44px;padding-top:4px;padding-bottom:4px}
  .character-preview{margin-bottom:5px}
  .character-stage{height:50px;flex-basis:56px}
  #character-canvas{height:48px;width:35.2px}
  .character-preview-copy p{font-size:10px;line-height:1.4}
  .character-preview-copy button{font-size:10px;margin-right:4px}
  .part-option-hair{min-height:84px}
  .part-option-hair img{height:52px}
  .controls-hint{font-size:9px;line-height:1.35;margin-bottom:4px}
  .customizer-foot{margin:3px 0 5px}
  .character-controls{min-height:62px}
  .part-option-pixelStyle{min-height:145px;gap:3px;padding:6px 3px}
  .part-option-pixelStyle img{height:96px;width:70.4px}
  .part-option-pixelStyle span{font-size:10px}
}
@media(max-width:355px){
  .prepared-grid{gap:6px}
  .prepared-option{min-height:122px;padding:8px 3px}
  .prepared-option img{height:75px}
  .prepared-option strong{font-size:9px}
  .prepared-special{min-height:150px}
  .prepared-special img{height:94px}
  .prepared-celebrity{min-height:139px}
  .prepared-celebrity img{height:91px}
  .part-tab,.part-tab:last-child{font-size:10px}
  .part-options{gap:5px}
  .part-option{font-size:9px}
  .style-options{gap:6px}
  .style-description{font-size:8px}
}
