/* PEP-179: «Погоня за задачей» — colours, sizes, track and keyframes follow the mockup (peppa-team-preview.html). The track path comes from the component as --path (it depends on the measured width); every runner stands at its own --d on the track, so with the animation off (reduced motion, battery saver) the agents keep their places instead of piling up. */ @font-face { font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/press-start-2p/cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @font-face { font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/press-start-2p/cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @font-face { font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/press-start-2p/latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; } @font-face { font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/press-start-2p/latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } .chase { container-type: inline-size; position: relative; box-sizing: border-box; margin-bottom: 16px; padding: 12px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left)); background: #05050a; border-radius: 12px; font-family: "Press Start 2P", ui-monospace, monospace; text-transform: uppercase; color: #fff; } .frame { position: relative; overflow: hidden; background: #000; border: 4px double #00e5ff; box-shadow: 0 0 18px rgba(0, 229, 255, 0.35), inset 0 0 40px rgba(0, 229, 255, 0.08); padding: 16px 0 44px; display: flex; flex-direction: column; gap: 10px; } .scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px); } .hud { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 16px; font-size: 10px; } .hud b { color: #ffe600; font-weight: 400; } .title { font-size: 12px; color: #3d8bff; text-shadow: 0 0 12px rgba(61, 139, 255, 0.7); white-space: nowrap; } .offline { margin: 0 16px; padding: 6px 8px; border: 2px solid #ffe600; color: #ffe600; font-size: 8px; line-height: 1.6; text-align: center; } /* ---- stage: pug, chute, track ---- */ .stage { position: relative; height: 410px; } .track { position: absolute; inset: 0; overflow: visible; pointer-events: none; } .runner, .task { position: absolute; left: 0; top: 0; offset-path: var(--path); offset-rotate: 0deg; offset-anchor: center; offset-distance: var(--d, 0%); animation: ch-run 9s linear infinite; } .task { width: 26px; height: 26px; background: #3d8bff; box-shadow: 0 0 0 3px #000, 0 0 0 5px #d8e7ff, 0 0 20px #3d8bff; z-index: 3; --d: 40%; animation-delay: -3.6s; pointer-events: none; } .task::before, .task::after { content: ""; position: absolute; top: 8px; width: 4px; height: 6px; background: #000; animation: ch-look 1.2s steps(1, end) infinite; } .task::before { left: 6px; } .task::after { right: 6px; } /* Nobody at work: the task lies by the pug, still. */ .restingTask { position: absolute; top: 70px; width: 22px; height: 22px; background: #3d8bff; box-shadow: 0 0 0 3px #000, 0 0 0 5px #d8e7ff; opacity: 0.8; } .runner { z-index: 2; offset-anchor: 50% 24px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; min-width: 44px; min-height: 44px; } .enter { animation: ch-run 9s linear infinite, ch-in 0.6s ease-out; } .hop { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: ch-hop 0.36s steps(2, end) infinite; } .agent { box-sizing: border-box; width: 48px; height: 48px; border-radius: 50%; border: 3px solid currentColor; background: #000; display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 0 0 3px #000, 0 0 16px color-mix(in srgb, currentColor 55%, transparent); } .tag { font-size: 8px; white-space: nowrap; max-width: 96px; overflow: hidden; text-overflow: ellipsis; } .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 6px 8px; background: #000; border: 2px solid currentColor; font-size: 8px; line-height: 1.6; white-space: nowrap; max-width: min(70cqw, 320px); overflow: hidden; text-overflow: ellipsis; text-transform: none; opacity: 0; pointer-events: none; z-index: 6; } .runner:hover .tip, .runner:focus-visible .tip, .runner[data-open] .tip, .seat:hover .tip, .seat:focus-visible .tip, .seat[data-open] .tip, .mini:hover .tip, .mini:focus-visible .tip, .mini[data-open] .tip { opacity: 1; } .runner:focus-visible, .seat:focus-visible, .mini:focus-visible { outline: 2px solid #fff; outline-offset: 2px; } .runner:hover, .runner:focus-visible, .runner[data-open] { z-index: 5; } .you { position: absolute; top: 0; width: 92px; margin-left: -46px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 4; } .youbox { width: 84px; height: 76px; border: 3px solid #fff; background: #000; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 4px #000, 0 0 0 6px rgba(255, 255, 255, 0.4), 0 0 22px rgba(255, 255, 255, 0.35); animation: ch-throw 9s steps(1, end) infinite; animation-delay: -3.6s; } .pug { animation: ch-jump 9s steps(1, end) infinite; animation-delay: -3.6s; } .idle .youbox, .idle .pug { animation: none; } .zzz { position: absolute; top: -4px; right: -14px; font-size: 10px; color: #8fd3ff; animation: ch-zzz 2.4s ease-in-out infinite; } .youtag { font-size: 8px; white-space: nowrap; } .chute { position: absolute; top: 100px; width: 0; height: 50px; border-left: 3px dashed rgba(61, 139, 255, 0.55); } .drop { position: absolute; top: 100px; width: 18px; height: 18px; margin-left: -8px; background: #3d8bff; box-shadow: 0 0 14px #3d8bff; opacity: 0; animation: ch-drop 9s linear infinite; animation-delay: -3.6s; } .say { position: absolute; top: 18px; margin-left: 64px; padding: 8px 10px; border: 3px solid #3d8bff; background: #000; color: #3d8bff; font-size: 9px; white-space: nowrap; opacity: 0; animation: ch-say 9s steps(1, end) infinite; animation-delay: -3.6s; } .plus { position: absolute; top: 30px; width: 80px; margin-left: -130px; text-align: right; font-size: 12px; color: #39ff88; text-shadow: 0 0 10px #39ff88; opacity: 0; animation: ch-plus 1.4s linear forwards; pointer-events: none; } .more { position: absolute; font-size: 10px; color: #c9c9d9; } .mid { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; } .mid p { margin: 0; font-size: 9px; line-height: 1.9; color: #c9c9d9; } .legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 8px; } .accept { font: inherit; font-size: 9px; color: #3d8bff; text-decoration: none; padding: 12px 6px; } .blink { animation: ch-blink 1.2s steps(1, end) infinite; } /* ---- narrow: a row of working agents instead of the track ---- */ .row { display: none; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0 12px; } .mini { position: relative; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font: inherit; display: flex; align-items: center; justify-content: center; cursor: pointer; } .mini .agent { width: 40px; height: 40px; font-size: 13px; } /* ---- bench ---- */ .bench { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 12px; } .bench h3 { margin: 0; font-size: 8px; line-height: 1.8; font-weight: 400; color: #9a9ab0; text-align: center; } .seats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 900px; margin: 0; padding: 0; list-style: none; } .seat { position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: inherit; font: inherit; display: flex; align-items: center; justify-content: center; cursor: pointer; } .seatIcon { box-sizing: border-box; width: 32px; height: 32px; border-radius: 50%; border: 2px solid currentColor; background: #000; display: flex; align-items: center; justify-content: center; font-size: 10px; opacity: 0.75; animation: ch-sway 1.8s ease-in-out infinite alternate; } .seat:hover .seatIcon, .seat:focus-visible .seatIcon, .seat[data-open] .seatIcon { opacity: 1; box-shadow: 0 0 12px currentColor; } .seatEnter { animation: ch-in 0.6s ease-out; } .hide { position: absolute; right: 12px; bottom: 10px; min-height: 32px; background: none; border: 2px solid #3a3a50; color: #9a9ab0; font: inherit; font-size: 8px; padding: 6px 8px; cursor: pointer; z-index: 7; } .hide:hover, .hide:focus-visible { color: #fff; border-color: #9a9ab0; } .collapsed { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; font-size: 9px; } .collapsed .hide { position: static; } @keyframes ch-run { from { offset-distance: 0%; } to { offset-distance: 100%; } } @keyframes ch-hop { 0% { transform: translateY(0); } 100% { transform: translateY(-4px); } } @keyframes ch-look { 0% { transform: translateX(0); } 50% { transform: translateX(2px); } } @keyframes ch-throw { 0%, 8% { transform: translateY(-6px); border-color: #3d8bff; color: #3d8bff; } 9%, 92% { transform: none; border-color: #fff; color: #fff; } 93%, 100% { transform: translateY(-6px); border-color: #3d8bff; color: #3d8bff; } } @keyframes ch-drop { 0%, 90% { opacity: 0; transform: translateY(0); } 91% { opacity: 1; transform: translateY(0); } 99.5% { opacity: 1; transform: translateY(32px); } 100% { opacity: 0; transform: translateY(32px); } } @keyframes ch-say { 0%, 10% { opacity: 1; } 11%, 88% { opacity: 0; } 89%, 100% { opacity: 1; } } @keyframes ch-plus { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-22px); } } @keyframes ch-jump { 0%, 6% { transform: translateY(-8px); } 7%, 93% { transform: none; } 94%, 100% { transform: translateY(-8px); } } @keyframes ch-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } } @keyframes ch-sway { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-3px) rotate(4deg); } } @keyframes ch-zzz { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } } @keyframes ch-in { from { opacity: 0; scale: 0.4; } to { opacity: 1; scale: 1; } } /* Paused (hidden tab), battery saver and reduced motion: nothing moves. */ .paused *, .paused *::before, .paused *::after { animation-play-state: paused !important; } .still *, .still *::before, .still *::after { animation: none !important; } .still .drop, .still .say, .still .plus { display: none; } @media (prefers-reduced-motion: reduce) { .chase *, .chase *::before, .chase *::after { animation: none !important; } .drop, .say, .plus { display: none; } } /* Under 720 px: smaller runners, no speech bubble. */ @container (max-width: 719px) { .agent { width: 40px; height: 40px; font-size: 13px; } .runner { offset-anchor: 50% 20px; } .say { display: none; } .title { font-size: 10px; } .hud { font-size: 8px; } } @container (max-width: 519px) { .player { display: none; } } /* Under 420 px: a row of icons instead of the track. */ @container (max-width: 419px) { .stage { height: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; } .track, .runner, .task, .chute, .drop, .say, .more, .restingTask { display: none; } .you { position: relative; left: auto !important; margin-left: 0; } .plus { left: 50% !important; } .mid { position: static; padding: 0 12px; } .row { display: flex; } }