@layer ficha {

@scope (.cos-ficha) {

:scope { --realce: var(--il-rosa); --realce-fosc: var(--il-blau-fosc); --realce-suau: var(--il-groc); }
.pg { height: 100%; display: grid; gap: 4mm; }
.nm-p1 { grid-template-rows: minmax(0, 1.2fr) minmax(0, 1fr); }
.nm-p2 { grid-template-rows: minmax(0, 1.12fr) minmax(0, 1fr); }
.pg > .ex { min-height: 0; }


.nm-excursio { height: 100%; display: grid; grid-template-columns: 52mm minmax(0, 1fr); gap: 5mm; }
.nm-foto-a { width: 52mm; aspect-ratio: 5 / 9; display: grid; }
.nm-foto-b { width: 52mm; aspect-ratio: 3 / 4; display: grid; }
.nm-foto-c { height: 100%; min-height: 0; aspect-ratio: 2 / 3; display: grid; }
.nm-foto-d { height: 100%; min-height: 0; aspect-ratio: 4 / 7; display: grid; }
.nm-cos { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 3mm; }
.nm-nota { display: grid; gap: 1mm; padding: 2mm 4mm; background: var(--realce-suau); border: .6mm dashed var(--realce-fosc); border-radius: 4px; font-weight: 700; line-height: 1.35; }
.nm-nota b { font-size: var(--t-l); font-weight: 900; }
.nm-opcions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 2mm 4mm; font-weight: 700; }
.nm-opcions .tria { padding: 0 3mm; background: var(--paper); border: var(--gruix) solid var(--realce-fosc); border-radius: 8px; }


.nm-horari { height: 100%; display: grid; grid-template-columns: 52mm minmax(0, 1fr); gap: 5mm; }
.nm-files { min-height: 0; display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 2mm; }
.nm-fila { display: grid; grid-template-columns: auto 18mm minmax(0, 1fr); align-items: center; gap: 4mm; padding: 0 4mm; font-size: 1.05em; background: var(--paper); border: var(--gruix) solid var(--realce-fosc); border-radius: var(--radi); }
.nm-fila b { font-weight: 900; font-size: var(--t-l); }
.nm-fila .ordre { width: 9mm; height: 9mm; background: var(--paper); }


.nm-tres { height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5mm; }
.nm-uneix { height: 100%; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: 12mm; }
.nm-col { min-height: 0; display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 3mm; align-content: stretch; }
.nm-missatge, .nm-proposit { display: flex; align-items: center; gap: 3mm; padding: 0 5mm; font-size: 1.05em; font-weight: 700; line-height: 1.25; border-radius: var(--radi); }
.nm-missatge { justify-content: space-between; background: var(--realce-suau); border: .6mm dashed var(--realce-fosc); border-radius: 4px; }
.nm-proposit { background: var(--paper); border: var(--gruix) solid var(--realce-fosc); }


.nm-completa { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); gap: 3mm 5mm; }
.nm-banc { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-around; padding: 1.5mm 4mm; background: var(--paper); border: var(--gruix) dashed var(--realce-fosc); border-radius: var(--radi); }
.nm-banc b { font-size: var(--t-l); }
.nm-rotul { font-size: var(--t-s); font-weight: 700; color: var(--realce-fosc); }
.nm-nota-gran { height: 100%; min-height: 0; display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); align-items: center; padding: 3mm 5mm; background: var(--realce-suau); border: .6mm dashed var(--realce-fosc); border-radius: 4px; font-size: var(--t-l); font-weight: 700; line-height: 1.3; text-align: center; }
.nm-nota-gran p { margin: 0; white-space: nowrap; }
.nm-nota-gran .r { vertical-align: baseline; }
.nm-nota-gran p:first-child { font-size: calc(var(--t-xl) * 1.3); letter-spacing: 1px; }
.nm-signa { display: flex; align-items: center; gap: 4mm; font-weight: 900; font-size: calc(var(--t-xl) * 1.5); letter-spacing: 6px; line-height: 1; justify-content: center; }
.nm-signa::before, .nm-signa::after { content: ""; flex: 1; border-bottom: .5mm dashed var(--realce-fosc); }

}
}
