/* ==========================================================================
   Masterka — dokumenty A4 (hlavičkový papír, faktura, nabídka)
   Vše v mm. Safe zóna 18 mm po stranách, 15 mm nahoře/dole (kancelářské tiskárny
   netisknou ~5 mm od okraje → žádné spadávky, pozadí bílé kvůli tisku).
   Text v .body je contenteditable: klikni, přepiš, Cmd+P → Uložit jako PDF.
   ========================================================================== */
.doc { background: #fff; color: var(--void); font-size: 9.5pt; line-height: 1.55; }
.doc .mono { font-size: 6.6pt; letter-spacing: .16em; }
.doc .hd, .doc .ft { left: 18mm; right: 18mm; }
.doc .hd .wm { position: absolute; font-size: 13mm; }
.doc .hd .who, .doc .hd .ct { position: absolute; font-family: var(--f-mono); font-size: 6.6pt; letter-spacing: .12em; text-transform: uppercase; line-height: 1.8; }
.doc .hd .who b { display: block; font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 12pt; letter-spacing: 0; text-transform: none; line-height: 1.2; }
.doc .hd .star { position: absolute; color: var(--accent); }
.doc .ft { bottom: 15mm; display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 6.4pt; letter-spacing: .12em; text-transform: uppercase; color: #6b6b66; }
.doc .body { left: 18mm; right: 18mm; top: 62mm; bottom: 30mm; outline: none; }
.doc .body:focus { box-shadow: inset 0 0 0 .3mm rgba(0,179,255,.4); }

/* ---- typografie obsahu ---- */
.doc h1 { font-family: var(--f-serif); font-weight: 400; font-size: 34pt; line-height: .95; letter-spacing: -.02em; }
.doc h1 em { color: var(--accent); }
.doc h2 { font-family: var(--f-mono); font-weight: 700; font-size: 6.8pt; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 2mm; }
.doc p { margin: 0 0 3.2mm; max-width: 150mm; }
.doc .lbl { font-family: var(--f-mono); font-size: 6.4pt; letter-spacing: .14em; text-transform: uppercase; color: #8a8a85; display: block; margin-bottom: 1mm; }
.doc .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; }
.doc .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4mm; }
.doc .box { border-top: .3mm solid var(--void); padding-top: 2.4mm; }
.doc table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.doc th { font-family: var(--f-mono); font-weight: 700; font-size: 6.4pt; letter-spacing: .14em; text-transform: uppercase; text-align: left; color: #6b6b66; padding: 2mm 0; border-bottom: .3mm solid var(--void); }
.doc td { padding: 2.6mm 0; border-bottom: .2mm solid rgba(10,10,10,.12); vertical-align: top; }
.doc td.r, .doc th.r { text-align: right; }
.doc .total { display: flex; justify-content: space-between; align-items: baseline; border-top: .6mm solid var(--void); margin-top: 3mm; padding-top: 3mm; }
.doc .total b { font-family: var(--f-serif); font-weight: 400; font-style: italic; font-size: 24pt; }
.doc .sign { font-family: var(--f-serif); font-style: italic; font-size: 20pt; margin-top: 8mm; line-height: 1; }
.doc .qr { width: 26mm; height: 26mm; border: .3mm dashed #b5b5b0; display: grid; place-items: center; font-family: var(--f-mono); font-size: 5.6pt; letter-spacing: .1em; color: #9a9a95; text-align: center; }
.doc .muted { color: #6b6b66; }
.doc .chip { display: inline-block; font-family: var(--f-mono); font-size: 6.2pt; letter-spacing: .14em; text-transform: uppercase; padding: .8mm 2.4mm; border-radius: 9mm; background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* ---- 01 Classic ---- */
.d1 .hd { top: 15mm; height: 30mm; border-bottom: .3mm solid var(--void); }
.d1 .hd .wm { left: 0; top: 2mm; }
.d1 .hd .who { left: 92mm; top: 3.5mm; }
.d1 .hd .ct { right: 0; top: 3.5mm; text-align: right; }
.d1 .hd .star { display: none; }

/* ---- 02 Accent rule ---- */
.d2 .hd { top: 15mm; height: 32mm; }
.d2 .hd::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2.2mm; background: var(--grad); border-radius: 2mm; }
.d2 .hd .wm { left: 0; top: 9mm; }
.d2 .hd .who { right: 0; top: 9mm; text-align: right; }
.d2 .hd .ct { right: 0; top: 19mm; text-align: right; color: #6b6b66; }
.d2 .hd .star { display: none; }
.d2 .ft { border-top: .3mm solid rgba(10,10,10,.15); padding-top: 3mm; }

/* ---- 03 Void header ---- */
.d3 .hd { top: 15mm; height: 36mm; background: var(--void); border-radius: 5mm; overflow: hidden; color: #fff; }
.d3 .hd::before { content: ''; position: absolute; width: 90mm; height: 90mm; right: -30mm; top: -30mm; border-radius: 50%; background: radial-gradient(circle, rgba(255,68,0,.85), transparent 65%); filter: blur(6mm); }
.d3 .hd .wm { left: 8mm; top: 11mm; color: #fff; }
.d3 .hd .who { left: 8mm; top: 25mm; } .d3 .hd .who b { display: inline; font-size: 9pt; margin-right: 2mm; }
.d3 .hd .ct { right: 8mm; top: 9mm; text-align: right; color: rgba(255,255,255,.75); }
.d3 .hd .star { right: 8mm; bottom: 7mm; width: 4.5mm; }
.d3 .body { top: 64mm; }

/* ---- 04 Swiss ---- */
.d4 .hd { top: 15mm; height: 34mm; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 5mm; }
.d4 .hd > * { position: static !important; border-top: .5mm solid var(--void); padding-top: 2.4mm; }
.d4 .hd .wm { font-size: 10mm; line-height: 1; }
.d4 .hd .star { display: none !important; }
.d4 .hd .ct::before { content: '✦ Masterka Design'; display: block; color: var(--accent); font-weight: 700; }
.d4 .ft { border-top: .5mm solid var(--void); padding-top: 3mm; color: var(--void); }

/* ---- 05 Flash ---- */
.d5 .hd { top: 13mm; height: 40mm; }
.d5 .hd .wm { left: 0; right: 0; top: 13mm; text-align: center; }
.d5 .hd .who { left: 0; right: 0; top: 4mm; text-align: center; } .d5 .hd .who b { display: none; }
.d5 .hd .ct { left: 0; right: 0; top: 29mm; text-align: center; color: #6b6b66; }
.d5 .hd .ct br { display: none; } .d5 .hd .ct span + span::before { content: '\00a0\00a0✦\00a0\00a0'; color: var(--accent); }
.d5 .hd .star { display: none; }
.d5 .ilu1 { right: 18mm; top: 15mm; width: 14mm; transform: rotate(8deg); }
.d5 .ilu2 { display: none; }
.d5 .ft { justify-content: center; gap: 8mm; }
.d5 .body { top: 64mm; }
