/* Engine `lines` (DESIGN §13.1): every selector starts with `.ln-` (state classes `.is-*` allowed). Owned by package A.
   Ulica linija: the meadow of the three jobs (road, path, stream, pond), the sheep pen, the flood of „Pusti vodu!“.
   Motion is transform/opacity only; no filters, no blend modes (§8.1). */

/* ---------------------------------------------------------------- the meadow */
.ln-board-bg { fill: #FFFBF1; }
.ln-tuft { fill: none; stroke: #8CC56A; stroke-width: 2.4; stroke-linecap: round; }
.ln-scene-in { animation: ln-scene-in .4s ease-out; }
@keyframes ln-scene-in { from { opacity: .15; transform: translateX(24px); } }
.ln-glow { fill: #FFE27A; opacity: .55; animation: ln-breathe 1.3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ln-breathe { 50% { transform: scale(1.18); opacity: .28; } }
.ln-mark.is-on circle:last-child { fill: #FFE27A; }
.ln-hole.is-on ellipse { fill: #FFC53D; animation: ln-breathe 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ln-nope { fill: rgba(255, 150, 54, .3); stroke: #FF9636; stroke-width: 3; }
.ln-tree.is-shake { animation: ln-shake .3s ease-in-out 3; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes ln-shake { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.ln-bubble { animation: ln-bubble 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ln-bubble { 50% { transform: translateY(-3px); opacity: .6; } }
.ln-frog-body.is-jump { animation: ln-jump .9s cubic-bezier(.3, 1.5, .5, 1) 2; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes ln-jump { 40% { transform: translateY(-14px) scale(1.05); } }

/* ---------------------------------------------------------------- drawn lines */
.ln-road path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ln-road-edge { stroke: #24263B; }
.ln-road-top { stroke: #B9C2CF; }
.ln-road-mid { stroke: #FFFBF1; stroke-width: 2.4; stroke-dasharray: 8 7; }
.ln-gravel path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ln-gravel-edge { stroke: #24263B; }
.ln-gravel-top { stroke: #E9C99A; stroke-dasharray: 2 5; }
.ln-stream path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ln-water-edge { stroke: #24263B; }
.ln-water { stroke: #5EC3E8; }
.ln-water-flow { stroke: #BDEBFA; stroke-dasharray: 6 12; animation: ln-flow 1.1s linear infinite; }
@keyframes ln-flow { to { stroke-dashoffset: -36; } }
.ln-pond-water { fill: #5EC3E8; stroke: #24263B; stroke-width: 3; }
.ln-new { animation: ln-draw-in .45s ease-out; }
@keyframes ln-draw-in { from { opacity: 0; } }
.ln-stroke path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ln-s-olovka path { stroke: #2A6EE5; }
.ln-s-lenjir path { stroke: #3B4A6B; }
.ln-s-stubovi path { stroke: #B88A4E; }
.ln-stroke.is-preview { opacity: .85; }
.ln-stroke.is-pending path { stroke-dasharray: 9 5; }
.ln-stroke.is-wrong path { stroke: #FF9636; }
.ln-wrongline { animation: ln-wobble .3s ease-in-out 3; }
.ln-wrongline .is-leak, .ln-wrongline.is-leak { animation: ln-fade 1.1s ease-in forwards; }
@keyframes ln-wobble { 25% { transform: translateY(-2px); } 75% { transform: translateY(2px); } }
@keyframes ln-fade { to { opacity: 0; transform: translateY(14px); } }
.ln-rider { pointer-events: none; }
.ln-car-body { animation: ln-chug .25s linear infinite; }
@keyframes ln-chug { 50% { transform: translateY(-1.5px); } }

/* ---------------------------------------------------------------- the pen */
.ln-rope path { fill: none; stroke: #B88A4E; stroke-width: 4.5; stroke-linecap: round; }
.ln-rope .ln-rope-b { stroke: #9C6B3E; stroke-width: 3.5; }
.ln-rope.is-mine path { stroke: #D9A04A; }
.ln-gapline, .ln-hint-gap { fill: none; stroke: #FF9636; stroke-width: 5; stroke-dasharray: 9 7; stroke-linecap: round; }
.ln-hint-gap { stroke: #F5A300; animation: ln-dash 1s linear infinite; }
@keyframes ln-dash { to { stroke-dashoffset: -32; } }
.ln-sheep { transform-box: fill-box; transform-origin: 50% 100%; }
.ln-sheep.is-graze { animation: ln-graze 2.6s ease-in-out infinite; }
.ln-sheep.is-stay { animation: ln-land .5s cubic-bezier(.3, 1.5, .5, 1); }
.ln-sheep.is-hop { animation: ln-hop .45s ease-in-out 3; animation-delay: var(--d, 0s); }
@keyframes ln-graze { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(6deg); } 90% { transform: rotate(-3deg); } }
@keyframes ln-land { from { transform: translateY(-28px); opacity: 0; } }
@keyframes ln-hop { 50% { transform: translateY(-14px); } }
.ln-cabbage.is-munch { animation: ln-munch .3s steps(2) 4; transform-box: fill-box; transform-origin: center; }
@keyframes ln-munch { 50% { transform: scale(.82); } }
.ln-erase-h circle { fill: #FF9DB8; stroke: #24263B; stroke-width: 2.4; }
.ln-erase-h path { stroke: #24263B; stroke-width: 3; stroke-linecap: round; }
.ln-count circle { fill: #FFFBF1; stroke: #24263B; stroke-width: 2.6; }
.ln-count text { font: 900 18px var(--font, Nunito, sans-serif); fill: #24263B; }
.ln-count { animation: ln-land .25s ease-out; }
.ln-zones { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.ln-zone { position: absolute; border-radius: 50%; border: 3px dashed rgba(36, 38, 59, .35); box-sizing: border-box; }
.ln-zone.tk-drop-ok { border-color: #17A565; }
.ln-zone.tk-drop-over { background: rgba(23, 165, 101, .2); }

/* ---------------------------------------------------------------- inside: hedge, flood, items */
.ln-hedge path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ln-hedge-edge { stroke: #24263B; }
.ln-hedge-top { stroke: #3FA35A; }
.ln-hedge-dots { stroke: #7FCC4A; stroke-dasharray: 2 9; }
.ln-flood { fill: #5EC3E8; opacity: .55; }
.ln-flooding .ln-flood { animation: ln-flood 1s ease-out; transform-box: fill-box; transform-origin: center; }
.ln-flooding.is-out { opacity: 0; transition: opacity .35s; }
@keyframes ln-flood { from { transform: scale(.1); opacity: 0; } }
.ln-cell { cursor: grab; }
.ln-cell svg { width: 86%; height: 86%; display: block; pointer-events: none; }
.ln-item.is-placed { background: transparent; border-color: transparent; box-shadow: none; }
.ln-react-wet .ln-item svg { animation: ln-bob .6s ease-in-out infinite alternate; }
.ln-react-on .ln-item svg { animation: ln-hop .5s ease-in-out 2; }
.ln-react-bad { border-radius: 50%; box-shadow: 0 0 0 4px #FF9636; }
.ln-react-bad .ln-item svg { animation: ln-shake .3s ease-in-out 3; }
@keyframes ln-bob { to { transform: translateY(-4px) rotate(-4deg); } }

/* ---------------------------------------------------------------- hints, tools, surprises */
.ln-hint-ring { fill: rgba(255, 197, 61, .25); stroke: #F5A300; stroke-width: 4; animation: ln-breathe .9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ln-hint { animation: ln-btn-pulse .9s ease-in-out infinite; }
.ln-glowtool { box-shadow: 0 0 0 4px #fff, 0 0 0 8px #FFC53D; animation: ln-btn-pulse 1.2s ease-in-out infinite; }
@keyframes ln-btn-pulse { 50% { box-shadow: 0 0 0 4px #fff, 0 0 0 10px rgba(255, 197, 61, .5); } }
.ln-spark { fill: #FFE45C; stroke: #F5A300; stroke-width: 1.4; animation: ln-spark 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ln-spark { 0%, 100% { transform: scale(.3); opacity: 0; } 50% { transform: scale(1.2); opacity: 1; } }
.ln-flyby { animation: ln-flyby 1.7s ease-in-out forwards; }
@keyframes ln-flyby { from { transform: translate(-60px, 30px); opacity: 0; } 30% { opacity: 1; } to { transform: translate(120px, -10px); opacity: 0; } }
.ln-swim { animation: ln-swim 1.8s ease-in-out forwards; }
@keyframes ln-swim { from { transform: translateX(-40px); } 50% { transform: translateX(10px) translateY(-3px); } to { transform: translateX(50px); } }

@media (prefers-reduced-motion: reduce) {
  .ln-glow, .ln-hole.is-on ellipse, .ln-bubble, .ln-water-flow, .ln-sheep.is-graze, .ln-hint-ring, .ln-hint, .ln-glowtool, .ln-spark, .ln-hint-gap, .ln-car-body { animation: none !important; }
}
html[data-motion="reduce"] .ln-glow, html[data-motion="reduce"] .ln-water-flow, html[data-motion="reduce"] .ln-sheep.is-graze, html[data-motion="reduce"] .ln-hint-ring { animation: none !important; }
.ln-curtain { transition: transform .5s ease-in, opacity .5s ease-in; }
.ln-curtain.is-off { transform: translateX(-60px); opacity: 0; }
.ln-fadeline { animation: ln-fade .9s ease-in forwards; }
/* a placed item keeps a 48-px tap target even when the spot is smaller (coarse boards: 44-px spots at 35 px/unit) */
.ln-board .st-spot .ln-item.is-placed { position: absolute; left: 50%; top: 50%; width: max(48px, 100%); height: max(48px, 100%); transform: translate(-50%, -50%); }
.ln-board .st-spot .ln-item.is-placed svg { width: 100%; height: 100%; }
/* the flood: each item answers in its own way */
.ln-react-wet .ln-i-camac, .ln-react-wet .ln-i-patka { animation: ln-bob .55s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.ln-react-wet .ln-i-ovca, .ln-react-wet .ln-i-ptica { animation: ln-shake .25s ease-in-out 4; transform-box: fill-box; transform-origin: 50% 100%; }
.ln-react-wet .ln-i-cvet { animation: ln-grow .6s cubic-bezier(.3, 1.5, .5, 1) 2 alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.ln-react-bad .ln-i-cvet { animation: ln-droop .8s ease-in forwards; transform-box: fill-box; transform-origin: 50% 100%; }
.ln-react-bad .ln-i-camac, .ln-react-bad .ln-i-patka { animation: ln-stranded .6s ease-out forwards; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes ln-grow { to { transform: scale(1.18); } }
@keyframes ln-droop { to { transform: rotate(18deg) scaleY(.82); } }
@keyframes ln-stranded { to { transform: rotate(-16deg) translateY(2px); } }
