.runovy-kod-page {

    --rk-gold: #e5bd66;
    --rk-purple: #b99ae9;
    --rk-green: #77c9a5;
}

.rk-subtitle {
    margin: .35rem 0 0;
    color: var(--rk-purple);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 800;
}

.rk-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 72px;
}

.rk-hero,
.rk-room-head {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
    gap: 32px;
    align-items: center;
    margin-bottom: 28px;
    padding: 34px;
    border: 1px solid rgba(229, 189, 102, .26);
    border-radius: 28px;
    background:
        radial-gradient(circle at 85% 20%, rgba(185, 154, 233, .15), transparent 19rem),
        radial-gradient(circle at 15% 85%, rgba(119, 201, 165, .1), transparent 22rem),
        rgba(255, 255, 255, .035);
}

.rk-hero h1,
.rk-room-head h1 {
    margin: .08em 0 .28em;
    font-size: clamp(2.25rem, 6vw, 4.8rem);
    line-height: .98;
}

.rk-lead,
.rk-room-head p {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

.rk-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.rk-facts span {
    padding: 8px 12px;
    border: 1px solid rgba(229, 189, 102, .24);
    border-radius: 999px;
    color: #ead39a;
    background: rgba(229, 189, 102, .07);
    font-size: .78rem;
    font-weight: 800;
}

.rk-hero-orbit {
    position: relative;
    min-height: 250px;
}

.rk-hero-orbit span {
    position: absolute;
    display: grid;
    width: 76px;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(229, 189, 102, .38);
    border-radius: 50%;
    color: var(--rk-gold);
    background: rgba(10, 15, 22, .72);
    box-shadow: 0 0 32px rgba(229, 189, 102, .11);
    font-family: Georgia, serif;
    font-size: 2.2rem;
}

.rk-hero-orbit span:nth-child(1) { left: 38%; top: 2%; }
.rk-hero-orbit span:nth-child(2) { right: 3%; top: 23%; }
.rk-hero-orbit span:nth-child(3) { right: 13%; bottom: 3%; }
.rk-hero-orbit span:nth-child(4) { left: 23%; bottom: 0; }
.rk-hero-orbit span:nth-child(5) { left: 0; top: 34%; }
.rk-hero-orbit span:nth-child(6) { left: 38%; top: 38%; color: var(--rk-purple); }

.rk-panel {
    margin-top: 22px;
    padding: 28px;
    border: 1px solid rgba(229, 189, 102, .22);
    border-radius: 24px;
    background: rgba(255, 255, 255, .035);
}

.rk-heading h2,
.rk-panel h2 {
    margin: .1em 0 .5em;
}

.rk-levels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.rk-level {
    display: grid;
    gap: 8px;
    min-height: 175px;
    padding: 20px;
    border: 1px solid rgba(229, 189, 102, .22);
    border-radius: 18px;
    color: inherit;
    text-align: left;
    background: rgba(255, 255, 255, .025);
    cursor: pointer;
}

.rk-level:hover,
.rk-level.is-selected {
    border-color: rgba(229, 189, 102, .72);
    background: rgba(229, 189, 102, .09);
    box-shadow: 0 0 0 2px rgba(229, 189, 102, .08);
}

.rk-level-runes {
    color: var(--rk-gold);
    font-family: Georgia, serif;
    font-size: 1.65rem;
    letter-spacing: .12em;
}

.rk-level strong { font-size: 1.12rem; }
.rk-level small { color: var(--muted); line-height: 1.5; }

.rk-rules {
    margin: 22px 0;
    padding: 20px;
    border-radius: 18px;
    background: rgba(0, 0, 0, .18);
}

.rk-rules > div {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
}

.rk-rules p { margin-bottom: 0; color: var(--muted); }

.rk-clue {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.rk-clue.is-gold b { color: var(--rk-gold); text-shadow: 0 0 12px rgba(229, 189, 102, .8); }
.rk-clue.is-echo b { color: var(--rk-purple); text-shadow: 0 0 12px rgba(185, 154, 233, .8); }

.rk-gamebar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
}

.rk-gamebar > div { display: grid; gap: 3px; }
.rk-gamebar span { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.rk-gamebar p { margin: 0; text-align: center; }

.rk-composer {
    padding: 24px;
    border: 1px solid rgba(185, 154, 233, .23);
    border-radius: 20px;
    background: radial-gradient(circle at top, rgba(185, 154, 233, .08), transparent 24rem);
}

.rk-slots,
.rk-symbols,
.rk-composer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.rk-slots { margin-bottom: 20px; }
.rk-symbols { margin-bottom: 20px; }

.rk-slot,
.rk-rune,
.rk-mini-rune {
    display: grid;
    place-items: center;
    border: 1px solid rgba(229, 189, 102, .28);
    border-radius: 14px;
    color: var(--rk-gold);
    background: rgba(7, 12, 18, .66);
    font-family: Georgia, serif;
}

.rk-slot {
    width: clamp(54px, 10vw, 78px);
    aspect-ratio: 1;
    color: rgba(255, 255, 255, .25);
    font-size: clamp(1.8rem, 5vw, 2.7rem);
}

.rk-slot.is-filled {
    color: var(--rk-gold);
    box-shadow: inset 0 0 22px rgba(229, 189, 102, .07);
}

.rk-rune {
    width: 58px;
    aspect-ratio: 1;
    font-size: 1.85rem;
    cursor: pointer;
}

.rk-rune:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: var(--rk-gold);
}

.rk-rune:disabled { opacity: .28; cursor: not-allowed; }

.rk-history {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.rk-history-empty {
    margin: 0;
    padding: 20px;
    color: var(--muted);
    text-align: center;
}

.rk-history-row {
    display: grid;
    grid-template-columns: minmax(110px, .55fr) minmax(220px, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 15px;
    background: rgba(255, 255, 255, .025);
}

.rk-history-runes,
.rk-history-clues {
    display: flex;
    gap: 7px;
}

.rk-mini-rune {
    width: 34px;
    aspect-ratio: 1;
    border-radius: 9px;
    font-size: 1.1rem;
}

.rk-history-clues .rk-clue {
    min-width: 48px;
    justify-content: center;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
}

.rk-result {
    margin-top: 24px;
    padding: 25px;
    border: 1px solid rgba(229, 189, 102, .34);
    border-radius: 20px;
    text-align: center;
    background: rgba(229, 189, 102, .06);
}

.rk-secret {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin: 18px 0;
}

.rk-secret .rk-mini-rune {
    width: 52px;
    font-size: 1.65rem;
}

.rk-online-create-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .7fr);
    gap: 28px;
    align-items: start;
}

.rk-online-create,
.rk-join-panel form {
    display: grid;
    gap: 14px;
}

.rk-online-create label,
.rk-join-panel label,
.rk-rematch-level {
    display: grid;
    gap: 7px;
}

.rk-online-create input,
.rk-online-create select,
.rk-join-panel input,
.rk-rematch-level select,
.rk-invite-box input,
.rk-email-invite input {
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(229, 189, 102, .26);
    border-radius: 11px;
    color: inherit;
    background: rgba(0, 0, 0, .24);
}

.rk-online-locked,
.rk-invite-box,
.rk-email-invite {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 16px;
    background: rgba(0, 0, 0, .16);
}

.rk-room-head { grid-template-columns: minmax(0, 1fr) auto; }
.rk-room-head h1 { font-size: clamp(2rem, 5vw, 3.7rem); }
.rk-room-head .btn { justify-self: end; }

.rk-invite-box > div,
.rk-email-invite > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    margin-top: 8px;
}

.rk-invite-box p,
.rk-email-invite p { margin-bottom: 0; color: var(--muted); font-size: .82rem; }

.rk-players {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.rk-player {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid rgba(229, 189, 102, .2);
    border-radius: 14px;
}

.rk-player.is-purple { border-color: rgba(185, 154, 233, .38); }
.rk-player span { color: var(--muted); font-size: .78rem; }

.rk-round-block {
    display: grid;
    gap: 8px;
}

.rk-round-block h3 {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .82rem;
    text-transform: uppercase;
}

.rk-form-error,
.rk-field-error { color: #ff9c9c; }

@media (max-width: 760px) {
    .rk-shell { width: min(100% - 20px, 1180px); padding-top: 18px; }
    .rk-hero,
    .rk-room-head,
    .rk-online-create-panel { grid-template-columns: 1fr; padding: 22px; }
    .rk-hero-orbit { min-height: 230px; }
    .rk-levels { grid-template-columns: 1fr; }
    .rk-level { min-height: 0; }
    .rk-gamebar { grid-template-columns: 1fr; text-align: center; }
    .rk-history-row { grid-template-columns: 1fr; }
    .rk-history-clues { justify-content: flex-start; }
    .rk-room-head .btn { justify-self: start; }
    .rk-players { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .rk-panel { padding: 18px; }
    .rk-composer { padding: 16px 10px; }
    .rk-slot { width: 50px; }
    .rk-rune { width: 49px; }
    .rk-invite-box > div,
    .rk-email-invite > div { grid-template-columns: 1fr; }
}
