/* Српски: on top of ../mathgame/style.css */

/* Fredoka has no Cyrillic: Nunito fills in */
html, body { font-family: "Fredoka", "Baloo 2", "Nunito", "Arial Rounded MT Bold", sans-serif; }

#pismo { position: fixed; right: 64px; bottom: 12px; z-index: 30; width: auto; min-width: 54px; padding: 0 10px; font-size: 16px; font-weight: 700; }
#games { max-width: calc(100% - 140px); }

.menu-card .row .btn { font-size: 17px; padding: 12px 8px; }
.btn.ref { background: #ff8a3d; box-shadow: 0 6px 0 #d4621a; }
.btn.ref:hover { box-shadow: 0 8px 0 #d4621a; }
.btn.ref:active { box-shadow: 0 1px 0 #d4621a; }
.title-sym { font-size: 40px; color: #ff8a3d; }

/* ---------- case chips ---------- */

.chips.cases { grid-template-columns: repeat(4, 1fr); gap: 8px 6px; }
.chips.cases .chip { height: auto; padding: 6px 2px 4px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.chips.cases .chip b { font-size: 22px; color: var(--c); }
.chips.cases .chip small { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chips.cases .chip.on { background: var(--c); box-shadow: 0 4px 0 rgba(45, 38, 84, .3); }
.chips.cases .chip.on b { color: #fff; }

/* ---------- Подсетник ---------- */

#podsetnik { z-index: 40; }
.ref-card { width: min(720px, 100%); padding: 0; display: flex; flex-direction: column; overflow: hidden; text-align: left; }
.ref-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px 22px; }
.ref-head h2 { margin: 0; font-size: 24px; }
.ref-body { overflow-y: auto; padding: 0 16px 18px; user-select: text; }
.ref-body p { margin: 6px 0; }
.ref-intro { font-size: 17px; }
.ref-tip, .ref-star { background: #fff3c4; color: #6b4a00; border-radius: 14px; padding: 8px 12px; font-weight: 600; }
.ref-body mark { background: #ffd23f; color: var(--ink); border-radius: 6px; padding: 0 4px; }
.ref-case {
    margin-top: 14px;
    background: #fff;
    border-radius: 20px;
    padding: 12px 16px;
    border-left: 8px solid var(--c);
    box-shadow: 0 4px 0 rgba(45, 38, 84, .1);
}
.ref-case header { display: flex; align-items: center; gap: 12px; }
.ref-letter { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--c); color: #fff; font-size: 28px; box-shadow: 0 3px 0 rgba(45, 38, 84, .25); }
.ref-case header span { display: flex; flex-direction: column; }
.ref-case header span b { font-size: 21px; letter-spacing: .5px; }
.ref-case header small { color: var(--ink-soft); font-weight: 600; }
.ref-q { font-size: 20px; font-weight: 700; color: var(--c); }
.ref-q small { color: var(--ink-soft); font-size: 15px; }
.ref-forms { color: var(--ink-soft); font-weight: 600; }
.ref-case h4 { margin: 10px 0 2px; font-size: 15px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; }
.ref-case ul { margin: 0; padding-left: 20px; }
.ref-case li { margin: 2px 0; }
.ref-star { margin-top: 10px !important; }

@media (max-width: 520px) {
    .ref-head h2 { font-size: 20px; }
    .ref-body { font-size: 15px; }
    .menu-card .row .btn { font-size: 15px; }
}

/* ---------- /srpski hub ---------- */
#hub-tools { position: fixed; right: 64px; bottom: 12px; z-index: 30; display: flex; gap: 8px; }
#hub-tools #pismo { position: static; }
#hub-tools .pill { height: 44px; }
