/* «Li-On суши» — живая миниатюра заказа (track.js). День = снежная диорама, html.night = полярная ночь. */
.tk { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 1.25; margin: 10px 0 16px;
  box-shadow: var(--shadow); background: #EAF3F3; isolation: isolate; -webkit-tap-highlight-color: transparent; }
html.night .tk { background: #0F2440; }
.tk-svg { width: 100%; height: 100%; display: block; cursor: zoom-in; }
.tk-svg text { font-family: "Onest", system-ui, sans-serif; }

/* --- небо */
.tk-sky { fill: url(#tkSkyDay); }
html.night .tk-sky { fill: url(#tkSkyNight); }
.tk-stars, .tk-aurora { opacity: 0; transition: opacity .6s; }
html.night .tk-stars { opacity: 1; } html.night .tk-aurora { opacity: .75; }
.tk-stars circle { fill: #fff; animation: tkTwinkle 2.8s ease-in-out infinite; }
@keyframes tkTwinkle { 50% { opacity: .25; } }
.tk-aurora { mix-blend-mode: screen; animation: tkAur 9s ease-in-out infinite alternate; }
@keyframes tkAur { to { transform: translate(-18px, 6px); } }
.tk-sun { fill: #FFF6D8; opacity: .9; }
html.night .tk-sun { fill: #E9EEF6; opacity: .95; }
.tk-clouds ellipse { fill: #fff; opacity: .85; }
html.night .tk-clouds { opacity: .12; }
.tk-clouds .c1 { animation: tkCloud 26s linear infinite alternate; } .tk-clouds .c2 { animation: tkCloud 34s linear infinite alternate-reverse; }
@keyframes tkCloud { to { transform: translateX(40px); } }

/* --- горы и дым вулкана */
.tk-mount .far { fill: #A9C0CE; } .tk-mount .near { fill: #8BA6B9; } .tk-mount .snowcap { fill: #FBFAF6; }
html.night .tk-mount .far { fill: #172C48; } html.night .tk-mount .near { fill: #1D3657; } html.night .tk-mount .snowcap { fill: #C9D6E6; }
.tk-smoke circle { fill: #fff; opacity: 0; animation: tkSmoke 4.5s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.tk-smoke circle:nth-child(2) { animation-delay: 1.5s; } .tk-smoke circle:nth-child(3) { animation-delay: 3s; }
@keyframes tkSmoke { 0% { opacity: .7; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(14px, -26px) scale(2.2); } }
html.night .tk-smoke circle { fill: #9FB2C8; }

/* --- плита-диорама */
.tk-ground-shadow { fill: #0F1B2D; opacity: .12; }
.tk-side { fill: #A7BEC9; } .tk-strata { stroke: #7F6A58; stroke-width: 4; fill: none; opacity: .55; } .tk-strata.s2 { stroke: #5E4D40; opacity: .45; }
.tk-top { fill: #FBFAF6; }
html.night .tk-side { fill: #10223A; } html.night .tk-top { fill: #22385A; } html.night .tk-strata { stroke: #0A1626; opacity: .8; }
.tk-drifts ellipse { fill: #EEF2F2; } html.night .tk-drifts ellipse { fill: #284266; }
.tk-stream { stroke: #9CCFE0; stroke-width: 9; fill: none; stroke-linecap: round; }
html.night .tk-stream { stroke: #2A5C86; }
.tk-road-edge { stroke: #D2DDE2; stroke-width: 16; fill: none; stroke-linecap: round; }
.tk-road { stroke: #E7EDEF; stroke-width: 12; fill: none; stroke-linecap: round; }
.tk-road-mid { stroke: #B8C7CF; stroke-width: 1.2; stroke-dasharray: 3 5; fill: none; }
.tk-road-done { stroke: #F2643D; stroke-width: 2.6; fill: none; stroke-linecap: round; opacity: .85; }
.tk-path { stroke: #E7EDEF; stroke-width: 6; fill: none; stroke-linecap: round; }
html.night .tk-road-edge { stroke: #1A2E4A; } html.night .tk-road, html.night .tk-path { stroke: #2E4A70; } html.night .tk-road-mid { stroke: #4E6C92; }
.tk-deck { stroke: #7C5A3F; stroke-width: 14; fill: none; } .tk-deck-planks { stroke: #B48660; stroke-width: 13; stroke-dasharray: 2.6 1; fill: none; } .tk-plank-l { stroke: #7C5A3F; stroke-width: .7; } .tk-rail { stroke: #6B4A35; stroke-width: 1.4; stroke-linecap: round; } .tk-post { fill: #5A3D2B; }
.tk-shadow { fill: #0F1B2D; opacity: .14; }
html.night .tk-shadow { opacity: .3; }

/* --- деревья */
.tk-pine { fill: #2F6B5E; } .tk-tcap { fill: #FBFAF6; }
html.night .tk-pine { fill: #17423F; } html.night .tk-tcap { fill: #C9D6E6; }

/* --- кухня */
.tk-wood { fill: #B5835A; } .tk-wood-line { stroke: #94663F; stroke-width: .8; }
.tk-roof { fill: #2B4A6B; } .tk-roof.h { fill: #C94B28; } .tk-roof-snow { fill: #FBFAF6; }
.tk-chim { fill: #6E5442; }
.tk-sign { fill: #0F1B2D; } .tk-sign-t { fill: #F4F2EC; font-family: "Dela Gothic One", system-ui, sans-serif !important; font-size: 7.4px; letter-spacing: .08em; }
.tk-win { fill: #BFD9E6; transition: fill .6s; } .tk-win-x { stroke: #6B4A35; stroke-width: 1.2; }
.tk-door { fill: #6B4A35; } .tk-door.h { fill: #1F3A5F; }
.tk-house { fill: #E9DCC6; }
html.night .tk-wood { fill: #6E4E37; } html.night .tk-house { fill: #6A6074; } html.night .tk-roof { fill: #18304C; } html.night .tk-roof.h { fill: #7A2F1B; }
html.night .tk-roof-snow { fill: #C9D6E6; } html.night .tk-wood-line { stroke: #4E3727; }
/* окна и фонари загораются */
.tk-glow { opacity: 0; transition: opacity .8s; }
html.night .h-glow, html.night .l-glow { opacity: 1; }
html.night .h-win { fill: #FFD27A; }
.tk-svg:not(.stage-new) .k-win { fill: #FFE3A3; }
html.night .tk-svg:not(.stage-new) .k-win { fill: #FFD27A; }
html.night .tk-svg:not(.stage-new) .k-glow { opacity: 1; }
.tk-svg.stage-cooking .k-glow, .tk-svg.stage-packing .k-glow { opacity: .7; }
.tk-chim-smoke circle { fill: #E3E9EC; opacity: 0; animation: tkSmoke 3.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.tk-chim-smoke circle:nth-child(2) { animation-delay: 1.6s; }
.tk-svg.stage-cooking .tk-chim-smoke circle { animation-duration: 1.4s; }
.tk-svg.stage-new .tk-chim-smoke { display: none; }
html.night .tk-chim-smoke circle { fill: #7F93AA; }
.tk-lantern { transform-box: fill-box; transform-origin: 50% 0; animation: tkSway 3s ease-in-out infinite; }
@keyframes tkSway { 50% { transform: rotate(6deg); } }
.tk-num { fill: #0F1B2D; } .tk-num-t { fill: #F4F2EC; font-size: 5.4px; font-weight: 700; }

/* гирлянда ночью */
.tk-garland circle { opacity: 0; }
html.night .tk-garland circle { opacity: 1; animation: tkTwinkle 1.3s ease-in-out infinite; }
.tk-garland .g0 { fill: #F2643D; } .tk-garland .g1 { fill: #2BB39B; } .tk-garland .g2 { fill: #FFD27A; }

/* --- прилавок */
.tk-counter-top { fill: #8B6141; } .tk-counter { fill: #A77B57; } .tk-board { fill: #E3C9A0; }
.tk-steam path { stroke: #fff; stroke-width: 1.4; fill: none; stroke-linecap: round; opacity: 0; animation: tkSteam 1.6s ease-out infinite; }
.tk-steam path:nth-child(2) { animation-delay: .8s; }
@keyframes tkSteam { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-8px); } }
html.night .tk-steam path { stroke: #B9C7D8; }
.tk-rolls g { transform-box: fill-box; transform-origin: center; animation: tkPop 3.6s cubic-bezier(.16, 1, .3, 1) infinite; }
.tk-rolls .r2 { animation-delay: .7s; } .tk-rolls .r3 { animation-delay: 1.4s; }
@keyframes tkPop { 0% { transform: scale(0); } 12%, 100% { transform: scale(1); } }
.tk-box { transform-box: fill-box; transform-origin: 50% 100%; animation: tkBoxHop 1.1s ease-in-out infinite; }
@keyframes tkBoxHop { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-3px) scale(.96, 1.04); } 60% { transform: translateY(0) scale(1.06, .94); } }

/* --- люди */
.tk-cheek { fill: #F28B7A; opacity: .5; }
.tk-toque { fill: #fff; stroke: #CBD5DE; stroke-width: .5; }
.tk-person .arm { transform-origin: 7.8px -21px; }
.tk-person .arm-l { transform-origin: -7.8px -21px; }
.tk-svg.stage-cooking .tk-chef .arm { animation: tkChop .32s ease-in-out infinite alternate; }
@keyframes tkChop { from { transform: rotate(-38deg); } to { transform: rotate(8deg); } }
.tk-svg.stage-packing .tk-chef .arm, .tk-svg.stage-packing .tk-chef .arm-l { animation: tkWrap .5s ease-in-out infinite alternate; }
@keyframes tkWrap { to { transform: rotate(-22deg); } }
.tk-svg.stage-packing .tk-chef .arm-l { animation-name: tkWrapL; }
@keyframes tkWrapL { to { transform: rotate(22deg); } }
.tk-svg.stage-accepted .tk-chef .arm { animation: tkThumb .9s ease-in-out infinite alternate; }
@keyframes tkThumb { to { transform: rotate(-150deg); } }
.tk-chef { animation: tkBreath 2.4s ease-in-out infinite; }
@keyframes tkBreath { 50% { transform: translateY(-.6px); } }
.waving .arm { animation: tkWave .45s ease-in-out infinite alternate; }
@keyframes tkWave { from { transform: rotate(-120deg); } to { transform: rotate(-170deg); } }
.walking .legs .leg1 { animation: tkStep .36s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 0; }
.walking .legs .leg2 { animation: tkStep .36s ease-in-out infinite alternate-reverse; transform-box: fill-box; transform-origin: 50% 0; }
@keyframes tkStep { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
.walking .tk-person { animation: tkBob .36s ease-in-out infinite alternate; }
@keyframes tkBob { to { transform: translateY(-1.2px); } }
.tk-gift { display: none; }
.tk-svg.stage-done .tk-gift { display: inline; }
.tk-svg.stage-done.mode-delivery .tk-cust .arm-l { transform: rotate(-60deg); }

/* --- курьер */
.tk-beam { fill: #FFE9A8; opacity: 0; }
html.night #tkCourier.moving .tk-beam { opacity: .18; }
#tkCourier.moving .tk-bob { animation: tkRide .5s ease-in-out infinite alternate; }
@keyframes tkRide { to { transform: translateY(-1px) rotate(-1.2deg); } }
.tk-puffs circle { fill: #fff; opacity: 0; transform-box: fill-box; transform-origin: center; }
html.night .tk-puffs circle { fill: #8FA3BC; }
#tkCourier.moving .tk-puffs circle { animation: tkPuff .9s ease-out infinite; }
#tkCourier.moving .tk-puffs circle:nth-child(2) { animation-delay: .3s; } #tkCourier.moving .tk-puffs circle:nth-child(3) { animation-delay: .6s; }
@keyframes tkPuff { 0% { opacity: .8; transform: translate(0, 0) scale(.5); } 100% { opacity: 0; transform: translate(-14px, -6px) scale(2.4); } }
.tk-svg.mode-pickup #tkCourier { display: none; }

/* --- хаски */
.tk-tail { transform-box: fill-box; transform-origin: 100% 100%; animation: tkWag .3s ease-in-out infinite alternate; }
@keyframes tkWag { to { transform: rotate(-24deg); } }
.tk-dog-head { transform-box: fill-box; transform-origin: 30% 80%; animation: tkTilt 3s ease-in-out infinite; }
@keyframes tkTilt { 45%, 55% { transform: rotate(-10deg); } }
.tk-svg.stage-done .tk-dog-body { animation: tkJump .5s ease-in-out infinite alternate; }
@keyframes tkJump { to { transform: translateY(-4px); } }

/* --- самолётик, галочка, облачко, сердечки */
.tk-plane-trail { stroke: #8FA7B3; stroke-width: 1; stroke-dasharray: 2 4; fill: none; opacity: .5; }
.tk-badge { animation: tkBadge .6s cubic-bezier(.16, 1, .3, 1) both; }
.tk-badge .ring { fill: none; stroke: #2BB39B; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: tkRing 1.6s ease-out infinite; }
@keyframes tkBadge { from { transform: translate(82px, 92px) scale(0); } to { transform: translate(82px, 92px) scale(1); } }
@keyframes tkRing { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(2); } }
.tk-bubble path { fill: #fff; stroke: #CBD5DE; stroke-width: .6; }
.tk-bubble text { font-size: 7px; font-weight: 700; fill: #0F1B2D; }
.tk-bubble { animation: tkFloat 2s ease-in-out infinite; }
@keyframes tkFloat { 50% { transform: translate(318px, 167px); } 0%, 100% { transform: translate(318px, 170px); } }
.tk-svg.mode-pickup .tk-bubble { display: none !important; }
.tk-hearts text { font-size: 8px; animation: tkHeart 2.2s ease-out infinite; opacity: 0; }
.tk-hearts text:nth-child(2) { animation-delay: .7s; } .tk-hearts text:nth-child(3) { animation-delay: 1.4s; }
@keyframes tkHeart { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px) scale(1.2); } }
.tk-svg.mode-pickup .tk-hearts { transform: translate(86px, 170px); }

/* --- снег */
.tk-flakes circle { fill: #fff; animation: tkFall linear infinite; }
.tk-flakes { opacity: .9; }
.tk-flakes circle { stroke: rgba(15, 27, 45, .18); stroke-width: .4; }
html.night .tk-flakes circle { stroke: none; }
@keyframes tkFall { from { transform: translate(0, 0); } to { transform: translate(-24px, 340px); } }

/* --- оверлеи: тилт-шифт, ETA, подпись этапа */
.tk-blur { position: absolute; left: 0; right: 0; height: 22%; pointer-events: none; backdrop-filter: blur(2.4px); -webkit-backdrop-filter: blur(2.4px); }
.tk-blur.top { top: 0; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.tk-blur.bottom { bottom: 0; -webkit-mask-image: linear-gradient(transparent, #000); mask-image: linear-gradient(transparent, #000); }
.tk-eta { position: absolute; left: 12px; top: 12px; padding: 8px 12px; border-radius: 14px; background: rgba(244, 242, 236, .94); color: #0F1B2D;
  font-weight: 700; font-family: var(--mono); font-size: 14px; box-shadow: 0 6px 16px -8px rgba(15, 27, 45, .5); }
.tk-zoom { position: absolute; right: 12px; top: 12px; padding: 7px 11px; border-radius: 12px; background: rgba(15, 27, 45, .72); color: #F4F2EC;
  font-weight: 600; font-size: 12px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tk-cap { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 9px 14px 9px 10px; border-radius: 16px; background: rgba(15, 27, 45, .82); color: #F4F2EC; font-weight: 700; font-size: 14px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6); }
.tk-cap .e { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--salmon); font-size: 14px; }
.tk-cap.swap { animation: tkCap .5s cubic-bezier(.16, 1, .3, 1); }
@keyframes tkCap { from { opacity: 0; transform: translate(-50%, 12px) scale(.94); } }
.tk-cancel { position: absolute; inset: 0; display: none; place-items: center; background: rgba(15, 27, 45, .45); backdrop-filter: grayscale(1); -webkit-backdrop-filter: grayscale(1); }
.tk-cancel span { padding: 10px 16px; border-radius: 14px; background: #F4F2EC; color: #0F1B2D; font-weight: 700; }
.tk.cancelled .tk-cancel { display: grid; }
.tk.cancelled .tk-cap { display: none; }

@media (prefers-reduced-motion: reduce) { .tk-flakes { display: none; } }

html.lite .tk-blur { display: none; }
html.lite .tk-flakes circle:nth-child(2n) { display: none; }
