@font-face {
    font-family: 'gorog';
    src: url('EBGaramond-Regular.woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'gorog';
    src: url('EBGaramond-Italic.woff2');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'gorog';
    src: url('EBGaramond-SemiBold.woff2');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'gorog';
    src: url('EBGaramond-SemiBoldItalic.woff2');
    font-weight: bold;
    font-style: italic;

}

@font-face {
    font-family: 'heber';
    src: url('KeterYG-Medium.woff2');
    font-weight: normal;
    font-style: normal;
    size-adjust: 120%;
}

@font-face {
    font-family: 'heber';
    src: url('KeterYG-Bold.woff2');
    font-weight: bold;
    font-style: normal;
    size-adjust: 120%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

*:lang(hu), *:lang(grc) {
    font-family: 'gorog';
}

*:lang(hbo) {
    font-family: 'heber';
}

body {
    font-family: ui-serif;
    font-size: 20px;
    background-color: #dfd8c1;
    font-feature-settings: "swsh" 1;
    font-variant-numeric: oldstyle-nums proportional-nums;
    font-variant-ligatures: common-ligatures discretionary-ligatures historical-ligatures contextual;
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

div {
    scroll-behavior: smooth;
    scrollbar-color: rgba(128, 32, 32, 0.5) rgba(222, 222, 222, 0.75);
}

a {
    color: #1818bf;
    text-decoration: none;
    background: linear-gradient(#1818bf, #1818bf) center bottom no-repeat;
    background-size: 0 1px;
    transition: all 0.15s ease-out;
}

a:hover {
    background-size: 100% 1px;
}

.racs, .feher {
    max-width: 1280px;
    min-width: min(100svw, 1280px);
    margin: auto auto;
    background-color: #fffcf2;
    box-shadow: 0 0 8px #404040;
    min-height: min(100svh, 800px);
}

.racs {
    display: grid;
    max-height: 800px;
    grid-template: 48px 1fr / 2fr 1fr;
}

.fej {
    grid-area: 1/1/1/3;
    padding: 8px 24px;
    display: flex;
    align-items: baseline;
}

.cim {
    font-size: 30px;
    font-weight: bold;
    flex-grow: 1;
    line-height: 39px;
}

.focim {
    font-size: 30px;
    font-weight: bold;
    padding: 8px 24px;
    display: flex;
}

.focim > * {
    flex: 1 0 0;
}

.focim > *:nth-child(2) {
    text-align: center;
}

.zanza {
    padding: 0 24px;
}

.zanza > div {
    padding: 4px 0;
    text-indent: 16px;
}

.testcim {
    font-size: 24px;
    font-weight: bold;
    padding: 8px 0;
    text-indent: 0 !important;
}

.alcim {
    font-weight: bold;
}

.kethasab {
    display: flex;
}

.testament {
    padding: 0 24px 16px 24px;
    width: 33.3333%;
}

.testament[dir="rtl"] {
    width: 66.6667%;
}

.oszov {
    display: flex;
}

.hasab {
    width: 50%;
}

.magyar {
    font-style: italic;
}

.testament .magyar {
    font-size: 16px;
}

.valaszto {
    font-size: 10px;
    position: relative;
    bottom: 3px;
    font-family: 'gorog';
}

.fejval {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.gomb {
    color: #802020;
    font-family: 'gorog', 'heber', ui-serif;
    font-feature-settings: "swsh" 1;
    font-variant-numeric: oldstyle-nums proportional-nums;
    font-variant-ligatures: common-ligatures discretionary-ligatures historical-ligatures contextual;
    font-size: 20px;
    font-style: italic;
    background-color: #fffcf2;
    padding: 2px;
    border: 1px #802020 solid;
    border-radius: 8px;
    position: relative;
    width: 162px;
    text-align: center;
    cursor: pointer;
}

#valaszto {
    display: none;
    width: 162px;
    background-color: #fffcf2;
    border: 1px #802020 solid;
    border-top: none;
    flex-wrap: wrap;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

#valaszto button {
    color: #000000;
    font-family: 'gorog', 'heber', ui-serif;
    font-feature-settings: "swsh" 1;
    font-variant-numeric: oldstyle-nums proportional-nums;
    font-variant-ligatures: common-ligatures discretionary-ligatures historical-ligatures contextual;
    font-size: 20px;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
}

#valaszto button:hover {
    background-color: #dfd8c1;
}

.fejval.lenyit {
    box-shadow: 0 0 8px #404040;
    border-radius: 8px;
}

.fejval.lenyit #valaszto {
    display: flex;
}

.fejval.lenyit .gomb {
    background-color: rgba(128, 32, 32, 0.25);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.kilep {
    font-weight: bold;
    flex-grow: 1;
    text-align: end;
}

.menu {
    font-weight: bold;
    text-align: center;
}

.bibliak {
    grid-area: 2/1/2/1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#szovegk {
    flex: 2;
    overflow: hidden;
}

#szoveg > .gorgodoboz {
    padding-inline-start: 24px;
    padding-inline-end: 232px;
}

#szoveg {
    font-size: 24px;
}

.szotark {
    grid-area: 2/2/2/2;
    overflow: hidden;
}

.szotar > .gorgodoboz {
    padding-inline-end: 224px;
}

.fejszam {
    float: inline-end;
    margin-inline-end: -32px;
    min-width: 32px;
    font-size: 30px;
    text-align: start;
    color: #802020;
    font-style: normal;
}

.vszam {
    float: inline-start;
    margin-inline-start: -16px;
    font-size: 10px;
    text-align: end;
    min-width: 12px;
    max-width: 16px;
    color: #802020;
}

.fejszam, .vszam {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none !important;
}

.szakcim {
    display: block;
    margin: 4px 0;
    text-align: center;
    font-style: italic;
}

.var1 {
    color: #208020;
}

.var2 {
    color: #208020;
    font-style: italic;
}

.kotib {
    color: #808080;
}

.bekezdes {
    color: #808080;
    font-size: 12px;
    vertical-align: 6px;
}

.kore {
    color: #bf0000;
}

.szo.szin {
    background-color: #ff9f9f;
}

.sor.szin {
    background-color: #ffe79f;
}

.sor.szin:has(.sor) {
    background-color: #e8ff9f;
}

.sor.szin:has(.sor .sor) {
    background-color: #bfffcf;
}

.sor.szin:has(.sor .sor .sor) {
    background-color: #bfefff;
}

.vers.szin {
    background-color: #dfdfff;
}

.sor.szin:has(.sor .sor .sor .sor) {
    background-color: transparent;
}

#magyark {
    flex: 1;
    width: 100%;
    overflow: hidden;
}

#magyar > .gorgodoboz {
    padding-inline-start: 24px;
    padding-inline-end: 232px;
}

.fogo {
    color: rgba(128, 32, 32, 0.5);
    font-size: 20px;
    line-height: 20px;
    cursor: grab;
    width: 15px;
    text-align: center;
    font-weight: bold;
    font-family: 'gorog';
}

.gorgodoboz {
    padding-bottom: 12px;
}

#szoveg *, #magyar *, .szotar * {
    pointer-events: auto;
}

#szotari {
    font-weight: bold;
    font-size: 24px;
}

#rag, #jelentes, #elofordul, #szakaszok {
    margin-top: 8px;
}

#jelentes {
    color: #802020;
}

#elofordul {
    font-size: 16px;
}

.pelda {
    font-weight: bold;
}

#szakaszok, #magyar {
    font-size: 16px;
}

#szakaszok > div:first-child {
    margin-top: 0;
}

#szakaszok > div {
    margin-top: 8px;
}

.rov, #rag {
    font-style: italic;
}

#szoveg, #magyar, .szotar {
    height: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch;
    overflow-y: scroll;
    overflow-x: hidden;
    background: linear-gradient(
            #fffcf2 30%,
            rgba(255, 252, 242, 0)
    ) no-repeat local center top / 100% 160px, linear-gradient(
            rgba(255, 252, 242, 0),
            #fffcf2 70%
    ) no-repeat local center bottom / 100% 160px, linear-gradient(
            rgba(128, 32, 32, 0.5),
            rgba(128, 32, 32, 0)
    ) no-repeat scroll center top / 100% 4px, linear-gradient(
            rgba(128, 32, 32, 0),
            rgba(128, 32, 32, 0.5)
    ) no-repeat scroll center bottom / 100% 4px;
}

@media only screen and (orientation: portrait) {
    .racs {
        grid-template: 48px 2fr 1fr / min(100svw, 768px);
        max-height: 1280px;
        max-width: 768px;
        min-width: min(100svw, 768px);
        min-height: min(100svh, 1280px);
    }

    .feher {
        max-width: 768px;
        min-width: min(100svw, 768px);
    }

    .szotark {
        grid-area: 3/1/3/1;
    }

    .oszov {
        flex-wrap: wrap;
    }

    .hasab {
        width: 100%;
    }

    .testament {
        width: 50% !important;
    }

    .szotar > .gorgodoboz {
        padding-inline-start: 24px;
        padding-inline-end: 224px;
    }
}

@media only screen and (max-width: 576px) and (orientation: portrait) {
    #szoveg > .gorgodoboz, #magyar > .gorgodoboz {
        padding-inline-start: 16px;
        padding-inline-end: 224px;
    }

    .racs {
        grid-template: 80px 2fr 1fr / min(100svw, 768px);
    }

    .fej {
        flex-wrap: wrap;
        padding: 0 8px;
    }

    .cim {
        height: 48px;
    }

    .focim {
        flex-direction: column;
        padding: 0;
        text-align: center;
    }

    .focim > :first-child {
        order: 1;
    }

    .kethasab {
        flex-wrap: wrap-reverse;
    }

    .testament {
        width: 100% !important;
        padding: 0 8px 16px 8px;
    }

    .cim {
        min-width: 100%;
        flex-shrink: 0;
    }

    .fejszam {
        margin-inline-end: -24px;
        margin-top: 0;
        min-width: 24px;
        font-size: 20px;
        font-weight: bold;
    }

    .szotar > .gorgodoboz {
        padding-inline-start: 8px;
        padding-inline-end: 208px;
    }
}

@media only screen and (max-height: 576px) and (orientation: landscape) {
    #szoveg > .gorgodoboz, #magyar > .gorgodoboz {
        padding-inline-start: 16px;
        padding-inline-end: 224px;
    }

    .racs {
        grid-template: 40px 1fr / 2fr 1fr;
    }

    .fej {
        padding: 0 8px;
    }

    .fejszam {
        margin-inline-end: -24px;
        margin-top: 0;
        min-width: 24px;
        font-size: 20px;
        font-weight: bold;
    }

    .szotar > .gorgodoboz {
        padding-inline-end: 208px;
    }

    .oszov {
        flex-wrap: wrap;
    }

    .hasab {
        width: 100%;
    }

    .testament {
        padding: 0 0 16px 0;
        width: 50% !important;
    }

    .kethasab {
        padding: 0 8px;
    }

    #valaszto {
        width: auto;
        min-width: 162px;
        max-width: 322px;
    }

    .fejval.lenyit .gomb {
        width: 100%;
    }
}
