/* Kolo (/kolo): Bubi's word wheel. A stage as tall as the screen: the zone's picture behind, the crossword on top, Bubi and
   the word being spelt, the wheel at the bottom under the thumb. Adios's blocky look on the tiles and buttons (thick ink
   outlines, flat colours), soft on the wheel (frosted glass), and the game's Adriatic teal. The wheel takes no scroll or
   zoom gestures (touch-action: none), so a swipe spells a word and never moves the page. */
.ko {
    --ko-ink: #16171c;
    --ko-teal: #1a9aa0;
    --ko-teal-dark: #0f6f74;
    --ko-gold: #f2b53a;
    --ko-cream: #fffaf0;
    --ko-coral: #ef6b55;
    --ko-muted: #5d6170;
    color: var(--ko-ink);
}

.ko [hidden] {
    display: none !important;
}

/* No scrollbars on the game's page, across or down (owner, 29 Nov 2026: "hide overflows? vertical and horizontal"): the
   page still scrolls to the rules and the tables under the game. */
html:has(body.kolo-page),
body.kolo-page {
    overflow-x: hidden;
    scrollbar-width: none;
}

html:has(body.kolo-page)::-webkit-scrollbar,
body.kolo-page::-webkit-scrollbar {
    display: none;
}

/* A phone: the site's header scrolls away above the game, so the stage can have the whole screen. */
@media (max-width: 767.98px) {
    .kolo-page .app-header {
        position: relative;
    }
}

/* ---------- the stage ---------- */

.ko-stage {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto auto;
    /* One column as wide as the stage: a long line in the bar can never widen it past the screen. */
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    height: var(--ko-height, 100svh);
    min-height: 520px;
    margin: 0 auto;
    padding: 0 12px 10px;
    background: linear-gradient(165deg, var(--ko-from, #2fb3c9), var(--ko-to, #f4e6c4));
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.ko-stage > :not(.ko-bg):not(.ko-shade):not(.ko-done):not(.ko-milestone):not(.ko-travel):not(.ko-sheet):not(.ko-map) {
    width: min(100%, calc(520px * var(--ko-ui, 1)));
}

/* The brightest paintings get a little grey veil (owner, 29 Nov 2026: "on some mega light images we should add that little
   grayness a bit ... so its not too attacking"): kolo.js measures a picture's light once and sets --ko-veil, 0 for most. */
@property --ko-veil {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
}

.ko-stage {
    transition: --ko-veil 0.9s ease;
}

/* The picture breathes: a slow, soft zoom in and out, nothing sliding (owner, 29 Nov 2026: "that paralax effect of shit moving,
   maybe dont do it like that, just image soft zoom in and zoom out, no movement, cos its lagging badly"; the drift before it
   moved the picture about). The individual scale composes with the journey's transform; the layer is the graphics card's
   own (translateZ, will-change), so only the card scales it: nothing is painted again while it breathes. */
.ko-bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        linear-gradient(rgba(66, 68, 76, var(--ko-veil, 0)), rgba(66, 68, 76, var(--ko-veil, 0))),
        linear-gradient(rgba(52, 56, 64, 0.07), rgba(52, 56, 64, 0.07)),
        var(--ko-picture, none) center / cover no-repeat,
        linear-gradient(165deg, var(--ko-from, #2fb3c9), var(--ko-to, #f4e6c4));
    /* The tiniest touch muted (owner, 29 Nov 2026: "mute background a bit in Kolo, just a tiny little bit", "like tiniest bit
       ever"): a very light grey wash and the colours a twentieth quieter, far less than Petica's. */
    filter: saturate(0.95);
    transform: translateZ(0) scale(1.02);
    transform-origin: 50% 50%;
    backface-visibility: hidden;
    transition: filter 1.2s ease;
    animation: ko-breathe 18s ease-in-out infinite alternate;
    will-change: transform;
}

/* The breath (owner, 29 Nov 2026: the slide "lagging badly", then the zoom "still not smooth ... maybe more zoom in, and zoom out"): the whole transform is animated, which every browser hands to the graphics card (the individual scale property was not, on some phones), wider and a little quicker. */
@keyframes ko-breathe {
    from { transform: translateZ(0) scale(1.02); }
    to { transform: translateZ(0) scale(1.12); }
}

.ko-bg-next {
    opacity: 0;
    animation: none;
}

/* Legibility over any picture: a little darker at the top (the bar) and the bottom (the wheel). */
.ko-shade {
    position: absolute;
    inset: 0;
    z-index: -2;
    /* The zone's picture as painted (owner, 29 Nov 2026: "dont make backgrounds greyish they are good as they are"), only a
       little darker at the top (the bar) and the bottom (the wheel). */
    background:
        linear-gradient(180deg, rgba(10, 14, 24, 0.4) 0%, rgba(10, 14, 24, 0) 16%),
        linear-gradient(0deg, rgba(10, 14, 24, 0.34) 0%, rgba(10, 14, 24, 0) 42%);
    pointer-events: none;
}

/* ---------- the bar: where we are, the dukati ---------- */

.ko-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 10px 2px 4px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* The name, the level and the zone's ribbon take all the room the tools leave (the ribbon had only the level's width:
   "Polarna svjetlost" was cut beside empty space). */
.ko-where {
    flex: 1 1 auto;
    min-width: 0;
}

/* The game's logo, the owner's (kolo-logo: the name in cream with a little wheel for its o; owner, 29 Nov 2026: "logo of kolo
   is inside a white box, really kills it ... without those boxes we use for news"). */
.ko-title {
    display: flex;
    align-items: center;
    margin: 0;
    line-height: 0;
}

.ko-title img {
    display: block;
    width: auto;
    height: calc(40px * var(--ko-ui, 1));
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.ko-level {
    margin: 0.35rem 0 0;
    font-family: var(--news-font-head);
    font-size: calc(1.35rem * var(--ko-ui, 1));
    font-weight: 900;
    line-height: 1.05;
    white-space: nowrap;
}

/* "Zagonetka dana #12" on one line on the narrowest phones. */
@media (max-width: 380px) {
    .ko-level {
        font-size: 1.12rem;
    }
}

/* The zone's name on the owner's teal ribbon (kolo-zona-traka), as wide as the name. Measured on the art (owner, 29 Nov
   2026: "overlaps in letters going out"): between its stitches the band holds 22.7 % to 63.4 % of the ribbon's height (its
   middle at 43 %, the band arches), and its folded tails end 13.5 % in from each side. So the ribbon is cut in three (the
   ends, 200 px of its 994, keep their shape; only the band's middle stretches with a long name), the words start past the
   folds (2em in; the ends are drawn 2.9em wide) and the ribbon is 2.5 times as tall as the letters, their line on the band's
   middle (a háček stays under the top stitch). */
.ko-zone {
    display: inline-block;
    max-width: 100%;
    margin: 0.3rem 0 0 -4px;
    padding: 0.675em 0.1em 0.825em;
    overflow: hidden;
    color: #fff6df;
    border: solid transparent;
    border-width: 0 2em;
    border-image: url("/img/igrice/kolo/ui/kolo-zona-traka.svg") 0 200 fill / 0 2.9em stretch;
    /* --ko-zone-fit: kolo.js shrinks a long name to fit (fitZone) before the dots cut it. */
    font-size: calc(0.72rem * var(--ko-ui, 1) * var(--ko-zone-fit, 1));
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    text-transform: uppercase;
    white-space: nowrap;
}

/* A name too long for the ribbon in capitals (fitZone): its own letters take a fifth less room. */
.ko-zone.is-long {
    letter-spacing: 0.02em;
    text-transform: none;
}

.ko-zone:empty {
    display: none;
}

/* A friend's challenge in the bar: who sent it and the hints to beat. */
.ko-challenge {
    display: inline-block;
    margin: 0.3rem 0 0;
    padding: 0.1rem 0.5rem;
    color: #5a3a00;
    background: #fff4d6;
    border: 2px solid #e2b54a;
    font-size: calc(0.8rem * var(--ko-ui, 1));
    font-weight: 800;
    text-shadow: none;
}

.ko-tools {
    display: grid;
    justify-items: end;
    gap: 6px;
}

/* The atmosphere, the game's sounds and the full screen: round buttons in the owner's icons' style. */
.ko-switches {
    display: flex;
    gap: 6px;
}

.ko-switch {
    position: relative;
    display: block;
    width: calc(36px * var(--ko-ui, 1));
    height: calc(36px * var(--ko-ui, 1));
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    filter: drop-shadow(0 3px 2px rgba(8, 12, 24, 0.4));
    transition: transform 0.1s ease;
}

.ko-switch img {
    display: block;
    width: 100%;
    height: 100%;
}

.ko-switch:active {
    transform: translateY(2px) scale(0.95);
}

/* A glint: a soft white band crossing a round icon or a box (owner, 29 Nov 2026: "those white shine overlays, over help or
   something, or while idle too"), on the hint when no word has come for half a minute and now and then while nobody plays. */
.ko-icon:not(.ko-jar)::after,
.ko-switch::after,
.ko-cell::after {
    content: "";
    position: absolute;
    inset: 3%;
    border-radius: 50%;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 62%) 140% 0 / 260% 100% no-repeat;
    opacity: 0;
    pointer-events: none;
}

.ko-cell::after {
    inset: 4%;
    border-radius: 20%;
}

.ko-icon.is-glint::after,
.ko-switch.is-glint::after,
.ko-cell.is-glint::after {
    animation: ko-glint 0.95s ease-out;
}

@keyframes ko-glint {
    0% { background-position: 140% 0; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { background-position: -40% 0; opacity: 0; }
}

/* The dukati on the games' shared counter (the owner's dukati-brojac: a dark glass capsule, its coins at the left end), the
   number written over it in cream (owner: "that icon on top right, is weird looking now kills immersion"). */
.ko-coins {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: calc(132px * var(--ko-ui, 1));
    height: calc(38px * var(--ko-ui, 1));
    padding: 0 calc(16px * var(--ko-ui, 1)) 0 calc(44px * var(--ko-ui, 1));
    color: #fff6df;
    background: url("/img/igrice/zajednicko/dukati-brojac.svg") center / 100% 100% no-repeat;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
    font-family: var(--news-font-head);
    font-size: calc(1.05rem * var(--ko-ui, 1));
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.ko-coins-text {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    line-height: 1;
}

.ko-coins-text small {
    color: rgba(255, 246, 223, 0.75);
    font-family: var(--news-font-body, inherit);
    font-size: 0.62em;
    font-weight: 800;
}

.ko-coins.is-bump {
    animation: ko-bump 0.45s ease-out;
}

.ko-mini {
    display: grid;
    place-items: center;
    width: calc(42px * var(--ko-ui, 1));
    height: calc(42px * var(--ko-ui, 1));
    padding: 0;
    color: var(--ko-ink);
    background: #fff;
    border: 3px solid var(--ko-ink);
    border-radius: 50%;
    box-shadow: 0 3px 0 var(--ko-ink);
    text-shadow: none;
    cursor: pointer;
}

/* The zone's levels as dots: done, this one, to come. */
.ko-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.ko-dots li {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border: 1.5px solid rgba(10, 14, 24, 0.35);
    border-radius: 50%;
}

.ko-dots li.is-done {
    background: #fff;
}

.ko-dots li.is-now {
    width: 12px;
    height: 12px;
    margin-top: -2px;
    background: var(--ko-gold);
    border-color: var(--ko-ink);
}

/* ---------- the crossword ---------- */

.ko-board-wrap {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 6px 0;
}

.ko-board {
    position: relative;
    width: var(--ko-board-w, 0);
    height: var(--ko-board-h, 0);
    transition: transform 0.3s ease;
}

.ko-board.is-pop {
    animation: ko-board-pop 0.36s ease-out;
}

.ko-cell {
    position: absolute;
    display: grid;
    place-items: center;
    width: var(--ko-cell);
    height: var(--ko-cell);
    color: var(--ko-ink);
    background: url("/img/igrice/kolo/ui/polje.svg") center / 100% 100% no-repeat;
    filter: drop-shadow(0 3px 2px rgba(8, 12, 24, 0.35));
    font-family: var(--news-font-head);
    font-size: calc(var(--ko-cell) * 0.56);
    font-weight: 900;
    line-height: 1;
}

.ko-cell.is-double {
    font-size: calc(var(--ko-cell) * 0.44);
    letter-spacing: -0.03em;
}

.ko-cell.is-filled {
    color: #fff;
    background-image: url("/img/igrice/kolo/ui/polje-puno.svg");
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.ko-cell.is-flip {
    animation: ko-flip 0.42s ease-out both;
}

.ko-cell.is-shown {
    color: #9a6a00;
    filter: drop-shadow(0 0 6px rgba(242, 181, 58, 0.95)) drop-shadow(0 3px 2px rgba(8, 12, 24, 0.35));
    animation: ko-pop 0.4s ease-out;
}

.ko-cell.is-again {
    animation: ko-again 0.6s ease-out;
}

.ko-cell.is-wave {
    animation: ko-wave 0.5s ease-out both;
}

/* Choosing a box for a hint: the boxes still empty glow. */
.ko-board.is-picking .ko-cell.is-open {
    cursor: pointer;
    outline: 3px solid var(--ko-gold);
    outline-offset: calc(var(--ko-cell, 40px) * -0.06);
    border-radius: calc(var(--ko-cell, 40px) * 0.14);
    animation: ko-glow 1s ease-in-out infinite;
}

/* ---------- Bubi and the word being spelt ---------- */

.ko-host {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 58px;
}

.ko-host img {
    flex: 0 0 auto;
    width: calc(62px * var(--ko-ui, 1));
    height: calc(62px * var(--ko-ui, 1));
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3));
    cursor: pointer;
}

/* Bubi's line: a rounded cream speech bubble with a soft shadow, the games' look rather than the news site's box. */
.ko-line {
    position: relative;
    margin: 0;
    padding: 0.45rem 0.75rem;
    background: #fffaf0;
    border: 2.5px solid var(--ko-ink);
    border-radius: 14px;
    box-shadow: 0 4px 0 rgba(22, 23, 28, 0.85), 0 6px 12px rgba(0, 0, 0, 0.2);
    font-size: calc(0.88rem * var(--ko-ui, 1));
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    transform-origin: left center;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.ko-line.is-away {
    opacity: 0;
    transform: translateX(-8px) scale(0.94);
    pointer-events: none;
}

.ko-line.is-in {
    animation: ko-line-in 0.28s ease-out;
}

.ko-line::before {
    position: absolute;
    top: 50%;
    left: -9px;
    width: 0;
    height: 0;
    margin-top: -7px;
    border-top: 7px solid transparent;
    border-right: 9px solid var(--ko-ink);
    border-bottom: 7px solid transparent;
    content: "";
}

.ko-word {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 44px;
    margin: 4px 0;
}

.ko-chip {
    display: grid;
    place-items: center;
    min-width: calc(34px * var(--ko-ui, 1));
    height: calc(38px * var(--ko-ui, 1));
    padding: 0 6px;
    color: #fff;
    background: var(--ko-ink);
    border: 2px solid #fff;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    font-family: var(--news-font-head);
    font-size: calc(1.3rem * var(--ko-ui, 1));
    font-weight: 900;
    animation: ko-chip 0.18s ease-out;
}

.ko-word.is-ok .ko-chip {
    background: var(--ko-teal);
}

.ko-word.is-bonus .ko-chip {
    color: var(--ko-ink);
    background: var(--ko-gold);
}

.ko-word.is-again .ko-chip {
    color: var(--ko-ink);
    background: #ffe39a;
}

.ko-word.is-bad {
    animation: ko-shake 0.38s ease;
}

.ko-word.is-bad .ko-chip {
    background: var(--ko-coral);
}

.ko-fly {
    position: fixed;
    z-index: 30;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--ko-teal, #1a9aa0);
    border: 2px solid #fff;
    border-radius: 6px;
    font-family: var(--news-font-head);
    font-weight: 900;
    pointer-events: none;
    transition: transform 0.42s cubic-bezier(0.35, 0.9, 0.3, 1.05), opacity 0.42s ease;
}

.ko-fly.is-bonus {
    color: var(--ko-ink, #16171c);
    background: var(--ko-gold, #f2b53a);
}

/* ---------- the wheel ---------- */

.ko-play {
    position: relative;
    display: grid;
    grid-template-columns: calc(54px * var(--ko-ui, 1)) minmax(0, 1fr) calc(54px * var(--ko-ui, 1));
    align-items: center;
    gap: 6px;
}

/* The icon columns sit a little lower than the wheel's middle (owner, 29 Nov 2026: "lower icons a bit lower ... from the
   wheel"), nearer the thumbs. */
.ko-side {
    position: relative;
    top: calc(18px * var(--ko-ui, 1));
    display: grid;
    gap: 12px;
    justify-items: center;
}

/* Good words in a row (no miss between): "Niz ×3" at the wheel's top right, above the jar (over the wheel it covered its top
   letter), a little bigger and warmer with each one. */
.ko-combo {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    padding: 0.15rem 0.7rem;
    color: var(--ko-ink);
    background: var(--ko-gold);
    border: 3px solid var(--ko-ink);
    border-radius: 999px;
    box-shadow: 0 3px 0 var(--ko-ink);
    font-family: var(--news-font-head);
    font-size: calc(0.95rem * var(--ko-ui, 1));
    font-weight: 900;
    white-space: nowrap;
    transform-origin: 100% 50%;
    pointer-events: none;
}

.ko-combo.is-pop {
    animation: ko-combo 0.5s cubic-bezier(0.3, 1.7, 0.5, 1);
}

.ko-combo.is-hot {
    color: #fff;
    background: var(--ko-coral);
}

.ko-round {
    position: relative;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    padding: 0;
    color: var(--ko-ink);
    background: #fff;
    border: 3px solid var(--ko-ink);
    border-radius: 50%;
    box-shadow: 0 4px 0 var(--ko-ink);
    font-size: 1.15rem;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.ko-round:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 var(--ko-ink);
}

.ko-round.is-gold {
    background: var(--ko-gold);
}

.ko-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: calc(54px * var(--ko-ui, 1));
    height: calc(54px * var(--ko-ui, 1));
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    filter: drop-shadow(0 4px 3px rgba(8, 12, 24, 0.4));
    transition: transform 0.1s ease;
}

.ko-icon img {
    position: relative;
    width: 100%;
    height: 100%;
}

.ko-icon:active {
    transform: translateY(2px) scale(0.95);
}

/* The round icons float a few pixels, each in its own time (owner: "icons need to be a bit more lively"): the individual
   translate, so a press, a shake and the idle wiggles (scale and rotate) all go on over it. */
.ko-side .ko-icon {
    animation: ko-float 3.8s ease-in-out infinite;
}

.ko-side .ko-icon:nth-child(2) {
    animation-delay: -1.3s;
}

.ko-side .ko-icon:nth-child(3) {
    animation-delay: -2.5s;
}

.ko-side + .ko-wheel + .ko-side .ko-icon,
.ko-wheel ~ .ko-side .ko-icon {
    animation-duration: 4.3s;
}

@keyframes ko-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -3px; }
}

.ko-icon.is-on {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.95)) drop-shadow(0 4px 3px rgba(8, 12, 24, 0.4));
}

.ko-icon.is-poor {
    animation: ko-shake 0.38s ease;
}

.ko-icon em {
    position: absolute;
    top: -6px;
    right: -8px;
    z-index: 1;
    min-width: 22px;
    padding: 1px 5px;
    color: var(--ko-ink);
    background: #fff;
    border: 2px solid var(--ko-ink);
    border-radius: 11px;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 900;
    line-height: 1.3;
    text-align: center;
}

.ko-icon em.is-free {
    color: #fff;
    background: var(--ko-teal);
}

.ko-icon em.is-label {
    top: auto;
    right: 50%;
    bottom: -8px;
    transform: translateX(50%);
    font-size: 0.62rem;
    text-transform: uppercase;
}

.ko-round.is-on {
    color: #fff;
    background: var(--ko-teal);
}

.ko-round.is-poor {
    animation: ko-shake 0.38s ease;
}

.ko-round em {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 22px;
    padding: 1px 5px;
    color: var(--ko-ink);
    background: #fff;
    border: 2px solid var(--ko-ink);
    border-radius: 11px;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 900;
    line-height: 1.3;
}

.ko-round em.is-free {
    color: #fff;
    background: var(--ko-teal);
}

.ko-jar {
    overflow: visible;
}

/* The jar fills with gold as bonus words come (behind the glass of the jar's picture). */
.ko-jar-fill {
    position: absolute;
    right: 27%;
    bottom: 12%;
    left: 27%;
    height: calc(var(--ko-jar, 0%) * 0.58);
    background: linear-gradient(180deg, #ffd56b, #e8a52a);
    border-radius: 3px 3px 8px 8px;
    transition: height 0.4s ease;
}

.ko-jar.is-bump {
    animation: ko-wiggle 0.5s ease;
}

.ko-wheel {
    position: relative;
    justify-self: center;
    width: var(--ko-wheel, 280px);
    height: var(--ko-wheel, 280px);
    background: url("/img/igrice/kolo/ui/kolo-ploca.svg") center / 100% 100% no-repeat;
    border-radius: 50%;
    box-shadow: 0 16px 36px rgba(8, 12, 24, 0.42);
    touch-action: none;
}

.ko-wheel.is-spin {
    animation: ko-spin 0.9s cubic-bezier(0.6, 0, 0.3, 1);
}

.ko-wheel {
    transition: box-shadow 0.2s ease;
}

.ko-wheel.is-drawing {
    box-shadow: 0 16px 36px rgba(8, 12, 24, 0.42), 0 0 0 7px rgba(26, 154, 160, 0.28), 0 0 28px rgba(26, 154, 160, 0.45);
}

.ko-wheel::after {
    position: absolute;
    inset: -4px;
    border: 5px solid transparent;
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.ko-wheel.is-ok::after {
    border-color: rgba(26, 154, 160, 0.85);
    animation: ko-wheel-ring 0.6s ease-out forwards;
}

.ko-wheel.is-gold::after {
    border-color: rgba(242, 181, 58, 0.95);
    animation: ko-wheel-ring 0.6s ease-out forwards;
}

.ko-wheel.is-bad {
    animation: ko-shake 0.4s ease;
}

/* The word's letters cheer one after another when it lands; a word that is no word flashes them coral. */
.ko-letter.is-cheer {
    animation: ko-cheer 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.ko-letter.is-bad {
    animation: ko-token-bad 0.45s ease;
}

.ko-letter.is-again {
    animation: ko-token-again 0.5s ease;
}

.ko-letter.is-spin {
    animation: ko-token-spin 0.45s ease;
}

/* "+1" rising from the jar for a bonus word. */
.ko-plus {
    position: absolute;
    top: -14px;
    left: 50%;
    z-index: 2;
    padding: 0 6px;
    color: var(--ko-ink);
    background: var(--ko-gold);
    border: 2px solid var(--ko-ink);
    border-radius: 9px;
    font-family: var(--news-font-head);
    font-size: 0.85rem;
    font-weight: 900;
    pointer-events: none;
    animation: ko-plus 0.9s ease-out forwards;
}

.ko-letter {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    width: var(--ko-token, 64px);
    height: var(--ko-token, 64px);
    padding: 0;
    color: var(--ko-ink);
    background: url("/img/igrice/kolo/ui/zeton.svg") center / 100% 100% no-repeat;
    border: 0;
    border-radius: 50%;
    filter: drop-shadow(0 3px 2px rgba(8, 12, 24, 0.35));
    font-family: var(--news-font-head);
    font-size: calc(var(--ko-token, 64px) * 0.58);
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    touch-action: none;
    transition: left 0.45s cubic-bezier(0.5, 0, 0.2, 1.2), top 0.45s cubic-bezier(0.5, 0, 0.2, 1.2), transform 0.12s ease, background 0.12s ease,
        color 0.12s ease, box-shadow 0.12s ease;
}

.ko-letter.is-double {
    font-size: calc(var(--ko-token, 64px) * 0.46);
}

.ko-letter.is-on {
    color: #fff;
    background-image: url("/img/igrice/kolo/ui/zeton-aktivan.svg");
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    transform: scale(1.07);
}

.ko-letter.is-hit {
    animation: ko-hit 0.26s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.ko-letter.is-hit::after {
    position: absolute;
    inset: 4%;
    border: 3px solid rgba(26, 154, 160, 0.75);
    border-radius: 50%;
    content: "";
    animation: ko-ripple 0.45s ease-out forwards;
    pointer-events: none;
}

.ko-letter.is-in {
    animation: ko-letter-in 0.42s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}

.ko-trail {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.ko-trail polyline {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ko-trail.is-fading {
    opacity: 0;
    transition: opacity 0.28s ease;
}

.ko-trail-glow {
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 6.4;
}

.ko-trail-line {
    stroke: var(--ko-teal);
    stroke-width: 3.6;
}

.ko-shuffle {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: grid;
    place-items: center;
    width: calc(var(--ko-wheel, 280px) * 0.22);
    height: calc(var(--ko-wheel, 280px) * 0.22);
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 3px 3px rgba(8, 12, 24, 0.35));
}

.ko-shuffle img {
    width: 100%;
    height: 100%;
}

.ko-shuffle.is-turn img {
    animation: ko-turn 0.5s ease;
}

.ko-keys {
    display: none;
    margin: 6px 0 0;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.ko-keys kbd {
    padding: 0 0.3rem;
    color: var(--ko-ink);
    background: #fff;
    border: 2px solid var(--ko-ink);
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 800;
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
    .ko-keys {
        display: block;
    }
}

/* ---------- buttons ---------- */

.ko-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.4rem;
    color: var(--ko-ink);
    background: #fff;
    border: 3px solid var(--ko-ink);
    box-shadow: 0 4px 0 var(--ko-ink);
    font-family: var(--news-font-head);
    font-size: 1.05rem;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.ko-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 var(--ko-ink);
}

.ko-btn.is-primary {
    color: #fff;
    background: var(--ko-teal);
}

.ko-done .ko-btn.is-primary {
    animation: ko-invite 1.8s 1s ease-in-out infinite;
}

/* ---------- the jar's words ---------- */

.ko-sheet {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    align-items: end;
    background: rgba(8, 12, 24, 0.35);
}

.ko-sheet-card {
    width: min(100%, 520px);
    max-height: 70%;
    justify-self: center;
    overflow: auto;
    padding: 1rem;
    background: #fff;
    border: 3px solid var(--ko-ink);
    border-bottom: 0;
    animation: ko-up 0.28s ease-out;
}

.ko-sheet-title {
    margin: 0 0 0.3rem;
    font-family: var(--news-font-head);
    font-size: 1.15rem;
    font-weight: 900;
}

.ko-sheet-note {
    margin: 0 0 0.6rem;
    color: var(--ko-muted);
    font-size: 0.85rem;
}

.ko-sheet ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 0.8rem;
    padding: 0;
    list-style: none;
}

.ko-sheet li {
    padding: 0.2rem 0.5rem;
    background: #fff4d6;
    border: 2px solid #e2b54a;
    font-weight: 800;
    letter-spacing: 0.04em;
}

/* ---------- a level solved ---------- */

/* A level solved: the whole stage dims and the card stands in its middle, room above it for the ribbon and Bubi, so nothing
   overlaps the crossword (owner, 29 Nov 2026: "needs to be bigger ... cos its overlapping and badly"). */
.ko-done {
    position: absolute;
    inset: 0;
    z-index: 15;
    display: grid;
    align-items: center;
    overflow-y: auto;
    padding: 132px 12px 14px;
    background: rgba(8, 12, 24, 0.74);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: ko-fade 0.3s ease;
}

.ko-done-card {
    position: relative;
    width: min(100%, calc(480px * var(--ko-ui, 1)));
    justify-self: center;
    padding: 2.6rem 1.1rem 1.1rem;
    text-align: center;
    background: #fff;
    border: 3px solid var(--ko-ink);
    box-shadow: 0 8px 0 var(--ko-ink);
    animation: ko-up 0.42s cubic-bezier(0.3, 1.3, 0.5, 1);
}

.ko-done-card > img {
    position: absolute;
    top: -128px;
    left: 50%;
    width: 112px;
    height: 112px;
    margin-left: -56px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
}

/* The owner's teal ribbon across the card's top, under Bubi. */
.ko-ribbon {
    position: absolute;
    z-index: 1;
    top: -42px;
    left: 50%;
    /* The ribbon at its picture's own 3:1, and the word on the band's arc (measured: its middle line y = 0.5 (x - 0.5)^2 +
       0.407 of the height, the band 23 to 58 % at its middle; owner: "give fonts some spline"): an SVG text path, the
       baseline 0.3 em under that line, 64 units tall in the ribbon's 768, so "Sjajno!" and "Wow!" sit alike on it. */
    box-sizing: border-box;
    width: min(15rem, 94%);
    aspect-ratio: 3 / 1;
    background: url("/img/igrice/kolo/ui/traka.svg") center / 100% 100% no-repeat;
    transform: translateX(-50%);
    animation: ko-ribbon 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}

/* The stars are flex items beside the words (inline, the second one wrapped alone onto its own line on a phone). */
/* A friend's challenge is for the glory and a level played again for the fun of it: the card shows the words and bonus words,
   no points or dukati. */
.ko-done-card:is(.is-challenge, .is-replay) .ko-done-figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ko-done-card:is(.is-challenge, .is-replay) .ko-done-figures div:nth-child(n + 3) {
    display: none;
}

/* ---------- the map (owner, 29 Nov 2026: "make sure there is map, so I can select what level I want and where to I got to") ---------- */

.ko-map {
    position: absolute;
    inset: 0;
    z-index: 28;
    display: grid;
    background: rgba(8, 12, 24, 0.55);
    animation: ko-fade 0.2s ease-out;
}

/* The map's card in the owner's pieces (NovaIgra, 29 Nov 2026): his parchment behind the list (mapa-pozadina), the ribbon
   under "Tvoj put" (mapa-naslov), his close button (mapa-zatvori), every zone's painting in a gold frame (mapa-okvir), the
   dotted route between the zones (mapa-put), the flag on the zone the player is in (mapa-zastavica) and the levels on his
   discs (mapa-razina, -sada, -zakljucana). The numbers and the words stay text. */
.ko-map-card {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: min(100%, 560px);
    height: 100%;
    justify-self: center;
    overflow: hidden;
    background: #efdfb6 url("/img/igrice/kolo/mapa-pozadina.webp") center / cover no-repeat;
    box-shadow: 0 0 46px rgba(0, 0, 0, 0.45);
    animation: ko-up 0.28s ease-out;
}

.ko-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.85rem 0.8rem 0.15rem 0.7rem;
}

.ko-map-heading {
    display: grid;
    justify-items: start;
    gap: 0.25rem;
    min-width: 0;
}

/* The ribbon's own box is 744 x 122 (the art cropped to it). Measured on the art: between its two stitched lines the band
   runs from 10 % to 61 % of the height and arches, its middle line y = 0.83 (x - 0.5)^2 + 0.355 of the height; the compass
   ends at 21 % of the width. The words follow that line (owner, 29 Nov 2026: "give fonts some spline", after they crossed
   the stitching): an SVG text path on the arc, its baseline 0.263 em under the middle line (caps and descenders centred),
   44 units tall in the ribbon's 744, centred at 56 % (clear of the compass), so they bend with the band at any width. */
.ko-map-title {
    --ko-ribbon: min(64vw, 250px);
    display: block;
    width: var(--ko-ribbon);
    aspect-ratio: 744 / 122;
    margin: 0;
    background: url("/img/igrice/kolo/ui/mapa-naslov.svg") center / 100% 100% no-repeat;
}

.ko-map-title svg,
.ko-ribbon svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.ko-map-title path,
.ko-ribbon path {
    fill: none;
}

.ko-ribbon text {
    fill: #fff;
    font-family: var(--news-font-head);
    font-size: 64px;
    font-weight: 900;
    filter: drop-shadow(0 6px 5px rgba(0, 0, 0, 0.35));
}

.ko-map-title text {
    fill: #fff6df;
    font-family: var(--news-font-head);
    font-size: 44px;
    font-weight: 900;
    letter-spacing: 1.3px;
    filter: drop-shadow(0 4px 0 rgba(9, 52, 58, 0.6));
}

/* The words over the painted islands lift off on a halo of the parchment's own colour (no box). */
.ko-map-where {
    margin: 0 0 0 0.4rem;
    color: #4b3a1e;
    font-size: 0.85rem;
    font-weight: 800;
    text-shadow: 0 0 2px #f7ecd2, 0 0 5px #f7ecd2, 0 0 9px #f7ecd2, 0 0 14px #f7ecd2;
}

.ko-map-close {
    flex: none;
    width: 46px;
    height: 46px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    touch-action: manipulation;
    filter: drop-shadow(0 3px 2px rgba(40, 26, 6, 0.35));
}

.ko-map-close img {
    display: block;
    width: 100%;
    height: 100%;
}

.ko-map-close:active {
    translate: 0 2px;
}

.ko-map-close:focus-visible {
    outline: 3px solid var(--ko-teal, #1f8f9f);
    outline-offset: 2px;
}

.ko-map-note {
    margin: 0;
    padding: 0.3rem 1rem 0.4rem;
    color: #4f3d20;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 0 2px #f7ecd2, 0 0 5px #f7ecd2, 0 0 9px #f7ecd2, 0 0 14px #f7ecd2;
}

.ko-map-zones {
    --ko-map-gap: 2.1rem;
    position: relative;
    display: grid;
    align-content: start;
    /* Each zone as tall as its levels: auto rows in a list taller than the screen shrank the cards and cut a zone's second
       row of levels off. */
    grid-auto-rows: max-content;
    gap: var(--ko-map-gap);
    margin: 0;
    /* Room at the top for the flag over the first zone. */
    padding: 2rem 0.75rem 2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
}

/* A zone: its painting inside the gold frame, a nine-slice of the 1024 x 512 picture (corners 96 px of it, drawn 32 px: the
   rim ends 20 px in, where the painting starts). The darkening for the name is the painting's own top layer, under the
   frame, so the rim stays bright. */
.ko-map-zone {
    position: relative;
    isolation: isolate;
    padding: 0.2rem 0.35rem 0.45rem;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(10, 14, 24, 0.62) 0%, rgba(10, 14, 24, 0.16) 48%, rgba(10, 14, 24, 0.42) 100%),
        var(--ko-picture, none) center / cover no-repeat,
        linear-gradient(165deg, var(--ko-from, #2fb3c9), var(--ko-to, #f4e6c4));
    background-clip: padding-box;
    border: 20px solid transparent;
    border-image: url("/img/igrice/kolo/ui/mapa-okvir.svg") 96 / 32px / 0 stretch;
    filter: drop-shadow(0 5px 6px rgba(52, 34, 8, 0.32));
}

/* The dotted route from the zone before, in the gap above it; every other one mirrored, so the way winds. */
.ko-map-zone + .ko-map-zone::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 20px);
    left: 18%;
    width: 64%;
    height: var(--ko-map-gap);
    background: url("/img/igrice/kolo/ui/mapa-put.svg") center / 100% auto no-repeat;
    pointer-events: none;
}

.ko-map-zone:nth-child(odd)::before {
    scale: -1 1;
}

/* The zone the player is in: a warm glow and the flag planted on its frame. */
.ko-map-zone.is-now {
    filter: drop-shadow(0 0 9px rgba(255, 196, 70, 0.8)) drop-shadow(0 5px 6px rgba(52, 34, 8, 0.32));
}

.ko-map-zone.is-now::after {
    content: "";
    position: absolute;
    top: -48px;
    right: -8px;
    width: 52px;
    height: 52px;
    background: url("/img/igrice/kolo/ui/mapa-zastavica.svg") center / contain no-repeat;
    transform-origin: 30% 92%;
    animation: ko-flag 3.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ko-flag {
    0%, 100% { rotate: -2deg; }
    50% { rotate: 3deg; }
}

.ko-map-zone.is-locked {
    filter: grayscale(0.75) brightness(0.82) drop-shadow(0 5px 6px rgba(52, 34, 8, 0.25));
}

.ko-map-zone-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.15rem 0.6rem;
    margin-bottom: 0.55rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.ko-map-zone-head strong {
    font-family: var(--news-font-head);
    font-size: 1.12rem;
    font-weight: 900;
    line-height: 1.15;
}

.ko-map-zone-head small {
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.ko-map-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* A level on the owner's disc: cream with its star when solved, gold when it is the next one, grey with a padlock ahead. */
.ko-map-level {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    color: var(--ko-ink);
    background: url("/img/igrice/kolo/ui/mapa-razina.svg") center / contain no-repeat;
    border: 0;
    border-radius: 50%;
    font-family: var(--news-font-head);
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    filter: drop-shadow(0 2px 1.5px rgba(10, 14, 24, 0.45));
}

.ko-map-level.is-now {
    background-image: url("/img/igrice/kolo/ui/mapa-razina-sada.svg");
    animation: ko-invite 1.8s ease-in-out infinite;
}

/* The level on the screen now. */
.ko-map-level.is-here {
    outline: 3px solid #fff;
    outline-offset: 0;
}

.ko-map-level.is-long {
    font-size: 0.74rem;
}

.ko-map-level.is-locked {
    color: rgba(22, 23, 28, 0.42);
    background-image: url("/img/igrice/kolo/ui/mapa-razina-zakljucana.svg");
    cursor: default;
}

.ko-map-level:not(:disabled):active {
    translate: 0 2px;
}

.ko-map-level:focus-visible {
    outline: 3px solid var(--ko-teal, #1f8f9f);
    outline-offset: 2px;
}

/* A puzzle from a challenge: who won, both, the challenge's table. */
.ko-versus {
    margin: 0 0 0.8rem;
    padding: 0.55rem 0.75rem;
    background: #fff8e6;
    border: 2px solid #e2b54a;
}

.ko-versus-result {
    margin: 0;
    font-family: var(--news-font-head);
    font-size: 1.15rem;
    font-weight: 900;
}

.ko-versus-result.is-won {
    color: #1f8f4e;
}

.ko-versus-result.is-lost {
    color: #9a3412;
}

.ko-versus-both {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    font-weight: 700;
}

.ko-versus-board {
    display: grid;
    gap: 0.2rem;
    margin: 0.45rem 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.ko-versus-board li {
    display: flex;
    gap: 0.45rem;
    font-size: 0.88rem;
}

.ko-versus-board li.is-me {
    color: var(--ko-teal-dark);
    font-weight: 800;
}

.ko-versus-board em {
    margin-left: auto;
    font-style: normal;
    font-weight: 800;
}

/* A guest's name for the challenge (a signed-in player's nickname goes by itself). */
.ko-challenge-name {
    display: grid;
    gap: 0.2rem;
    width: min(100%, 260px);
    margin: 0 auto 0.6rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: left;
}

.ko-challenge-name span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.ko-challenge-name input {
    padding: 0.5rem 0.6rem;
    border: 2px solid var(--ko-ink);
    font: inherit;
    font-size: 1rem;
}

.ko-done-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25em;
    margin: 0.2rem 0 0.7rem;
    color: var(--ko-ink);
    font-family: var(--news-font-head);
    font-size: clamp(1.4rem, 6.2vw, 2.1rem);
    font-weight: 900;
    line-height: 1.05;
    text-wrap: balance;
    animation: ko-title-in 0.55s 0.15s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}

.ko-done-title::before,
.ko-done-title::after {
    display: block;
    flex: none;
    width: 0.9em;
    height: 0.9em;
    margin: 0;
    background: url("/img/igrice/kolo/ui/zvjezdica.svg") center / contain no-repeat;
    vertical-align: -0.08em;
    content: "";
    animation: ko-twinkle 1.6s ease-in-out infinite;
}

.ko-done-title::after {
    animation-delay: -0.8s;
}

.ko-done-figures {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    margin: 0.4rem 0 0.8rem;
}

.ko-done-figures div {
    padding: 0.45rem 0.2rem;
    background: #eef8f8;
    border: 2px solid var(--ko-ink);
}

.ko-done-figures dt {
    color: var(--ko-muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ko-done-figures dd {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    margin: 0;
    font-family: var(--news-font-head);
    font-size: 1.35rem;
    font-weight: 900;
}

.ko-done-note {
    margin: 0 0 0.8rem;
    color: var(--ko-teal-dark);
    font-weight: 800;
}

.ko-done-actions {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
}

.ko-done .games-account {
    margin-top: 0.8rem;
    text-align: left;
}

/* ---------- every tenth level: Bubi's gift ---------- */

.ko-milestone {
    position: absolute;
    inset: 0;
    z-index: 25;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: radial-gradient(circle at 50% 42%, #1a9aa0, #081428 72%);
    animation: ko-fade 0.35s ease;
}

.ko-rays {
    position: absolute;
    top: 42%;
    left: 50%;
    width: 220vmax;
    height: 220vmax;
    margin: -110vmax 0 0 -110vmax;
    background: repeating-conic-gradient(rgba(255, 255, 255, 0.11) 0deg 9deg, rgba(255, 255, 255, 0) 9deg 22deg);
    animation: ko-rotate 18s linear infinite;
    pointer-events: none;
}

.ko-star {
    position: absolute;
    z-index: 1;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.35));
    animation: ko-twinkle 1.8s ease-in-out infinite;
}

.ko-star.is-a {
    top: 14%;
    left: 12%;
}

.ko-star.is-b {
    top: 22%;
    right: 12%;
    animation-delay: -0.6s;
}

.ko-star.is-c {
    top: 56%;
    left: 8%;
    animation-delay: -1.2s;
}

.ko-milestone-card {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.3rem;
    padding: 1rem;
    color: #fff;
    text-align: center;
}

.ko-kicker {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* Every tenth level: its number on the games' level badge (razina-znacka), sparkles at its shoulder (iskrice). */
.ko-milestone-number {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(9rem, 44vw, 12rem);
    aspect-ratio: 1;
    margin: 0 auto;
    padding-top: 0.12em;
    background: url("/img/igrice/zajednicko/razina-znacka.svg") center / contain no-repeat;
    /* The number keeps to the badge's cream middle (60 % of it, a chord of about half its width at the digits' height):
       kolo.js gives its width in ems (--ko-number-ems), so 100 and 1.000 shrink to fit (owner: "fix the overlaps"). */
    font-size: min(clamp(3.4rem, 17vw, 5rem), calc(clamp(9rem, 44vw, 12rem) * 0.5 / var(--ko-number-ems, 1.24))) !important;
    text-shadow: 0 4px 0 var(--ko-ink) !important;
}

.ko-milestone-number::after {
    position: absolute;
    top: -6%;
    right: -14%;
    width: 46%;
    aspect-ratio: 1;
    background: url("/img/igrice/zajednicko/iskrice.svg") center / contain no-repeat;
    content: "";
    animation: ko-twinkle 1.6s ease-in-out infinite;
}

.ko-milestone-number {
    color: var(--ko-gold);
    font-family: var(--news-font-head);
    font-size: clamp(5rem, 28vw, 8.5rem);
    font-weight: 900;
    line-height: 0.9;
    -webkit-text-stroke: 4px var(--ko-ink);
    paint-order: stroke fill;
    text-shadow: 0 8px 0 var(--ko-ink);
    animation: ko-slam 0.7s cubic-bezier(0.25, 1.6, 0.5, 1) both;
}

.ko-milestone-title {
    margin: 0;
    font-family: var(--news-font-head);
    font-size: 1.5rem;
    font-weight: 900;
    animation: ko-up 0.5s 0.25s ease-out both;
}

.ko-milestone-card .ko-dancer {
    width: 160px;
    height: 160px;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
    animation: ko-dance 1.1s 0.4s ease-in-out infinite;
}

.ko-gifts {
    display: flex;
    gap: 0.5rem;
    margin: 0.3rem 0 0.8rem;
}

.ko-gifts span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    color: var(--ko-ink);
    background: #fff;
    border: 3px solid var(--ko-ink);
    box-shadow: 0 3px 0 var(--ko-ink);
    font-weight: 900;
    animation: ko-pop 0.45s ease-out both;
}

.ko-gifts span:nth-child(1) {
    animation-delay: 0.55s;
}

.ko-gifts span:nth-child(2) {
    animation-delay: 0.75s;
}

/* ---------- a new zone: the journey ---------- */

.ko-travel {
    position: absolute;
    inset: 0;
    z-index: 26;
    display: grid;
    place-items: center;
    overflow: hidden;
}

/* The new place opens out of the wheel in a growing circle, a ring of light on its edge. */
.ko-portal {
    position: absolute;
    inset: 0;
    background: var(--ko-next-picture, none) center / cover no-repeat, linear-gradient(165deg, var(--ko-next-from, #2fb3c9), var(--ko-next-to, #f4e6c4));
    clip-path: circle(0 at var(--ko-x, 50%) var(--ko-y, 75%));
    transition: clip-path 1.1s cubic-bezier(0.7, 0, 0.25, 1);
}

.ko-travel.is-open .ko-portal {
    clip-path: circle(150vmax at var(--ko-x, 50%) var(--ko-y, 75%));
}

.ko-portal-ring {
    position: absolute;
    top: var(--ko-y, 75%);
    left: var(--ko-x, 50%);
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 6px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.6), inset 0 0 24px rgba(255, 255, 255, 0.7);
    opacity: 0;
    pointer-events: none;
}

.ko-travel.is-open .ko-portal-ring {
    animation: ko-ring 1.1s cubic-bezier(0.7, 0, 0.25, 1) forwards;
}

.ko-travel-card {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    width: min(92%, 420px);
    padding: 1.2rem 1rem 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.94);
    border: 3px solid var(--ko-ink);
    box-shadow: 0 8px 0 var(--ko-ink);
    opacity: 0;
    transform: translateY(30px) scale(0.92);
    transition: opacity 0.45s ease 1s, transform 0.55s cubic-bezier(0.3, 1.4, 0.5, 1) 1s;
}

.ko-travel.is-open .ko-travel-card {
    opacity: 1;
    transform: none;
}

.ko-travel-card .ko-kicker {
    color: var(--ko-teal-dark);
}

/* The zone's name lands letter by letter, on tiles like the crossword's: a word's tiles stay on one line (a name wraps only
   between words), and they shrink so the name's longest word (--ko-n, set by the script) fits the card. */
.ko-travel-name {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    justify-self: stretch;
    gap: 6px 14px;
    width: 100%;
    margin: 0.2rem 0 0;
    container-type: inline-size;
}

.ko-travel-word {
    display: flex;
    gap: 4px;
}

.ko-travel-word > span {
    --ko-tile: 28px;
    display: grid;
    place-items: center;
    width: var(--ko-tile);
    height: calc(var(--ko-tile) * 1.18);
    color: #fff;
    background: var(--ko-teal);
    border: 2px solid var(--ko-ink);
    border-radius: 5px;
    box-shadow: 0 3px 0 var(--ko-ink);
    font-family: var(--news-font-head);
    font-size: calc(var(--ko-tile) * 0.6);
    font-weight: 900;
    opacity: 0;
    transform: translateY(-40px) rotate(-12deg);
}

@supports (width: 1cqw) {
    .ko-travel-word > span {
        --ko-tile: min(36px, calc((100cqw - (var(--ko-n, 9) - 1) * 4px) / var(--ko-n, 9)));
    }
}

.ko-travel.is-open .ko-travel-word > span {
    animation: ko-drop 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) forwards;
    animation-delay: calc(1.2s + var(--i) * 70ms);
}

.ko-travel-region {
    margin: 0.2rem 0 0;
    color: var(--ko-muted);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ko-route {
    width: 100%;
    max-width: 280px;
    height: 56px;
}

.ko-route path {
    fill: none;
    stroke: var(--ko-coral);
    stroke-width: 4;
    stroke-dasharray: 8 9;
    stroke-linecap: round;
}

.ko-route circle {
    fill: var(--ko-ink);
}

.ko-route .ko-route-end {
    fill: var(--ko-coral);
    stroke: var(--ko-ink);
    stroke-width: 3;
}

.ko-travel.is-open .ko-route path {
    animation: ko-route 1.4s 1.4s linear both;
}

.ko-travel-gift {
    margin: 0 0 0.6rem;
    color: var(--ko-teal-dark);
    font-size: 0.9rem;
    font-weight: 800;
}

/* Under the card and never in the way of a tap (on a short phone he stood over the corner of Kreni). */
.ko-traveller {
    position: absolute;
    bottom: 4%;
    left: -40%;
    z-index: 1;
    width: 170px;
    height: 170px;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.35));
    pointer-events: none;
}

@media (max-height: 700px) {
    .ko-traveller {
        width: 120px;
        height: 120px;
    }
}

.ko-travel.is-open .ko-traveller {
    animation: ko-walk 2.4s 0.9s cubic-bezier(0.3, 0.8, 0.4, 1) forwards;
}

/* ---------- confetti ---------- */

.ko-confetti {
    position: absolute;
    inset: 0;
    z-index: 24;
    overflow: hidden;
    pointer-events: none;
}

.ko-confetti i {
    position: absolute;
    top: -20px;
    left: var(--x);
    width: var(--w, 9px);
    height: var(--h, 14px);
    background: var(--c);
    border-radius: var(--r, 2px);
    animation: ko-fall var(--t, 2.2s) var(--d, 0s) cubic-bezier(0.3, 0.6, 0.6, 1) forwards;
}

/* ---------- below the game ---------- */

.ko-below {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1rem 16px 3rem;
}

.ko-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.ko-modes a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0.4rem 0.75rem;
    color: var(--ko-ink);
    background: #fff;
    border: 2px solid var(--ko-ink);
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
}

.ko-modes a.is-active {
    color: #fff;
    background: var(--ko-teal);
    border-color: var(--ko-teal);
}

.ko-section {
    margin-top: 2rem;
}

.ko-section h2 {
    font-family: var(--news-font-head);
    font-weight: 900;
}

.ko-steps {
    display: grid;
    gap: 0.5rem;
    padding-left: 1.2rem;
}

.ko-top-list {
    display: grid;
    gap: 0.35rem;
    padding: 0;
    list-style: none;
}

.ko-top-list li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.ko-top-list em {
    margin-left: auto;
    font-style: normal;
    font-weight: 900;
}

.ko-top-list small {
    color: var(--ko-muted);
}

.ko-faq details {
    padding: 0.6rem 0;
    border-bottom: 1px solid #ddd;
}

.ko-faq summary {
    padding: 0.7rem 0;
    font-weight: 800;
    cursor: pointer;
}

/* The frame round the stage: nothing on a phone. */
.ko-backdrop {
    display: none;
}

/* Full screen (the frame): the stage in the middle of a dark screen, as wide as its portrait shape allows (a phone held
   upright: the whole screen). */
.ko-frame:fullscreen {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--ko-ink);
}

.ko-frame:fullscreen .ko-stage {
    width: min(100%, var(--ko-width, 100%));
    margin: 0;
}

/* A phone: a strip of nothing under the wheel (owner, 29 Nov 2026: "it needs small deadline down there ... so it's natural for
   fingers", "that deadzone is very important"), so a swipe at the wheel's bottom is never the phone's own gesture bar, and
   the screen's own safe area under that where the phone has one. */
@media (max-width: 767.98px) {
    .ko-stage {
        padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px));
    }
}

/* A computer: the game in a portrait frame the shape of its painting (owner, 29 Nov 2026: "on desktop kolo is a bit blurry,
   can we scale it to phone size too not this wide, like ... emulated phone or PAD"). The picture (800 × 1200) is never drawn
   wider than itself, so it stays sharp; round the frame the same picture far out of focus and dark. kolo.js sets --ko-width
   (two thirds of the stage's height). */
@media (min-width: 768px) {
    .ko-frame {
        position: relative;
        isolation: isolate;
        overflow: hidden;
        max-width: 1180px;
        margin: 0 auto;
        padding: 6px 0 16px;
        background: var(--ko-ink);
    }

    .ko-backdrop {
        display: block;
        position: absolute;
        inset: -48px;
        z-index: -1;
        background: var(--ko-picture, none) center / cover no-repeat, linear-gradient(165deg, var(--ko-from, #2fb3c9), var(--ko-to, #f4e6c4));
        filter: blur(28px) brightness(0.5) saturate(1.1);
    }

    .ko-stage {
        width: min(100%, var(--ko-width, 600px));
        border: 3px solid var(--ko-ink);
        box-shadow: 0 8px 0 rgba(8, 12, 24, 0.6);
    }

    .ko-frame:fullscreen .ko-stage {
        box-shadow: none;
    }

    .ko-host img {
        width: 74px;
        height: 74px;
    }
}

/* A small phone: everything a notch smaller, so the wheel and the crossword share the screen. */
@media (max-height: 700px) {
    .ko-level {
        font-size: 1.1rem;
    }

    .ko-host {
        min-height: 48px;
    }

    .ko-host img {
        width: 48px;
        height: 48px;
    }

    .ko-line {
        font-size: 0.8rem;
    }

    .ko-chip {
        height: 32px;
        font-size: 1.1rem;
    }
}

@keyframes ko-title-in {
    from { opacity: 0; transform: scale(0.6); }
}

@keyframes ko-invite {
    50% { transform: scale(1.05); }
}

@keyframes ko-combo {
    0% { transform: scale(0.4); }
    60% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

@keyframes ko-hit {
    0% { transform: scale(1); }
    45% { transform: scale(1.16); }
    100% { transform: scale(1.07); }
}

@keyframes ko-ripple {
    from { opacity: 1; transform: scale(0.9); }
    to { opacity: 0; transform: scale(1.45); }
}

@keyframes ko-line-in {
    from { opacity: 0; transform: translateX(-8px) scale(0.94); }
}

@keyframes ko-ribbon {
    from { transform: translateX(-50%) scale(0.4) rotate(-6deg); opacity: 0; }
}

@keyframes ko-twinkle {
    50% { transform: scale(1.25) rotate(18deg); }
}

@keyframes ko-dance {
    25% { transform: rotate(-7deg) translateY(-6px); }
    75% { transform: rotate(7deg) translateY(-6px); }
}

@keyframes ko-bump {
    40% { transform: scale(1.14); }
}

@keyframes ko-board-pop {
    45% { transform: scale(1.02); }
}

@keyframes ko-flip {
    0% { transform: rotateX(90deg) scale(0.8); }
    60% { transform: rotateX(-12deg) scale(1.08); }
    100% { transform: none; }
}

@keyframes ko-pop {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: none; }
}

@keyframes ko-again {
    30%, 70% { background: #ffe39a; transform: scale(1.08); }
}

@keyframes ko-wave {
    40% { transform: translateY(-9px) scale(1.06); }
}

@keyframes ko-glow {
    50% { outline-color: rgba(242, 181, 58, 0.3); }
}

@keyframes ko-chip {
    0% { transform: scale(0.4) translateY(8px); opacity: 0; }
    60% { transform: scale(1.18); opacity: 1; }
    100% { transform: none; }
}

@keyframes ko-cheer {
    40% { transform: translateY(-12px) scale(1.14); }
    100% { transform: none; }
}

@keyframes ko-token-bad {
    0%, 100% { transform: none; filter: drop-shadow(0 3px 2px rgba(8, 12, 24, 0.35)); }
    20%, 60% { transform: translateX(-5px); filter: drop-shadow(0 0 10px rgba(239, 107, 85, 0.95)); }
    40%, 80% { transform: translateX(5px); filter: drop-shadow(0 0 10px rgba(239, 107, 85, 0.95)); }
}

@keyframes ko-token-again {
    40% { transform: scale(1.1); filter: drop-shadow(0 0 10px rgba(242, 181, 58, 0.95)); }
}

@keyframes ko-token-spin {
    to { transform: rotate(360deg); }
}

@keyframes ko-wheel-ring {
    from { opacity: 1; transform: scale(0.96); }
    to { opacity: 0; transform: scale(1.12); }
}

@keyframes ko-plus {
    0% { opacity: 0; transform: translate(-50%, 6px) scale(0.8); }
    25% { opacity: 1; transform: translate(-50%, -4px) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -30px) scale(1); }
}

@keyframes ko-shake {
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

@keyframes ko-wiggle {
    25% { transform: rotate(-14deg) scale(1.1); }
    50% { transform: rotate(10deg) scale(1.1); }
    75% { transform: rotate(-5deg); }
}

@keyframes ko-spin {
    to { transform: rotate(360deg); }
}

@keyframes ko-turn {
    to { transform: rotate(360deg); }
}

@keyframes ko-letter-in {
    from { transform: scale(0); opacity: 0; }
}

@keyframes ko-up {
    from { transform: translateY(40px); opacity: 0; }
}

@keyframes ko-fade {
    from { opacity: 0; }
}

@keyframes ko-rotate {
    to { transform: rotate(360deg); }
}

@keyframes ko-slam {
    0% { transform: scale(3); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

@keyframes ko-bounce {
    50% { transform: translateY(-10px); }
}

@keyframes ko-ring {
    0% { opacity: 1; transform: scale(0.5); }
    100% { opacity: 0; transform: scale(60); }
}

@keyframes ko-drop {
    to { opacity: 1; transform: none; }
}

@keyframes ko-route {
    from { stroke-dashoffset: 300; opacity: 0.2; }
    to { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes ko-walk {
    0% { left: -40%; transform: translateY(0); }
    20% { transform: translateY(-8px); }
    40% { transform: translateY(0); }
    60% { transform: translateY(-8px); }
    100% { left: 4%; transform: translateY(0); }
}

@keyframes ko-fall {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 1; }
    100% { transform: translate3d(var(--dx, 0), 110vh, 0) rotate(var(--rot, 540deg)); opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
    .ko-bg {
        animation: none;
    }

    .ko *,
    .ko *::before,
    .ko *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
}

/* A short screen (a phone's browser bars take 80 to 180 px of it): the card fits, Bubi smaller above it, and a guest's account
   box keeps its title (what the level was worth) and its buttons, without the badges and the paragraph. */
@media (max-height: 760px) {
    .ko-done {
        padding-top: 100px;
    }

    .ko-done-card {
        padding: 2.3rem 0.9rem 0.9rem;
    }

    .ko-done-card > img {
        top: -96px;
        width: 84px;
        height: 84px;
        margin-left: -42px;
    }

    .ko-done .games-account-ranks,
    .ko-done .games-account-text {
        display: none;
    }
}
