@layer ficha {

@scope (.cos-ficha) {

.pg { height: 100%; display: grid; gap: 5mm; }
.p1 { grid-template-rows: auto 1fr; }
.p2 { grid-template-rows: auto 1fr; }
.ex-cos { display: flex; flex-direction: column; }
.ex-cos > * { flex: 1; min-height: 0; }
.foto { position: relative; min-height: 0; }
.foto > .img, .foto > .img-ph { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: fill; }
.e1c { display: grid; grid-template-rows: 20mm auto; gap: 3mm; }
.banda { border: var(--gruix) solid var(--il-contorn); border-radius: var(--radi); overflow: hidden; }
.camins { display: grid; grid-template-rows: auto auto; gap: 3mm; }
.serie { display: grid; grid-auto-flow: column; grid-auto-columns: auto; align-items: center; justify-content: space-between; gap: 1mm; padding: 2mm 3mm; border: var(--gruix) solid var(--linia); border-radius: var(--radi); background: var(--paper); min-height: 0; }
.pedra { display: grid; place-items: center; width: 19mm; height: 14mm; border-radius: 50% / 45%; background: var(--acento-suau); border: var(--gruix) solid var(--acento); font-size: var(--t-l); font-weight: 800; }
.pedra:has(.r) { width: 22mm; height: 16mm; background: var(--paper); border-style: dashed; }
.pedra .r { width: 100%; height: 100%; border: 0; background: transparent; font-size: var(--t-l); }
.salt { display: grid; justify-items: center; font-weight: 800; color: var(--acento); font-size: var(--t-s); }
.salt i { display: block; width: 8mm; height: 0; border-top: 3px dashed var(--acento); }
.e2c { display: grid; grid-template-columns: 60mm 1fr; gap: 5mm; }
.qs { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 3mm; }
.q { font-size: var(--t-s); display: flex; align-items: center; justify-content: space-between; gap: 4mm; padding: 2mm 4mm; border: var(--gruix) solid var(--linia); border-radius: var(--radi); background: var(--paper); font-weight: 600; min-height: 0; }
.q .r { width: 5em; flex: none; }
.trias { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 2mm 4mm; flex: none; font-weight: 700; }
.rs { display: flex; align-items: center; gap: 2mm; font-size: var(--t-xl); font-weight: 800; flex: none; }
.series { display: grid; grid-template-rows: repeat(3, auto); gap: 3mm; flex: none; }

.series .pedra { width: 15mm; }
.series .pedra:has(.r) { width: 20mm; }
.menja { display: grid; grid-template-rows: minmax(0, 1.3fr) auto minmax(0, 1fr); gap: 3mm; }
.dies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; }
.dia { display: grid; grid-template-rows: auto 1fr; gap: 2mm; padding: 2mm; border: var(--gruix) solid var(--acento); border-radius: var(--radi); background: var(--acento-suau); min-height: 0; }
.etq { font-weight: 800; text-align: center; }
.pastes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1mm; align-items: center; }
.pa { position: relative; width: 100%; aspect-ratio: 1; }
.pa > .img, .pa > .img-ph { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.tots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; }
.tt { display: flex; align-items: center; justify-content: space-between; gap: 2mm; padding: 1.5mm 3mm; border: var(--gruix) solid var(--linia); border-radius: var(--radi); background: var(--paper); font-weight: 600; font-size: var(--t-s); }
.tt .r { width: 2.2em; font-size: 1.2em; flex: none; }
.casa { display: grid; grid-template-columns: 62mm 1fr; gap: 5mm; align-items: stretch; }
.casa p { display: grid; place-items: center; text-align: center; font-weight: 700; font-size: var(--t-l); padding: 3mm; border: var(--gruix) dashed var(--acento); border-radius: var(--radi); }

}
}
