/* Uporedni horoskop: strana sa formom (/uporedni-horoskop) i rezultat (/vas-uporedni-horoskop) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .uh-pano, .uh-ploca { view-transition-name: uh-krug; }
  ::view-transition-group(uh-krug) { animation-duration: .9s; animation-timing-function: cubic-bezier(.4,.1,.2,1); }
  ::view-transition-old(uh-krug), ::view-transition-new(uh-krug) { height: 100%; object-fit: contain; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .6s; }
}
.uh-izvor { position: absolute; }
.uh-senka { fill: #0b0c0a; transform: translate(5px,6px); }
.uh-figura { fill: #dfc491; }

/* ---------- Dva prstena ---------- */
.uh-strana { background: #121413; }
.uh-uvod h1 { font-size: clamp(1.8rem, 3.3vw, 3.1rem); }
.uh-scena { width: 100%; min-width: 0; margin: 0; display: flex; flex-direction: column; align-items: center; scroll-margin-top: 1rem; font-family: var(--ast-tekst-font); }
.uh-pano { width: min(100%, 720px); aspect-ratio: 960 / 580; }
.uh-pano svg { display: block; width: 100%; height: 100%; overflow: visible; }
.uh-telo { filter: drop-shadow(7px 11px 10px rgba(0,0,0,.62)); }
.uh-ivica1, .uh-ivica2, .uh-linija { fill: none; stroke-width: 3; stroke: url(#uh-i1); }
.uh-ivica2 { stroke: url(#uh-i2); }
.uh-A .uh-linija { stroke: #cfa95f; stroke-width: 1.8; }
.uh-B .uh-linija { stroke: #b4babd; stroke-width: 1.8; }
.uh-crtica { stroke: rgba(8,9,8,.75); stroke-width: 2; }
.uh-A .izabran .uh-figura { fill: #fff0c4; }
.uh-B .uh-figura, .uh-sredina.uh-b .uh-figura { fill: #c9cfd1; }
.uh-B .izabran .uh-figura { fill: #fff; }
.uh-sredina .uh-figura { fill: #e6cb96; }
.uh-iskra { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .uh-sredina.novo use { animation: uh-figura .9s ease-out; }
  .uh-iskra { animation: uh-iskra 4.2s ease-in-out infinite; }
  .spaja .uh-iskra { animation: uh-bljesak 2s ease-in forwards; }
}
@keyframes uh-figura { from { opacity: 0; filter: brightness(1.8) blur(4px); } }
@keyframes uh-iskra { 50% { opacity: .5; transform: scale(.82); } }
@keyframes uh-bljesak { to { transform: scale(2.1); } }
.uh-natpis { display: grid; gap: .1rem; min-height: 3.4rem; margin: .3rem 0 0; text-align: center; }
.uh-natpis strong { font: 400 clamp(1.2rem, 1.8vw, 1.55rem)/1.2 var(--ast-font); color: #f3dfae; text-shadow: .018em .022em 0 rgba(6,6,4,.9), .075em .1em .09em rgba(0,0,0,.6); }
.uh-natpis span { font-size: .92rem; color: #b9a67f; }
.racuna .uh-natpis { opacity: 0; transition: opacity .4s; }

/* ---------- Forma za dve osobe ---------- */
.uh-strana .forma { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 2.4rem; }
.uh-strana .osoba { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem .9rem; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; }
.uh-strana .osoba + .osoba::before { content: ''; position: absolute; left: -1.2rem; top: .3rem; bottom: .3rem; width: 1px; background: linear-gradient(transparent,rgba(217,185,117,.45) 20% 80%,transparent); }
.uh-strana .osoba legend { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem; margin: 0; padding: 0 0 .7rem; font: 400 1.06rem/1.2 var(--ast-font); color: #f0d9a4; }
.uh-strana .osoba legend::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%,#fff0c2,#d8b368 45%,#7c5925); box-shadow: 1px 2px 3px rgba(0,0,0,.6); }
.uh-strana .osoba + .osoba legend { color: #d5dadc; }
.uh-strana .osoba + .osoba legend::before { background: radial-gradient(circle at 35% 30%,#fff,#b9bfc2 45%,#5d6467); }
.uh-strana .osoba .forma-red:not([hidden]) { display: contents; }
.uh-strana .osoba .polje-mesto { grid-column: 1 / -1; }
.uh-strana .polje-siroko { grid-column: auto; }
.uh-strana .neobavezno { position: absolute; top: .12rem; right: 0; letter-spacing: 0; text-transform: none; font-family: var(--ast-tekst-font); font-size: .7rem; color: #a39a88; }
.pocetna.uh-strana #nk-dugme { grid-column: 1 / -1; grid-row: auto; justify-self: center; min-width: 20rem; margin-top: .1rem; }
.pocetna.uh-strana .forma-napomena { grid-column: 1 / -1; grid-row: auto; }
@media (min-width: 961px) and (min-height: 600px) {
  .uh-scena { min-height: 0; }
  .uh-scena .uh-pano { flex: 1 1 0; min-height: 0; width: auto; max-width: 100%; }
  .uh-strana .ast-uvod { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); min-height: 300px; }
}
@media (max-width: 960px) { .uh-strana .osoba { gap: .8rem .9rem; } }
@media (max-width: 760px) {
  .uh-uvod h1 { font-size: clamp(1.5rem, 7.6vw, 2.6rem); }
  .uh-uvod .ast-uvod { display: flex; flex-direction: column; }
  .uh-uvod .ast-tekst { display: contents; }
  .uh-uvod .ast-unos { align-self: flex-start; }
  .uh-scena { margin: 1rem 0 1.2rem; }
  .uh-strana .forma { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .uh-strana .osoba { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uh-strana .osoba + .osoba::before { display: none; }
  .uh-strana .osoba .polje-siroko { grid-column: 1 / -1; }
  .pocetna.uh-strana #nk-dugme { min-width: 0; width: 100%; }
}

/* Tekstovi */
.uh-strana .clanak strong { font-weight: 600; color: #f0d9a4; }
.uh-strana .clanak a { color: #e0c68e; text-underline-offset: 4px; text-decoration-color: rgba(201,170,112,.5); }
.uh-strana .clanak p + p, .uh-strana .clanak ul + p { margin-top: 1rem; }
.uh-strana .clanak ul { margin: 1rem 0 0; padding-left: 1.2rem; }
.uh-strana .clanak li { margin-bottom: .5rem; }

/* ---------- Rezultat ---------- */
.uh-karta-strana .karta-telo { padding-top: 0; }
.uh-vrh { padding: calc(var(--ast-traka) + clamp(1.4rem, 3vw, 2.6rem)) 0 clamp(2rem, 4vw, 3.4rem); background: radial-gradient(ellipse 60% 60% at 32% 46%,rgba(96,94,82,.28),transparent); font-family: var(--ast-tekst-font); }
.uh-vrh-red { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.6rem, 4.5vw, 4.5rem); align-items: center; }
.uh-krug-okvir { margin: 0; min-width: 0; }
.uh-ploca { position: relative; isolation: isolate; width: min(100%, 620px); aspect-ratio: 1; margin: 0 auto; }
.uh-ploca::before { content: ''; position: absolute; z-index: -1; inset: 0; border-radius: 50%;
  background: linear-gradient(140deg,rgba(255,246,222,.18),transparent 42%,rgba(0,0,0,.42)), url('../img/kamen-reljef-malo.webp') 40% 30% / 760px, #35352f; box-shadow: inset 2px 2px 1px rgba(255,246,222,.3), inset -2px -3px 2px rgba(0,0,0,.75), inset -10px -12px 26px rgba(0,0,0,.4), 2px 3px 3px rgba(0,0,0,.7), 12px 18px 38px rgba(0,0,0,.62); }
.uh-ploca svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.uk-tama { fill: rgba(9,10,9,.42); }
.uk-dubina { fill: rgba(6,7,6,.62); }
.uk-znak { stroke: rgba(8,9,8,.85); stroke-width: 2; }
.uk-znak.tamno { fill: rgba(9,10,9,.34); }
.uk-znak.svetlo { fill: rgba(232,224,204,.1); }
.uk-linija { fill: none; stroke: #c9a45c; stroke-width: 1.8; }
.uk-tanka { fill: none; stroke: rgba(217,185,117,.3); }
.uk-crtica { stroke-width: 2.2; }
.uk-crtica.uk-a { stroke: #ffe2a7; } .uk-crtica.uk-b { stroke: #dfe4e6; }
.uk-planeta circle { filter: drop-shadow(2px 3px 2px rgba(0,0,0,.65)); }
.uk-planeta text { font-size: 20px; text-anchor: middle; dominant-baseline: central; fill: #24180a; }
.uk-planeta.uk-m-srebro text { fill: #191c1e; }
.uk-planeta .uk-ac { font: 500 12.5px var(--ast-font); }
.uk-veza { fill: none; stroke-linecap: round; opacity: var(--j, .9); transition: opacity .25s, filter .25s; cursor: pointer; }
.uk-veza.lak { stroke: #8cbbe8; } .uk-veza.tezak { stroke: #d96a4f; }
.uk-veza.spoj { fill: #fff0c4; filter: drop-shadow(0 0 6px rgba(255,205,110,.95)); }
.bira .uk-veza { opacity: .1; }
.bira .uk-veza.izabrano { opacity: 1; filter: drop-shadow(0 0 5px rgba(255,205,110,.9)); }
.uk-planeta { transition: opacity .25s; }
.bira .uk-planeta { opacity: .35; } .bira .uk-planeta.izabrano { opacity: 1; }
.uh-legenda { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.4rem; margin-top: 1.1rem; font-size: .84rem; color: #b9a67f; }
.uh-legenda[hidden] { display: none; }
.uh-legenda span::before { content: ''; display: inline-block; width: 22px; height: 3px; margin-right: .5rem; vertical-align: middle; border-radius: 2px; background: #8cbbe8; }
.uh-legenda .uh-l-tezak::before { background: #d96a4f; }
.uh-legenda .uh-l-spoj::before { width: 9px; height: 9px; border-radius: 50%; background: #fff0c4; box-shadow: 0 0 6px rgba(255,205,110,.95); }
.uh-legenda em { flex-basis: 100%; min-height: 1.4em; font-style: normal; text-align: center; color: #f0d9a4; }

.uh-glava h1 { margin: 0 0 1rem; font: 400 clamp(2rem, 3.9vw, 3.4rem)/1.12 var(--ast-font); color: #f3dfae; text-shadow: -.012em -.014em 0 rgba(255,246,222,.28), .018em .022em 0 rgba(6,6,4,.9), .035em .045em .02em rgba(6,6,4,.75), .075em .1em .09em rgba(0,0,0,.6); overflow-wrap: anywhere; text-wrap: balance; }
.uh-glava h1 span { display: block; margin-bottom: .5rem; font-size: clamp(1.1rem, 1.8vw, 1.45rem); line-height: 1.2; color: var(--ast-gravura); }
.uh-glava h1 i { font-style: normal; }
.uh-glava .karta-podaci span { font-size: inherit; color: inherit; }
.uh-glava .karta-podaci span::before { content: none; }
.uh-glava .uh-ko-red { display: block; font-size: .95rem; }
.uh-ko { font-weight: 500; }
.karta-telo .uh-ko-a { color: #ecc983; } .karta-telo .uh-ko-b { color: #cfd6d9; }
.karta-telo .karta-podaci .uh-ko::before { content: ''; display: inline-block; width: 11px; height: 11px; margin-right: .5rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%,#fff0c2,#d8b368 45%,#7c5925); }
.karta-telo .karta-podaci .uh-ko-b::before { background: radial-gradient(circle at 35% 30%,#fff,#b9bfc2 45%,#5d6467); }
.uh-sklad { display: grid; gap: .5rem; margin: 1.5rem 0 1.2rem; }
.uh-broj { display: flex; align-items: baseline; gap: .8rem; }
.karta-telo .uh-broj strong { font: 400 clamp(2.6rem, 4.4vw, 3.6rem)/1 var(--ast-font); color: #f3dfae; font-variant-numeric: lining-nums; text-shadow: .018em .022em 0 rgba(6,6,4,.9), .075em .1em .09em rgba(0,0,0,.6); }
.uh-broj small { font-size: .55em; }
.uh-broj span { color: #c9b994; }
.uh-zleb { height: 18px; border-radius: 9px; padding: 4px; background: rgba(5,6,5,.6); box-shadow: inset 2px 3px 5px rgba(0,0,0,.85), 1px 1px 0 rgba(255,246,222,.14); }
.uh-zleb span { display: block; width: var(--p); min-width: 10px; height: 100%; border-radius: 5px; background: linear-gradient(180deg,rgba(255,255,255,.35),transparent 45%,rgba(0,0,0,.32)), linear-gradient(90deg,#8a6430,#d9b975 70%,#ffe7ae); box-shadow: 1px 2px 3px rgba(0,0,0,.6); }
.uh-cinjenice { grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 0; margin-bottom: 1.4rem; }
.uh-cinjenice .hd-cinjenica:first-child { grid-column: auto; padding: .7rem .95rem .8rem; }
.karta-telo .uh-cinjenice .hd-cinjenica strong, .karta-telo .uh-cinjenice .hd-cinjenica:first-child strong { align-self: end; font-size: 1.5rem; }
.uh-cinjenica { grid-template-rows: 1fr auto; }
.greska-karte :is(.hd-ispod, .uh-sklad, .uh-cinjenice, .uh-ploca) { display: none; }

.uh-oblasti { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(2rem, 5vw, 4.5rem); }
.uh-oblast-glava { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.hd-ispod .uh-oblast h3 { margin: 0; font-size: 1.25rem; }
.uh-oblast-glava span { font: 400 1.3rem/1 var(--ast-font); color: #f0d9a4; }
.uh-oblast p { margin: .8rem 0 0; text-wrap: pretty; }
.karta-telo .uh-oblast .mala { margin-top: .3rem; }
.karta-telo .tumacenje.uh-znaci { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.2rem; align-items: center; }
.uh-par { display: flex; }
.uh-par .tum-medaljon { left: 0; width: 84px; }
.uh-par .tum-medaljon + .tum-medaljon { margin-left: -14px; }
.uh-par .tum-medaljon + .tum-medaljon .znak-figura { filter: grayscale(.85) brightness(1.15); }
.karta-telo .uh-znaci h3 { font-size: 1.12rem; margin-bottom: .4rem; }
.planeta-dugme.srebro { background: radial-gradient(circle at 35% 30%,#fff,#b9bfc2 45%,#5d6467); color: #191c1e; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.karta-telo .uh-veza h3 { gap: .5rem .7rem; font-size: 1.05rem; }
.uh-veza .planeta-dugme { width: 38px; height: 38px; font-size: 1.1rem; }
.uh-veza-ime { display: grid; line-height: 1.2; }
.uh-veza-ime .uh-ko { font: 500 .78rem/1.3 var(--ast-tekst-font); text-shadow: none; overflow-wrap: anywhere; }
.uh-veza-ime small { font: 400 .78rem/1.3 var(--ast-tekst-font); color: #a99d89; }
.hd-ispod #uh-spaja .karta-vise, .hd-ispod #uh-rast .karta-vise { margin-top: 1.2rem; }
#uh-mreza .tabela-okvir { position: relative; max-width: 100%; overflow-x: auto; }
.karta-telo .mreza-aspekata { width: auto; margin: 0 auto 1.2rem; }
.karta-telo .mreza-aspekata th, .karta-telo .mreza-aspekata td { min-width: 2.6rem; padding: .3rem .35rem; text-align: center; }
.karta-telo .mreza-aspekata tbody th { display: flex; align-items: center; gap: .6rem; text-align: left; }
.mreza-aspekata .planeta-dugme { width: 32px; height: 32px; margin: 0 auto; font-size: 1rem; }
.mreza-aspekata tbody .planeta-dugme { margin: 0; }
.karta-telo .tabela .planeta-dugme.svetlo { color: #2a1c06; }
.karta-telo .tabela .planeta-dugme.srebro { color: #191c1e; }
.uh-veza .planeta-dugme.slova, .mreza-aspekata .planeta-dugme.slova { font-size: .8rem; }
.karta-telo .mreza-aspekata td .glif { color: inherit; }

@media (prefers-reduced-motion: no-preference) {
  .uh-rezultat-skriveno, .ceka .uh-glava .hd-dugmad { opacity: 0; }
  .budi .uk-veza:not(.spoj) { stroke-dasharray: 1; animation: uk-crta 1.3s cubic-bezier(.4,.1,.3,1) 1.5s backwards; }
  .budi .uk-veza.spoj { animation: uk-pojava .8s ease-out 2.4s backwards; }
  .budi .uk-planeta { animation: uk-pojava .5s ease-out calc(.1s + var(--i) * .06s) backwards; }
  .budi .uk-planeta.uk-b { animation-delay: calc(.7s + var(--i) * .06s); }
  .budi .uh-sklad .uh-zleb span { animation: uh-puni 1.6s cubic-bezier(.3,.6,.2,1) 2.2s backwards; }
  .budi .uh-glava h1 { animation: uk-natpis 1s ease-out .2s backwards; }
  .budi .uh-broj, .budi .uh-cinjenice .hd-cinjenica { animation: uk-natpis .8s ease-out 2s backwards; }
}
@keyframes uk-crta { from { stroke-dashoffset: 1; opacity: 0; } to { stroke-dashoffset: 0; } }
@keyframes uk-pojava { from { opacity: 0; } }
@keyframes uk-natpis { from { opacity: 0; filter: brightness(2) blur(3px); } }
@keyframes uh-puni { from { width: 0; } }

@media (max-width: 860px) {
  .uh-vrh-red { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .uh-ploca { width: min(100%, 460px); }
  .uh-glava h1, .uh-glava .karta-podaci, .uh-glava .hd-dvaput { text-align: center; }
  .uh-broj { justify-content: center; }
  .uh-oblasti { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .uh-oblast p { font-size: .9375rem; }
}
@media (max-width: 680px) {
  .uh-glava .hd-dugmad { display: grid; grid-template-columns: minmax(0, 1fr); }
  .uh-cinjenice .hd-cinjenica span { font-size: .64rem; letter-spacing: .06em; }
  .uh-mreza-ime { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .karta-telo .uh-veza h3 { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: .6rem .55rem; }
  .uh-veza h3 .asp-oznaka { order: 5; grid-column: 1 / -1; justify-self: start; margin: 0; }
  .uh-par .tum-medaljon { width: 66px; }
  .karta-telo .tumacenje.uh-znaci { gap: .9rem; }
}
@media print {
  .uh-vrh { background: none; padding: 0; }
  .uh-vrh-red { display: block; }
  .uh-vrh .uh-ploca { width: 11cm; margin: 0 auto .4cm; break-inside: avoid; }
  .uh-ploca::before { box-shadow: none !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .uk-veza, .uk-planeta, .uh-zleb span, .uh-broj, .uh-glava h1, .hd-cinjenica { animation: none !important; }
  .uh-zleb, .uh-zleb span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .uh-zleb { border: 1px solid #999; background: none; }
  .uh-oblast, .uh-par { break-inside: avoid; }
  .uh-par { display: none; }
  .karta-telo .tumacenje.uh-znaci { display: block; }
  .uh-legenda em { display: none; }
  .bira .uk-veza { opacity: var(--j, .9) !important; } .bira .uk-planeta { opacity: 1 !important; }
  #uh-mreza { display: none; }
}
