/* STAADION — kolmanda vooru kujundus: spordivõistlus × kolkaplika (kartulid, linnud, külad, tähtsad otsused).
   kehtib index.html-is (<body class="staadion">) mõlemas voorus; kolmanda vooru lisad (NB-silt) body.voor3 all.
   suur kiri, suured nupud, tugev kontrast: mängitav nii lapsele kui vanaemale.
   värvid tulevad sinimustvalge.css-ist; teine väärtus sulgudes on varuks, kui seda pole laetud (nt kohapeal netita). */

body.staadion {
    font-family: var(--kolkamono, monospace);
    font-size: 1.25rem;
    line-height: 1.5;
    max-width: 52rem;
    margin: 0 auto;
    padding: 0 1rem 3rem;
    background: #fff;
    color: #000;
}

/* --- TABLOO: must tulemustabel, oranžid tuled --- */
body.staadion #voor {
    margin: 1rem 0 0;
    padding: 1rem;
    background: #000;
    color: var(--oranz, #ff9700);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: clamp(2rem, 8vw, 4rem);
    text-shadow: 0 0 10px var(--oranz, #ff9700);
    border: 6px solid var(--sinine, #0800ff);
    border-bottom: none;
}
body.staadion #voor::after {
    content: "tähtis otsus · kõks_otsus-001";
    display: block;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: none;
    text-shadow: none;
    color: var(--tibukollane, #fff3a6);
}

/* --- KÜLA: sinine taevas, pruunid majad oranžide akendega, all kartulipõld --- */
body.staadion #pealkiri {
    margin: 0;
    padding: 1rem 1rem 70px;
    color: #fff;
    text-align: center;
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    border: 6px solid var(--sinine, #0800ff);
    border-top: none;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='56'%3E%3Cpath d='M0 48V30l14-12 14 12v18zM40 48V24l20-16 20 16v24zM96 48V32l12-10 12 10v16zM128 48V28l16-12 16 12v20z' fill='%23231a0f'/%3E%3Crect x='10' y='34' width='6' height='6' fill='%23ff9700'/%3E%3Crect x='54' y='30' width='8' height='8' fill='%23ff9700'/%3E%3Crect x='105' y='36' width='6' height='6' fill='%23fff3a6'/%3E%3Crect x='141' y='32' width='6' height='6' fill='%23ff9700'/%3E%3Crect y='48' width='160' height='8' fill='%23231a0f'/%3E%3Cellipse cx='24' cy='52' rx='5' ry='3' fill='%23fff3a6'/%3E%3Cellipse cx='88' cy='52' rx='4' ry='2.5' fill='%23fff3a6'/%3E%3Cellipse cx='132' cy='52' rx='5' ry='3' fill='%23fff3a6'/%3E%3C/svg%3E") bottom / auto 56px repeat-x,
        var(--sinine, #0800ff);
}

/* --- NB: kollane silt --- */
body.voor3 #nb {
    display: inline-block;
    margin: 1.2rem 0;
    padding: 0.4rem 1rem;
    background: var(--tibukollane, #fff3a6);
    border: 3px solid #000;
    font-size: 1.3rem;
}

/* --- VÕISTLEJAD: iga variant oma rajal --- */
body.staadion #arvud { display: none; }   /* ∨-rida asendub kaartidega */
body.staadion #arvValikud {
    display: grid;
    grid-template-columns: 1fr;            /* rajad üksteise all, nagu staadionil */
    gap: 1.4rem;
    margin: 2rem 0;
}
.voistleja {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.2rem 1rem 1rem;
    background: #fff;
    border: 4px solid #000;
    box-shadow: 6px 6px 0 var(--sinine, #0800ff);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
/* raadionupp on peidus, aga klaviatuur ja ekraanilugeja leiavad ta üles */
.voistleja input { position: absolute; opacity: 0; }
.voistleja:focus-within { outline: 4px dashed var(--oranz, #ff9700); outline-offset: 5px; }
.voistleja:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--sinine, #0800ff); }
/* valitud: kollane, oranž vari, hüppab, pääsuke lendab kaardile */
.voistleja:has(input:checked) {
    background: var(--tibukollane, #fff3a6);
    border-color: var(--oranz, #ff9700);
    box-shadow: 6px 6px 0 var(--oranz, #ff9700);
    animation: hyppa 0.4s;
}
.rada {
    align-self: flex-start;
    padding: 0.1rem 0.6rem;
    background: #000;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}
.suurarv { font-size: clamp(1.3rem, 7vw, 3rem); font-weight: 700; white-space: nowrap; }   /* arv ei murdu pooleks */
.voistleja small { font-size: 1rem; }
.lind {
    position: absolute;
    top: -34px;
    right: 10px;
    width: 72px;
    opacity: 0;
    transform: translate(80px, -50px) rotate(-25deg);
    transition: opacity 0.5s, transform 0.5s;
}
.voistleja:has(input:checked) .lind { opacity: 1; transform: none; }
@keyframes hyppa { 40% { transform: translateY(-16px); } }

/* --- VASTAMINE: suured kastid, suur oranž nupp --- */
body.staadion #nimiArv,
body.staadion #miksArv {
    box-sizing: border-box;
    width: 100%;
    max-width: 32rem;
    padding: 0.6rem;
    font: inherit;
    border: 3px solid #000;
}
body.staadion #valinArv {
    min-height: 64px;
    padding: 0.8rem 2.4rem;
    font: inherit;
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--oranz, #ff9700);
    color: #000;
    border: 4px solid #000;
    box-shadow: 5px 5px 0 #000;
    cursor: pointer;
}
body.staadion #valinArv:active { transform: translate(5px, 5px); box-shadow: none; }

/* --- RAHATARKUS: tulemused nagu börs --- */
/* börsirida: must, rohelised kursid jooksevad üle ekraani */
.borss {
    margin: 1.5rem 0 0;
    padding: 0.5rem 0;
    overflow: hidden;
    white-space: nowrap;
    background: #000;
    color: var(--roheline, #2faa47);
    font-family: var(--kolkamono, monospace);
    font-weight: 700;
    border: 3px solid #000;
}
.borss span { display: inline-block; padding-left: 100%; animation: joosk 20s linear infinite; }
@keyframes joosk { to { transform: translateX(-100%); } }

/* poodium: 1. koht keskel ja kõrgeim; iga hääl üks münt virnas */
.poodium { display: flex; align-items: flex-end; justify-content: center; gap: 0.4rem; margin: 0 0 2rem; padding-top: 1rem; }
.aste {
    flex: 1;
    min-width: 0;
    max-width: 12rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 0.6rem 0.3rem;
    text-align: center;
    font-size: 1rem;
    overflow-wrap: anywhere;
    background: var(--sinine, #0800ff);
    color: #fff;
    border: 4px solid #000;
}
.koht1 { order: 2; min-height: 16rem; }
.koht2 { order: 1; min-height: 12.5rem; }
.koht3 { order: 3; min-height: 10rem; }
.koht4 { order: 4; min-height: 8rem; background: var(--hall, #808080); }
.medal { font-size: 2.5rem; }
/* osakaal nagu aktsiakurss */
.osakaal { font-size: 1.4rem; font-weight: 700; color: var(--tibukollane, #fff3a6); }
/* mündivirn: mündid külje pealt, üksteise peal */
.mundid { display: flex; flex-direction: column-reverse; align-items: center; margin-bottom: 0.5rem; }
.mundid i {
    width: 40px;
    height: 12px;
    margin-top: -4px;
    border-radius: 50%;
    background: linear-gradient(var(--tibukollane, #fff3a6), var(--oranz, #ff9700));
    border: 2px solid var(--pruun, #231a0f);
}
.mundid i:nth-child(even) { transform: translateX(3px); }

/* --- PINK: eelmistes voorudes väljalangenud --- */
body.staadion #valjas {
    margin-top: 2.5rem;
    padding: 1rem;
    background: var(--helehall, #f3f4f7);
    border-top: 6px dashed var(--hall, #808080);
    color: #333;
}
body.staadion .pink { opacity: 0.75; }
body.staadion #valjas:empty { display: none; }   /* teises voorus pinki pole */

/* kes ei taha liikumist, saab vaikse lehe */
@media (prefers-reduced-motion: reduce) {
    body.staadion * { animation: none !important; transition: none !important; }
    .borss span { padding-left: 1rem; white-space: normal; }
}
