@layer ficha {

@scope (.cos-ficha) {

:scope { --realce: var(--il-blau); --realce-fosc: var(--il-blau-fosc); --realce-suau: var(--il-cel); }
.pg { height: 100%; display: grid; gap: 4mm; }
.sq-p1 { grid-template-rows: auto minmax(0, 1fr); }
.sq-p2 { grid-template-rows: auto minmax(0, 1fr); }
.pg > .ex { min-height: 0; }


.sq-tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5mm; }
.sq-pas { display: grid; grid-template-rows: auto auto; gap: 2mm; padding: 2mm; border: var(--gruix) solid var(--realce-fosc); border-radius: var(--radi); background: var(--paper); }
.sq-foto { width: 100%; aspect-ratio: 1 / 1; display: grid; }
.sq-frase { display: flex; align-items: center; gap: 3mm; font-size: 1em; font-weight: 700; line-height: 1.25; min-height: 11mm; }
.sq-frase .ordre { flex: none; width: 9mm; height: 9mm; background: var(--paper); }


.sq-uneix { height: 100%; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); column-gap: 18mm; }
.sq-ordre b { white-space: nowrap; }
.sq-col { min-height: 0; display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 4mm; }
.sq-ordre, .sq-fet { display: flex; align-items: center; gap: 3mm; padding: 0 5mm; font-size: var(--t-l); font-weight: 700; border: var(--gruix) solid var(--realce-fosc); border-radius: var(--radi); }
.sq-ordre { justify-content: space-between; background: var(--realce-suau); }
.sq-fet { background: var(--paper); line-height: 1.25; }


.sq-quatre { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3mm; }
.sq-pas2 { display: grid; grid-template-rows: auto auto; gap: 2mm; padding: 2mm; border: var(--gruix) solid var(--realce-fosc); border-radius: var(--radi); background: var(--paper); }
.sq-foto2 { width: 100%; aspect-ratio: 1 / 1; display: grid; }
.sq-frase2 { display: flex; flex-direction: column; align-items: center; gap: 2mm; text-align: center; font-size: .9em; font-weight: 700; line-height: 1.25; min-height: 18mm; }
.sq-frase2 .ordre { flex: none; width: 9mm; height: 9mm; background: var(--paper); }


.sq-requadres { height: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4mm; }
.sq-requadre { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 2mm; }
.sq-etiq { text-align: center; padding: 1mm 0; font-size: var(--t-l); font-weight: 800; background: var(--realce-suau); border-radius: 8px; }

}
}
