/* Coacher desktop loader: canonical Figma 1167:16061; semantic Design.kt colors. */
#loading {
    --paper: #1b1d20; --panel: #26292d; --wash: #30343a;
    --ink: #eeebe4; --muted: #acadae; --bronze: #c7a88b;
    text-align: center; font: 13px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow: auto; transition: opacity 140ms ease-out;
}
#loading.is-ready { opacity: 0; pointer-events: none; }
#loading [hidden] { display: none !important; }
#loading p, #loading h1 { margin: 0; }
.loading-content { position: absolute; top: calc(50% - 65px); left: 50%; transform: translateX(-50%); width: min(402px, calc(100% - 48px)); display: flex; flex-direction: column; align-items: center; gap: 24px; }
.loading-brand { display: flex; align-items: center; justify-content: center; gap: 6px; }
.loading-brand img { width: 32px; height: 32px; }
.loading-brand strong { font-size: 20px; line-height: 26px; font-weight: 500; }
#loading-message { color: var(--muted); }
.loading-track { position: relative; overflow: hidden; width: 120px; height: 3px; border-radius: 2px; background: var(--panel); }
.loading-segment { position: absolute; left: 40px; top: 0; width: 40px; height: 3px; border-radius: 2px; background: var(--bronze); animation: mobile-loading 1.2s ease-in-out infinite; }
@keyframes mobile-loading { from { translate: -80px 0; } to { translate: 80px 0; } }
.loading-desktop { display: none; }
.loading-failure { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 48px)); }
.loading-failure h1 { font-size: 26px; line-height: 36px; font-weight: 600; }
.loading-failure p { color: var(--muted); font-size: 15px; line-height: 23px; margin-top: 12px !important; }
#loading-retry { margin-top: 24px; min-height: 40px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--bronze); color: #232326; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
#loading-retry:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
#loading-retry:hover { filter: brightness(1.08); }
#loading[data-error] .loading-content, #loading[data-error] .loading-sequence { display: none; }
noscript { position: fixed; z-index: 10001; bottom: 32px; inset-inline: 24px; text-align: center; font: 15px system-ui, sans-serif; }
@media (min-width: 960px) {
    .loading-mobile { display: none; }
    .loading-desktop { display: block; }
    .desktop-brand { position: absolute; left: 40px; top: 28px; display: flex; align-items: center; gap: 10px; }
    .desktop-brand strong { color: var(--ink); font-size: 22px; line-height: 31px; font-weight: 600; }
    .desktop-brand img { display: block; }
    .loading-sequence { position: absolute; left: 50%; top: max(76px, calc(50% - 204px)); transform: translateX(-50%); width: 440px; }
    #loading:not([data-animation-visible="true"]) .loading-stages { visibility: hidden; }
    #loading:not([data-animation-visible="true"]) .loading-stages * { animation-play-state: paused !important; }
    .loading-scene { display: flex; flex-direction: column; align-items: center; gap: 22px; }
    .loading-art { position: relative; width: 240px; height: 264px; flex: none; }
    .loading-art img { position: absolute; display: block; max-width: none; }
    .loading-copy { height: 74px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
    .loading-copy h1 { color: var(--ink); font-size: 26px; line-height: 36px; font-weight: 600; }
    .loading-copy p { color: var(--muted); font-size: 15px; line-height: 21px; }
    .loading-progress { position: relative; width: 160px; height: 3px; margin: 22px auto 0; overflow: hidden; background: var(--panel); border-radius: 1.5px; }
    .loading-progress-fill { width: 100%; height: 100%; background: var(--bronze); border-radius: inherit; transform-origin: left center; transform: scaleX(0.04); }
    .loading-progress::after { content: ""; position: absolute; left: -40px; top: 0; width: 40px; height: 3px; background: linear-gradient(90deg, rgba(238,235,228,0), rgba(238,235,228,.55), rgba(238,235,228,0)); animation: progress-activity 1.6s linear infinite; }
    @keyframes progress-activity { from { translate: 0 0; } to { translate: 200px 0; } }
    #loading.is-ready .loading-progress::after { display: none; }
    .loading-team { position: absolute; left: 14px; top: 42px; width: 212px; height: 186px; }
    .loading-member:nth-child(1) { top: 0; --delay: .15s; --initial-opacity: .3; }
    .loading-member:nth-child(2) { top: 66px; --delay: .33s; --initial-opacity: 0; }
    .loading-member:nth-child(3) { top: 132px; --delay: .51s; --initial-opacity: 0; }
    #loading[data-phase="0"] .loading-member { animation: member-arrival .42s ease-out var(--delay) both; }
    @keyframes member-arrival { from { translate: 18px 0; opacity: var(--initial-opacity); } to { translate: 0 0; opacity: 1; } }
    .loading-macros { position: absolute; left: 16px; top: 42px; display: flex; gap: 12px; width: 212px; height: 198px; }
    .loading-macro { position: relative; width: 44px; height: 198px; flex: none; }
    .loading-macro-bar { position: absolute; top: calc(160px - var(--bar-height)); left: 0; width: 40px; height: var(--bar-height); border-radius: 9px; background: var(--bronze); opacity: var(--alpha); transform-origin: center bottom; }
    .loading-macro span { position: absolute; top: 173px; left: 0; width: 40px; font-size: 18px; line-height: 25px; font-weight: 600; }
    #loading[data-phase="1"] .loading-macro { animation: macro-arrival .45s ease-out var(--delay) both; }
    #loading[data-phase="1"] .loading-macro-bar { animation: macro-rise .38s ease-out var(--delay) both; }
    @keyframes macro-arrival { from { translate: var(--start-x) 0; } to { translate: 0 0; } }
    @keyframes macro-rise { from { scale: 1 .12; } to { scale: 1 1; } }
    .loading-shaker { position: absolute; width: 200px; height: 240px; left: 20px; top: 0; transform-origin: center; }
    .shaker-shadow { left: 65px; top: 246px; }
    .shaker-body { left: 49px; top: 78px; }
    .shaker-mask { position: absolute; inset: 0; mask: url('/loading/shaker-mask.svg') 53px 82px / 94px 129px no-repeat; }
    .shaker-liquid { position: absolute; inset: 0; transform-origin: center; }
    .shaker-liquid img { left: -1px; top: 0; }
    .shaker-outline { left: 47.5px; top: 76.5px; }
    .shaker-lid, .shaker-top, .shaker-spout { position: absolute; box-sizing: border-box; border: 3px solid var(--bronze); border-radius: 10.5px; background: var(--wash); }
    .shaker-lid { left: 41.5px; top: 51.5px; width: 117px; height: 28px; }
    .shaker-top { left: 49.5px; top: 43.5px; width: 101px; height: 17px; border-radius: 7.5px; background: var(--panel); }
    .shaker-spout { left: 103.5px; top: 25.5px; width: 34px; height: 21px; border-radius: 7.5px; }
    .shaker-loop { left: 61.5px; top: 26.5px; }
    .shaker-band { position: absolute; left: 51px; top: 64px; width: 98px; height: 3px; border-radius: 1.5px; background: var(--bronze); }
    .shaker-mark { left: 88px; top: 100px; }
    .shaker-tick { position: absolute; left: 130px; width: 7px; height: 2px; border-radius: 1px; background: var(--bronze); }
    .tick-one { top: 105px; } .tick-two { top: 123px; width: 10px; } .tick-three { top: 141px; }
    #loading[data-phase="2"] .loading-shaker { animation: shaker-rotate 3.2s linear infinite, shaker-translate 3.2s linear infinite; }
    #loading[data-phase="2"] .shaker-liquid { animation: liquid-rotate 3.2s linear infinite, liquid-translate 3.2s linear infinite; }
    #loading[data-phase="2"] .shaker-shadow { animation: shaker-shadow 3.2s ease-in-out infinite; }
    .ready-ring { left: 60px; top: 66px; }
    .ready-check { position: absolute; display: block; left: 85.5px; top: 102.5px; }
    #loading[data-phase="3"] .ready-ring { animation: ready-ring .37s ease-out both; }
    #loading[data-phase="3"] .ready-check path { stroke-dashoffset: 0; animation: ready-check .43s ease-out both; }
    @keyframes ready-ring { from { scale: .9; } to { scale: 1; } }
    @keyframes ready-check { from { stroke-dasharray: 0 1; visibility: hidden; } to { stroke-dasharray: 1 1; visibility: visible; } }
}
#loading[data-paused="true"] *, #loading[data-error] * { animation-play-state: paused !important; }
#loading[data-paused="true"] .loading-progress::after, #loading[data-error] .loading-progress::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    #loading, #loading * { animation: none !important; transition: none !important; }
    .loading-segment { translate: 0 0; }
    .loading-progress::after { display: none; }
}

@keyframes shaker-rotate {
    0% { rotate: 0deg; animation-timing-function: ease-in-out; }
    10.9375% { rotate: 0deg; animation-timing-function: ease-in-out; }
    16.25% { rotate: -13deg; animation-timing-function: ease-in-out; }
    22.5% { rotate: 13deg; animation-timing-function: ease-in-out; }
    28.75% { rotate: -12deg; animation-timing-function: ease-in-out; }
    35% { rotate: 11deg; animation-timing-function: ease-in-out; }
    41.25% { rotate: -9deg; animation-timing-function: ease-in-out; }
    47.5% { rotate: 7deg; animation-timing-function: ease-in-out; }
    54.375% { rotate: -3deg; animation-timing-function: ease-in-out; }
    61.875% { rotate: 1deg; animation-timing-function: ease-in-out; }
    69.375% { rotate: 0deg; animation-timing-function: ease-in-out; }
    100% { rotate: 0deg; animation-timing-function: ease-in-out; }
}

@keyframes shaker-translate {
    0% { translate: 0px 0px; animation-timing-function: ease-in-out; }
    10.9375% { translate: 0px 0px; animation-timing-function: ease-in-out; }
    16.25% { translate: -8.45px -5px; animation-timing-function: ease-in-out; }
    22.5% { translate: 8.45px -10px; animation-timing-function: ease-in-out; }
    28.75% { translate: -7.8px -5px; animation-timing-function: ease-in-out; }
    35% { translate: 7.15px -10px; animation-timing-function: ease-in-out; }
    41.25% { translate: -5.85px -5px; animation-timing-function: ease-in-out; }
    47.5% { translate: 4.55px -7px; animation-timing-function: ease-in-out; }
    54.375% { translate: -1.95px -2px; animation-timing-function: ease-in-out; }
    61.875% { translate: 0.65px -1px; animation-timing-function: ease-in-out; }
    69.375% { translate: 0px 0px; animation-timing-function: ease-in-out; }
    100% { translate: 0px 0px; animation-timing-function: ease-in-out; }
}

@keyframes liquid-rotate {
    0% { rotate: 0deg; animation-timing-function: ease-in-out; }
    12.5% { rotate: 0deg; animation-timing-function: ease-in-out; }
    18.75% { rotate: 9deg; animation-timing-function: ease-in-out; }
    25% { rotate: -10deg; animation-timing-function: ease-in-out; }
    31.25% { rotate: 10deg; animation-timing-function: ease-in-out; }
    37.5% { rotate: -9deg; animation-timing-function: ease-in-out; }
    43.75% { rotate: 8deg; animation-timing-function: ease-in-out; }
    50% { rotate: -6deg; animation-timing-function: ease-in-out; }
    58.125% { rotate: 4deg; animation-timing-function: ease-in-out; }
    65.625% { rotate: -2deg; animation-timing-function: ease-in-out; }
    75% { rotate: 0deg; animation-timing-function: ease-in-out; }
    100% { rotate: 0deg; animation-timing-function: ease-in-out; }
}

@keyframes liquid-translate {
    0% { translate: 0 0px; animation-timing-function: ease-in-out; }
    12.5% { translate: 0 0px; animation-timing-function: ease-in-out; }
    18.75% { translate: 0 3px; animation-timing-function: ease-in-out; }
    25% { translate: 0 -3px; animation-timing-function: ease-in-out; }
    31.25% { translate: 0 3px; animation-timing-function: ease-in-out; }
    37.5% { translate: 0 -3px; animation-timing-function: ease-in-out; }
    43.75% { translate: 0 2px; animation-timing-function: ease-in-out; }
    50% { translate: 0 -2px; animation-timing-function: ease-in-out; }
    58.125% { translate: 0 1px; animation-timing-function: ease-in-out; }
    75% { translate: 0 0px; animation-timing-function: ease-in-out; }
    100% { translate: 0 0px; animation-timing-function: ease-in-out; }
}

@keyframes shaker-shadow { 0%, 10.9375%, 69.375%, 100% { scale: 1 1; opacity: .9; } 22.5%, 35% { scale: .78 1; opacity: .55; } 47.5% { scale: .84 1; opacity: .65; } }
