/* Every sample owns its caption area; featured colours must not form one
   shrinking horizontal row on a phone or inside a narrow desktop panel. */
.swatches{container-type:inline-size;container-name:material-palette;}
.swatches .palette-featured,.swatches .color-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:12px;row-gap:18px;align-items:stretch;justify-content:normal;width:100%;box-sizing:border-box;}
.swatches .swatch{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:44px 25px minmax(30px,auto);align-content:start;align-items:start;justify-items:center;gap:5px;min-width:0!important;max-width:100%;width:100%;min-height:109px;box-sizing:border-box;padding:3px 2px;line-height:1.3;}
.swatches .swatch>i{grid-row:1;width:40px;height:40px;align-self:center;margin:0;}
.swatches .swatch>small{grid-row:2;font-size:10px;line-height:1.25;white-space:normal;overflow-wrap:anywhere;max-width:100%;align-self:center;text-align:center;}
.swatches .swatch>span{grid-row:3;width:100%;max-width:100%;font-size:11px;line-height:1.35;text-align:center;white-space:normal;overflow-wrap:anywhere;hyphens:auto;align-self:start;}
.swatches .extended-palette{margin-top:18px;}
.swatches .extended-palette>summary{min-height:44px;display:flex;align-items:center;line-height:1.4;}
.swatches .color-grid{padding-top:16px;}
@container material-palette (max-width:280px){.swatches .palette-featured,.swatches .color-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@container material-palette (min-width:420px){.swatches .palette-featured,.swatches .color-grid{grid-template-columns:repeat(5,minmax(0,1fr));}}
