@layer ficha {

@scope (.cos-ficha) {

.p1 { height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 6mm; }
.p1 .ex:first-child .ex-cos { display: flex; }
.classe { flex: 1; display: grid; grid-auto-rows: 1fr; gap: 2.5mm; }
.mot-fila { display: grid; grid-template-columns: 26mm 1fr 48mm; align-items: center; gap: 4mm; padding: 1.5mm 4mm; border: var(--gruix) solid var(--acento); border-radius: var(--radi); background: var(--acento-suau); }
.m { font-size: var(--t-l); }
.duo { display: inline-flex; gap: 6mm; font-size: var(--t-s); }
.ton { display: flex; align-items: baseline; gap: 2mm; font-size: var(--t-s); }
.ton .r { --n: 4; width: 4.6em; font-weight: 800; }

.dieresi { display: grid; gap: 3mm; }
.parells { display: grid; grid-template-columns: 1fr 1fr; gap: 2mm 8mm; }
.parells p { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 3mm; padding: 1mm 4mm; border-bottom: 1px dashed var(--il-gris); font-size: var(--t-m); color: var(--tinta-suau); }
.parells .r { font-weight: 800; width: 9em; color: var(--tinta); }

.p2 { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 5mm; }
.p2 .ex:first-child .ex-cos { display: grid; grid-template-columns: minmax(0, 1fr) 62mm; gap: 4mm; }
.transcripcio { display: grid; grid-auto-rows: 1fr; gap: 2mm; }
.tr { display: grid; grid-template-columns: 1.8em 1fr 34mm; align-items: center; gap: 3mm; padding: 1.3mm 3mm; border: var(--gruix) solid var(--linia); border-radius: var(--radi); }
.tr .n { display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--acento); color: var(--paper); font-size: var(--t-s); }
.tr p { margin: 0; line-height: 1.3; }
.tr u { text-decoration: underline wavy var(--acento); text-underline-offset: 3px; font-weight: 700; }
.tr .r { width: 100%; font-weight: 800; }
.p2 .ex:last-child .ex-cos { display: flex; }
.escriu { flex: 1; border: var(--gruix) solid var(--acento); border-radius: var(--radi); background-color: var(--paper); min-height: 0; }

.laterals { display: flex; }
.redacta { flex: 1; display: grid; grid-template-columns: 52mm 1fr; gap: 4mm; min-height: 0; }
.foto { align-self: stretch; min-height: 0; border: var(--gruix) solid var(--il-contorn); border-radius: var(--radi); overflow: hidden; display: flex; }
.foto > .img, .foto > .img-ph { width: 100%; height: 100%; aspect-ratio: auto; }
.foto.alta { align-self: stretch; }
.foto.alta > .img, .foto.alta > .img-ph { width: 100%; height: 100%; aspect-ratio: auto; }

}
}
