﻿/* PLACE AT: WorldScholarArena.Backend/wwwroot/academy/css/pk.css   (new file). The "Play and Learn" event screen (/kiosk/play). One deliberate dark look. */
:root {
    --ink: #06281e;
    --ink2: #0b3a2c;
    --deep: #041c15;
    --gold: #F5C84C;
    --gold2: #e5a91a;
    --paper: #fffdf6;
    --txt: #f3f6ef;
    --mute: #b9cbc2;
    --line: rgba(255,255,255,.12);
    --c: #34D399;
    --r: 22px;
    --fs: 1;
    color-scheme: dark;
    font-family: "Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif
}

html.big {
    --fs: 1.18
}

* {
    box-sizing: border-box
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--deep);
    color: var(--txt)
}

body {
    font-size: calc(17px*var(--fs));
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    padding-left: max(0px,env(safe-area-inset-left,0px));
    padding-right: max(0px,env(safe-area-inset-right,0px))
}

html.web body {
    user-select: auto;
    -webkit-user-select: auto
}

input {
    user-select: text;
    -webkit-user-select: text
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
    touch-action: manipulation
}

    button:focus-visible, input:focus-visible {
        outline: 3px solid var(--gold);
        outline-offset: 3px
    }

[hidden] {
    display: none !important
}

body.modal, body.viewing {
    overflow: hidden
}

/* ---------- the living background ---------- */
.sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: radial-gradient(1200px 700px at 80% -10%,#0f5a43 0,transparent 60%),radial-gradient(900px 600px at -10% 110%,#103d5c 0,transparent 60%),linear-gradient(160deg,#06281e,#041c15 60%,#05170f)
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .35;
    animation: blob 22s ease-in-out infinite alternate
}

.b1 {
    width: 520px;
    height: 520px;
    background: #F59E0B;
    left: -120px;
    top: 20%
}

.b2 {
    width: 460px;
    height: 460px;
    background: #2DD4BF;
    right: -100px;
    top: 50%;
    animation-delay: -7s
}

.b3 {
    width: 380px;
    height: 380px;
    background: #A78BFA;
    left: 40%;
    top: -140px;
    animation-delay: -14s
}

@keyframes blob {
    0% {
        transform: translate(0,0) scale(1)
    }

    50% {
        transform: translate(60px,-40px) scale(1.12)
    }

    100% {
        transform: translate(-40px,50px) scale(.94)
    }
}

.floaters span {
    position: absolute;
    bottom: -60px;
    color: rgba(245,200,76,.18);
    font-weight: 800;
    font-family: Georgia,serif;
    animation: float linear infinite
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0);
        opacity: 0
    }

    10% {
        opacity: 1
    }

    90% {
        opacity: 1
    }

    100% {
        transform: translateY(-115vh) rotate(260deg);
        opacity: 0
    }
}

/* ---------- masthead ---------- */
.mast {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px max(28px,env(safe-area-inset-right,0px)) 14px max(28px,env(safe-area-inset-left,0px));
    background: rgba(4,28,21,.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line)
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0
}

    .brand b {
        display: block;
        font: 700 calc(1.35rem*var(--fs))/1.1 Georgia,"Times New Roman",serif;
        letter-spacing: .01em
    }

    .brand small {
        display: block;
        color: var(--gold);
        font-size: .78rem;
        letter-spacing: .22em;
        text-transform: uppercase;
        font-weight: 700
    }

.mark svg {
    width: 52px;
    height: 52px;
    display: block;
    animation: spinin 1.2s cubic-bezier(.2,1.4,.4,1) both
}

@keyframes spinin {
    from {
        transform: rotate(-200deg) scale(.3);
        opacity: 0
    }
}

.mright {
    display: flex;
    align-items: center;
    gap: 12px
}

.chip {
    border: 1px solid var(--line);
    background: rgba(255,255,255,.06);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: .9rem
}

    .chip.warn {
        background: #7a1d1d;
        border-color: #f87171
    }

.btnc[aria-pressed=true] {
    background: var(--gold);
    color: var(--ink)
}

.clock {
    text-align: right
}

    .clock b {
        display: block;
        font-size: 1.5rem;
        line-height: 1
    }

    .clock small {
        color: var(--mute);
        font-size: .8rem
    }

html.web .clock {
    display: none
}

main {
    position: relative;
    z-index: 1;
    overflow-x: clip;
    max-width: 1840px;
    margin: 0 auto;
    padding: 0 max(28px,env(safe-area-inset-right,0px)) 40px max(28px,env(safe-area-inset-left,0px))
}

/* ---------- hero ---------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0,1.25fr) minmax(0,1fr);
    gap: 40px;
    align-items: center;
    padding: 46px 0 26px
}

.kick {
    display: inline-block;
    font-size: .8rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--gold)
}

.hero h1 {
    margin: .3em 0 .35em;
    font: 800 calc(clamp(2.4rem,5.2vw,5.4rem)*var(--fs))/1.02 Georgia,"Times New Roman",serif;
    letter-spacing: -.01em;
    text-wrap: balance
}

.grad {
    background: linear-gradient(90deg,#F5C84C,#F59E0B 30%,#2DD4BF 60%,#A78BFA 90%,#F5C84C);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 8s linear infinite
}

@keyframes shimmer {
    to {
        background-position: 300% 0
    }
}

.hero p {
    max-width: 60ch;
    color: var(--mute);
    font-size: calc(1.18rem*var(--fs));
    margin: 0 0 22px
}

.hbtns {
    display: flex;
    flex-wrap: wrap;
    gap: 14px
}

.big {
    border: 0;
    border-radius: 18px;
    padding: 18px 26px;
    font-weight: 800;
    font-size: calc(1.15rem*var(--fs));
    color: var(--ink);
    display: inline-flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.35),inset 0 -4px 0 rgba(0,0,0,.18);
    transition: transform .15s
}

    .big:active {
        transform: scale(.96)
    }

    .big.play {
        background: linear-gradient(135deg,#FCD34D,#F59E0B)
    }

    .big.labs {
        background: linear-gradient(135deg,#5EEAD4,#14B8A6)
    }

    .big.trials {
        background: linear-gradient(135deg,#6EE7B7,#10B981)
    }

    .big span {
        font-size: 1.2em
    }

.mailnote {
    margin-top: 18px !important;
    color: var(--txt) !important;
    font-size: 1rem !important
}

.hero > .orbit {
    position: relative;
    aspect-ratio: 1;
    max-width: 520px;
    width: 100%;
    justify-self: center
}

.core {
    position: absolute;
    inset: 30%;
    border-radius: 50%;
    display: grid;
    place-content: center;
    text-align: center;
    background: radial-gradient(circle at 35% 30%,#1a7a5c,#06281e 70%);
    border: 3px solid var(--gold);
    box-shadow: 0 0 60px rgba(245,200,76,.35),inset 0 0 40px rgba(0,0,0,.5);
    animation: breathe 4s ease-in-out infinite
}

    .core b {
        font: 800 calc(2.4rem*var(--fs))/1 Georgia,serif;
        color: var(--gold)
    }

    .core small {
        color: var(--txt);
        font-weight: 700;
        letter-spacing: .15em;
        text-transform: uppercase
    }

@keyframes breathe {
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 90px rgba(245,200,76,.55),inset 0 0 40px rgba(0,0,0,.5)
    }
}

.hero > .orbit > .ring {
    position: absolute;
    inset: 0;
    animation: turn 40s linear infinite
}

    .hero > .orbit > .ring::before {
        content: "";
        position: absolute;
        inset: 11%;
        border-radius: 50%;
        border: 2px dashed rgba(245,200,76,.3)
    }

.emw.orb {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22%;
    aspect-ratio: 1;
    margin: -11% 0 0 -11%;
    transform: rotate(calc(var(--i)*60deg)) translate(0,-172%) rotate(calc(var(--i)*-60deg));
    border-radius: 24%;
    background: linear-gradient(145deg,rgba(255,255,255,.14),rgba(255,255,255,.04));
    border: 1px solid rgba(255,255,255,.2);
    padding: 3%;
    box-shadow: 0 10px 30px rgba(0,0,0,.4)
}

    .emw.orb .em {
        animation: counter 40s linear infinite
    }

@keyframes turn {
    to {
        transform: rotate(360deg)
    }
}

@keyframes counter {
    to {
        transform: rotate(-360deg)
    }
}

/* ---------- category tabs ---------- */
.tabs {
    position: sticky;
    top: 80px;
    z-index: 15;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 0;
    background: linear-gradient(var(--deep) 70%,transparent)
}

html.web .tabs {
    top: 72px
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.05);
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    font-size: calc(1rem*var(--fs));
    transition: background .2s,transform .15s
}

    .tab em {
        font-style: normal;
        background: rgba(255,255,255,.12);
        border-radius: 999px;
        padding: 1px 9px;
        font-size: .85em
    }

    .tab .dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: var(--c,var(--gold));
        box-shadow: 0 0 12px var(--c,var(--gold))
    }

    .tab.on {
        background: var(--c,var(--gold));
        color: var(--ink);
        border-color: transparent
    }

        .tab.on .dot {
            background: var(--ink);
            box-shadow: none
        }

        .tab.on em {
            background: rgba(0,0,0,.15)
        }

    .tab:active {
        transform: scale(.95)
    }

/* ---------- groups and tiles ---------- */
.groups {
    scroll-margin-top: 150px
}

.grp {
    margin: 26px 0 40px;
    scroll-margin-top: 150px
}

    .grp header {
        display: flex;
        align-items: baseline;
        gap: 18px;
        flex-wrap: wrap;
        border-left: 6px solid var(--c);
        padding-left: 16px;
        margin-bottom: 18px
    }

    .grp h2 {
        margin: 0;
        font: 800 calc(2.1rem*var(--fs))/1.1 Georgia,serif
    }

    .grp header p {
        margin: 0;
        color: var(--mute)
    }

.sub {
    margin: 22px 0 12px;
    font-size: .85rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--c);
    font-weight: 800
}

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(min(100%,410px),1fr));
    gap: 18px;
    perspective: 900px
}

.tile {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    gap: 16px;
    align-items: center;
    text-align: left;
    padding: 16px 18px 16px 16px;
    border-radius: var(--r);
    border: 1px solid rgba(255,255,255,.1);
    background: linear-gradient(150deg,rgba(255,255,255,.09),rgba(255,255,255,.025));
    box-shadow: 0 12px 30px rgba(0,0,0,.3);
    transform: rotateX(var(--rx,0)) rotateY(var(--ry,0));
    transform-style: preserve-3d;
    transition: transform .2s,box-shadow .2s,border-color .2s;
    animation: tilein .6s cubic-bezier(.2,1.2,.4,1) backwards;
    overflow: hidden
}

.tiles .tile:nth-child(2) {
    animation-delay: .05s
}

.tiles .tile:nth-child(3) {
    animation-delay: .1s
}

.tiles .tile:nth-child(4) {
    animation-delay: .15s
}

.tiles .tile:nth-child(5) {
    animation-delay: .2s
}

.tiles .tile:nth-child(n+6) {
    animation-delay: .25s
}

@keyframes tilein {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.96)
    }
}

.tile::after {
    content: "";
    position: absolute;
    inset: auto -20% -60% -20%;
    height: 80%;
    background: radial-gradient(closest-side,var(--c),transparent);
    opacity: .18;
    transition: opacity .3s
}

.tile:hover, .tile:focus-visible {
    border-color: var(--c);
    box-shadow: 0 18px 40px rgba(0,0,0,.45),0 0 0 1px var(--c),0 0 40px -10px var(--c)
}

    .tile:hover::after {
        opacity: .35
    }

.tile:active {
    transform: scale(.97)
}

.plate {
    position: relative;
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 26%;
    background: radial-gradient(circle at 30% 25%,color-mix(in srgb,var(--c) 75%,#fff),var(--c) 45%,color-mix(in srgb,var(--c) 45%,#06281e));
    box-shadow: inset 0 -6px 0 rgba(0,0,0,.18),inset 0 4px 0 rgba(255,255,255,.25),0 10px 24px -6px var(--c);
    overflow: hidden
}

    .plate .emw {
        width: 84%;
        height: 84%;
        display: block
    }

    .plate .shine {
        position: absolute;
        inset: -40%;
        background: linear-gradient(115deg,transparent 40%,rgba(255,255,255,.55) 50%,transparent 60%);
        transform: translateX(-80%);
        animation: sheen 5.5s ease-in-out infinite
    }

.tile:nth-child(2n) .shine {
    animation-delay: 1.4s
}

.tile:nth-child(3n) .shine {
    animation-delay: 2.7s
}

@keyframes sheen {
    0%,70% {
        transform: translateX(-80%)
    }

    100% {
        transform: translateX(80%)
    }
}

.tile:hover .plate, .tile:focus-visible .plate {
    animation: wobble .6s
}

@keyframes wobble {
    30% {
        transform: rotate(-8deg) scale(1.08)
    }

    60% {
        transform: rotate(6deg) scale(1.05)
    }
}

.tt b {
    display: block;
    font-size: calc(1.15rem*var(--fs));
    line-height: 1.25
}

.tt small {
    display: block;
    color: var(--mute);
    font-size: calc(.95rem*var(--fs));
    margin-top: 3px
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px
}

    .badges em {
        font-style: normal;
        font-size: .74rem;
        font-weight: 800;
        letter-spacing: .04em;
        padding: 3px 9px;
        border-radius: 999px;
        background: color-mix(in srgb,var(--c) 22%,transparent);
        color: color-mix(in srgb,var(--c) 60%,#fff);
        border: 1px solid color-mix(in srgb,var(--c) 45%,transparent)
    }

.go {
    font-size: 1.6rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.08);
    transition: transform .2s,background .2s
}

.tile:hover .go {
    background: var(--c);
    color: var(--ink);
    transform: translateX(4px)
}

.spark {
    position: fixed;
    z-index: 200;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    margin: -5px 0 0 -5px;
    animation: spark .7s ease-out forwards
}

@keyframes spark {
    to {
        transform: translate(var(--dx),var(--dy)) scale(.2);
        opacity: 0
    }
}

.foot {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    color: var(--mute);
    font-size: .85rem
}

    .foot p {
        margin: 4px 0
    }

.fail {
    padding: 40px;
    text-align: center;
    color: var(--mute);
    font-size: 1.2rem
}

/* ---------- the card of one item ---------- */
.sheet {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2,14,10,.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fade .2s
}

body.kbopen .sheet {
    place-items: start center;
    padding-top: 20px
}

@keyframes fade {
    from {
        opacity: 0
    }
}

.card {
    position: relative;
    width: min(860px,100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    border-radius: 28px;
    background: linear-gradient(160deg,#0d4a39,#062c21);
    border: 1px solid color-mix(in srgb,var(--c) 50%,transparent);
    box-shadow: 0 40px 90px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.06),0 0 80px -30px var(--c);
    animation: pop .35s cubic-bezier(.2,1.4,.4,1)
}

body.kbopen .card {
    max-height: calc(100vh - 380px)
}

@keyframes pop {
    from {
        transform: scale(.9) translateY(20px);
        opacity: 0
    }
}

.x {
    position: absolute;
    right: 16px;
    top: 14px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.08);
    font-size: 2rem;
    line-height: 1
}

.chead {
    display: flex;
    gap: 22px;
    align-items: center;
    padding: 30px 80px 18px 30px;
    background: linear-gradient(90deg,color-mix(in srgb,var(--c) 22%,transparent),transparent)
}

.plate.big {
    width: 140px;
    height: 140px;
    flex: none
}

.chead h2 {
    margin: .15em 0 .2em;
    font: 800 calc(2.2rem*var(--fs))/1.1 Georgia,serif
}

.chead .kick {
    color: var(--c)
}

.cbody {
    padding: 8px 30px 30px
}

.long {
    font-size: calc(1.15rem*var(--fs));
    color: var(--txt);
    max-width: 62ch
}

.acts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px
}

.btn {
    border: 0;
    border-radius: 14px;
    padding: 16px 24px;
    font-weight: 800;
    font-size: calc(1.08rem*var(--fs));
    background: var(--c);
    color: var(--ink);
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.18);
    transition: transform .12s
}

    .btn.ghost {
        background: rgba(255,255,255,.08);
        color: var(--txt);
        border: 1px solid var(--line);
        box-shadow: none
    }

    .btn:active {
        transform: scale(.96)
    }

    .btn:disabled {
        opacity: .6
    }

.qrbox {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    gap: 28px;
    align-items: center
}

    .qrbox img {
        width: 280px;
        height: 280px;
        border-radius: 18px;
        background: #fff;
        padding: 12px;
        box-shadow: 0 0 0 6px var(--c)
    }

    .qrbox h3, .mail h3, .done h3 {
        margin: 0 0 8px;
        font: 800 calc(1.5rem*var(--fs))/1.2 Georgia,serif
    }

.url {
    font-family: ui-monospace,Consolas,monospace;
    color: var(--gold);
    word-break: break-all
}

.mail label {
    display: block;
    font-weight: 700;
    margin: 14px 0 6px
}

    .mail label small {
        color: var(--mute);
        font-weight: 400
    }

.mail input[type=email], .mail input[type=text] {
    width: 100%;
    font: inherit;
    font-size: calc(1.3rem*var(--fs));
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,.2);
    background: rgba(0,0,0,.25);
    color: #fff
}

.mail input:focus {
    border-color: var(--c);
    outline: none;
    box-shadow: 0 0 0 4px color-mix(in srgb,var(--c) 30%,transparent)
}

.mail .chk {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-weight: 400;
    cursor: pointer
}

.chk input {
    width: 28px;
    height: 28px;
    accent-color: var(--c);
    flex: none;
    margin: 0
}

.note {
    color: var(--mute);
    font-size: .92rem;
    margin: 12px 0 0
}

.err {
    color: #fca5a5;
    font-weight: 700;
    min-height: 1.2em;
    margin: 10px 0 0
}

.done {
    text-align: center;
    padding: 20px 0
}

    .done .acts {
        justify-content: center
    }

.tick {
    width: 110px;
    height: 110px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 3.6rem;
    font-weight: 900;
    background: #34D399;
    color: var(--ink);
    animation: pop .5s cubic-bezier(.2,1.6,.4,1);
    box-shadow: 0 0 0 12px rgba(52,211,153,.2),0 0 60px rgba(52,211,153,.5)
}

/* ---------- on-screen keyboard ---------- */
.kb {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 12px max(12px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));
    background: #031510;
    border-top: 2px solid var(--gold);
    display: grid;
    gap: 8px;
    justify-items: center;
    animation: up .2s
}

@keyframes up {
    from {
        transform: translateY(100%)
    }
}

.kb div {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center
}

.kb button {
    min-width: 64px;
    height: 62px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.15);
    background: #0e3a2d;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 0 12px
}

    .kb button:active {
        background: var(--gold);
        color: var(--ink)
    }

.kb .w {
    font-size: 1.05rem
}

.kb .xl {
    min-width: 420px
}

.kb .m {
    background: #1b5443
}

    .kb .m.on {
        background: var(--gold);
        color: var(--ink)
    }

.kb .ok {
    background: #34D399;
    color: var(--ink);
    min-width: 120px
}

/* ---------- the page viewer ---------- */
.view {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    background: #fff
}

.vbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--txt);
    border-bottom: 3px solid var(--gold);
    flex-wrap: wrap
}

.home {
    border: 0;
    border-radius: 14px;
    background: var(--gold);
    color: var(--ink);
    font-weight: 900;
    font-size: 1.15rem;
    padding: 12px 22px
}

    .home span {
        font-size: 1.3em
    }

.vico {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--c);
    flex: none
}

    .vico .emw {
        width: 44px;
        height: 44px;
        display: block
    }

.vt {
    flex: 1;
    min-width: 0
}

    .vt b {
        display: block;
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .vt small {
        color: var(--mute);
        font-size: .85rem
    }

.vb {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    padding: 12px 16px;
    font-weight: 700
}

    .vb.fin {
        background: #34D399;
        color: var(--ink);
        border: 0
    }

.timer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,.06)
}

    .timer small {
        color: var(--mute)
    }

    .timer b {
        font-variant-numeric: tabular-nums;
        font-size: 1.2rem
    }

    .timer button {
        border: 0;
        border-radius: 9px;
        background: rgba(255,255,255,.12);
        padding: 8px 10px;
        font-weight: 700
    }

    .timer.low {
        background: #7a1d1d;
        animation: blinkbg 1s steps(2) infinite
    }

@keyframes blinkbg {
    50% {
        background: #b91c1c
    }
}

#frame {
    flex: 1;
    width: 100%;
    border: 0;
    background: #fff
}

.blocked {
    position: absolute;
    inset: 90px 0 0;
    display: grid;
    place-content: center;
    text-align: center;
    background: var(--deep);
    padding: 30px
}

    .blocked .acts {
        justify-content: center
    }

/* ---------- the showcase ---------- */
.show {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(1000px 700px at 50% 30%,#0f5a43,#041c15 70%);
    cursor: pointer;
    overflow: hidden
}

.slide {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 10px;
    padding: 20px;
    animation: slidein .8s cubic-bezier(.2,1.2,.4,1);
    max-width: 1400px
}

@keyframes slidein {
    from {
        opacity: 0;
        transform: translateY(40px) scale(.95)
    }
}

.plate.huge {
    width: min(30vh,300px);
    height: min(30vh,300px);
    box-shadow: 0 30px 80px -20px var(--c),0 0 0 10px color-mix(in srgb,var(--c) 22%,transparent),inset 0 -10px 0 rgba(0,0,0,.18)
}

.slide .kick {
    color: var(--c);
    font-size: 1.1rem
}

.slide h2 {
    margin: 0;
    font: 800 clamp(2.6rem,6vw,6rem)/1.05 Georgia,serif;
    text-wrap: balance
}

.slide p {
    margin: 0;
    color: var(--mute);
    font-size: clamp(1.2rem,2vw,2rem)
}

.sqr {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 20px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 14px 26px 14px 14px;
    text-align: left
}

    .sqr img {
        width: min(18vh,190px);
        height: min(18vh,190px);
        background: #fff;
        border-radius: 14px;
        padding: 8px
    }

    .sqr b {
        display: block;
        font-size: 1.5rem
    }

    .sqr small {
        color: var(--mute);
        font-size: 1.05rem
    }

.sfoot {
    position: absolute;
    bottom: 32px;
    left: 0;
    right: 0;
    display: grid;
    justify-items: center;
    gap: 14px
}

.dots {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 80vw
}

    .dots i {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: rgba(255,255,255,.25);
        transition: all .3s
    }

        .dots i.on {
            background: var(--gold);
            width: 26px;
            border-radius: 5px
        }

.touch {
    font-size: 1.4rem;
    color: var(--gold);
    animation: breathe2 2s ease-in-out infinite
}

@keyframes breathe2 {
    50% {
        opacity: .45
    }
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    z-index: 300;
    max-width: min(760px,92vw);
    background: var(--paper);
    color: var(--ink);
    font-weight: 700;
    border-radius: 14px;
    padding: 16px 22px;
    box-shadow: 0 20px 50px rgba(0,0,0,.5);
    animation: pop .3s
}

/* ================= the emblems (SVG, animated) ================= */
.emw {
    display: block
}

.em {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible
}

    .em .g {
        fill: var(--gold)
    }

    .em .w {
        fill: #fffdf6
    }

    .em .c {
        fill: color-mix(in srgb,var(--c) 70%,#06281e)
    }

    .em .i {
        fill: var(--ink)
    }

    .em .sk {
        stroke: var(--ink);
        stroke-width: 3.5;
        stroke-linejoin: round
    }

    .em .sk2 {
        stroke: #fffdf6;
        stroke-width: 3
    }

    .em .nof {
        fill: none
    }

    .em .skw {
        stroke: #fffdf6;
        stroke-width: 5;
        stroke-linecap: round;
        fill: none
    }

    .em .skc {
        stroke: var(--ink);
        stroke-width: 3.5;
        stroke-linecap: round;
        fill: none;
        opacity: .55
    }

    .em .ski {
        stroke: var(--ink);
        stroke-width: 4;
        stroke-linecap: round;
        stroke-linejoin: round;
        fill: none
    }

    .em .skg {
        stroke: var(--gold);
        stroke-width: 5;
        stroke-linecap: round;
        fill: none
    }

    .em .thick {
        stroke-width: 7
    }

    .em .tx {
        font-family: Georgia,"Times New Roman",serif;
        font-weight: 800;
        text-anchor: middle
    }

    .em .heartc {
        fill: #F87171
    }

    .em .red {
        stroke: #fecaca !important
    }

    .em .ring {
        transform-box: view-box;
        fill: none;
        stroke: #fffdf6;
        stroke-width: 3;
        transform-origin: 60px 60px;
        animation: ripple 2.4s ease-out infinite;
        opacity: 0
    }

    .em .dash {
        transform-box: view-box;
        fill: none;
        stroke: #fffdf6;
        stroke-width: 3;
        stroke-dasharray: 6 8;
        opacity: .7;
        transform-origin: 60px 60px
    }

    .em .line {
        stroke: var(--ink);
        stroke-width: 3.5;
        stroke-linecap: round;
        fill: none
    }

    .em .axis {
        stroke: #fffdf6;
        stroke-width: 5;
        fill: none;
        stroke-linecap: round
    }

    .em .draw {
        fill: none;
        stroke: var(--gold);
        stroke-width: 7;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-dasharray: 200;
        stroke-dashoffset: 200;
        animation: draw 3.2s ease-in-out infinite
    }

    .em .arrow {
        fill: none;
        stroke: var(--ink);
        stroke-width: 6;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-dasharray: 160;
        stroke-dashoffset: 160;
        animation: draw 3.2s ease-in-out infinite
    }

    .em .writeline {
        fill: none;
        stroke: var(--ink);
        stroke-width: 4;
        stroke-linecap: round;
        stroke-dasharray: 150;
        stroke-dashoffset: 150;
        animation: draw 3.6s ease-in-out infinite;
        opacity: .6
    }

    .em .pin {
        stroke: #fffdf6;
        stroke-width: 4;
        stroke-linecap: round
    }

    .em .teeth {
        fill: none;
        stroke: #fffdf6;
        stroke-width: 9;
        stroke-dasharray: 7 5.6
    }

    .em .teethg {
        fill: none;
        stroke: var(--gold);
        stroke-width: 7;
        stroke-dasharray: 5.6 4.4
    }

    .em .sheen {
        fill: rgba(255,255,255,.35);
        transform: skewX(-20deg) translateX(-60px);
        animation: sweep 3.5s ease-in-out infinite
    }

    .em * {
        transform-box: fill-box;
        transform-origin: center
    }

    .em .bob {
        animation: bob 2.6s ease-in-out infinite
    }

        .em .bob.fast {
            animation-duration: 1.2s
        }

    .em .tw {
        animation: tw 2.4s ease-in-out infinite
    }

    .em .flip {
        animation: flip 3s ease-in-out infinite
    }

    .em .pop {
        animation: popb 3.2s ease-in-out infinite
    }

    .em .flash {
        animation: flash 1.6s ease-in-out infinite
    }

    .em .grow {
        transform-origin: bottom;
        animation: grow 3s ease-in-out infinite
    }

    .em .pulse {
        animation: pulse 2s ease-in-out infinite
    }

    .em .rise {
        animation: rise 2.4s ease-in infinite;
        opacity: 0
    }

    .em .drop {
        animation: dropin 3.6s cubic-bezier(.3,1.5,.5,1) infinite
    }

    .em .orbit {
        transform-box: view-box;
        transform-origin: 60px 60px;
        animation: turnem 5s linear infinite
    }

    .em .spin {
        animation: turnem 6s linear infinite
    }

        .em .spin.slow {
            animation-duration: 14s
        }

    .em .spinr {
        animation: turnem 4.3s linear infinite reverse
    }

    .em .dash.spin {
        transform-box: view-box;
        transform-origin: 60px 60px
    }

    .em .wig {
        animation: wig 2.2s ease-in-out infinite
    }

    .em .blink {
        animation: blink 1s steps(2) infinite
    }

    .em .scan {
        transform-box: view-box;
        animation: scan 2.6s ease-in-out infinite
    }

    .em .squash {
        animation: squash 3s ease-in-out infinite
    }

    .em .flame {
        transform-origin: top;
        animation: flame .25s ease-in-out infinite alternate
    }

    .em .coinflip {
        animation: coin 3.2s ease-in-out infinite
    }

    .em .coindrop {
        animation: coindrop 2.6s cubic-bezier(.5,0,.6,1.4) infinite
    }

    .em .swing {
        transform-origin: top;
        animation: swing 2s ease-in-out infinite
    }

    .em .beat {
        animation: beat 1.3s ease-in-out infinite
    }

@keyframes bob {
    50% {
        transform: translateY(-5px)
    }
}

@keyframes tw {
    0%,100% {
        transform: scale(.4) rotate(0);
        opacity: .3
    }

    50% {
        transform: scale(1.15) rotate(45deg);
        opacity: 1
    }
}

@keyframes flip {
    0%,60%,100% {
        transform: rotateY(0)
    }

    75% {
        transform: rotateY(180deg)
    }
}

@keyframes popb {
    0%,100% {
        transform: scale(1)
    }

    10% {
        transform: scale(1.1)
    }

    20% {
        transform: scale(.96)
    }

    30% {
        transform: scale(1)
    }
}

@keyframes flash {
    50% {
        opacity: .35
    }
}

@keyframes grow {
    0% {
        transform: scaleY(.15)
    }

    35%,80% {
        transform: scaleY(1)
    }

    100% {
        transform: scaleY(.15)
    }
}

@keyframes pulse {
    50% {
        transform: scale(1.08)
    }
}

@keyframes rise {
    0% {
        transform: translateY(0);
        opacity: 0
    }

    20% {
        opacity: 1
    }

    100% {
        transform: translateY(-60px);
        opacity: 0
    }
}

@keyframes dropin {
    0% {
        transform: translateY(-70px);
        opacity: 0
    }

    25%,85% {
        transform: translateY(0);
        opacity: 1
    }

    100% {
        transform: translateY(0);
        opacity: 0
    }
}

@keyframes turnem {
    to {
        transform: rotate(360deg)
    }
}

@keyframes wig {
    0%,100% {
        transform: rotate(0)
    }

    25% {
        transform: rotate(-10deg)
    }

    75% {
        transform: rotate(10deg)
    }
}

@keyframes blink {
    50% {
        opacity: 0
    }
}

@keyframes scan {
    0%,100% {
        transform: translateY(-26px)
    }

    50% {
        transform: translateY(26px)
    }
}

@keyframes squash {
    50% {
        transform: scaleX(.15)
    }
}

@keyframes flame {
    to {
        transform: scaleY(1.35)
    }
}

@keyframes coin {
    0%,50%,100% {
        transform: scaleX(1)
    }

    25% {
        transform: scaleX(.08)
    }
}

@keyframes coindrop {
    0% {
        transform: translateY(-30px);
        opacity: 0
    }

    30% {
        opacity: 1
    }

    60%,100% {
        transform: translateY(0)
    }
}

@keyframes swing {
    50% {
        transform: rotate(18deg)
    }
}

@keyframes beat {
    0%,100% {
        transform: scale(1)
    }

    15% {
        transform: scale(1.14)
    }

    30% {
        transform: scale(.98)
    }

    45% {
        transform: scale(1.1)
    }
}

@keyframes ripple {
    0% {
        transform: scale(.6);
        opacity: .8
    }

    100% {
        transform: scale(1.4);
        opacity: 0
    }
}

@keyframes draw {
    0% {
        stroke-dashoffset: 200
    }

    45%,80% {
        stroke-dashoffset: 0
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0
    }
}

@keyframes sweep {
    0%,60% {
        transform: skewX(-20deg) translateX(-60px)
    }

    100% {
        transform: skewX(-20deg) translateX(160px)
    }
}

/* ---------- smaller screens and reduced motion ---------- */
@media (max-width:1100px) {
    .hero {
        grid-template-columns: minmax(0,1fr)
    }

        .hero > .orbit {
            max-width: 380px
        }
}

@media (max-width:640px) {
    .mast {
        padding: 10px max(16px,env(safe-area-inset-right,0px)) 10px max(16px,env(safe-area-inset-left,0px))
    }

    .mark svg {
        width: 42px;
        height: 42px
    }

    .clock {
        display: none
    }

    main {
        padding: 0 max(16px,env(safe-area-inset-right,0px)) 30px max(16px,env(safe-area-inset-left,0px))
    }

    .tabs {
        top: 64px
    }

    .tab {
        padding: 10px 14px
    }

    .plate {
        width: 76px;
        height: 76px
    }

    .go {
        display: none
    }

    .tile {
        grid-template-columns: auto minmax(0,1fr)
    }

    .chead {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 70px 12px 22px
    }

    .plate.big {
        width: 100px;
        height: 100px
    }

    .cbody {
        padding: 6px 22px 24px
    }

    .qrbox {
        grid-template-columns: minmax(0,1fr);
        justify-items: center;
        text-align: center
    }

        .qrbox img {
            width: 220px;
            height: 220px
        }

        .qrbox .acts {
            justify-content: center
        }

    .big {
        padding: 14px 18px;
        font-size: 1rem
    }

    .vbar {
        gap: 8px
    }

    .timer small {
        display: none
    }
}

@media (prefers-reduced-motion:reduce) {
    *, *::before, *::after {
        animation-duration: .001s !important;
        animation-iteration-count: 1 !important;
        transition: none !important
    }

    .em .draw, .em .arrow, .em .writeline {
        stroke-dashoffset: 0
    }

    .em .rise, .em .ring {
        opacity: 1
    }
}
