:root { --rem-base: 16px; }         
html  { font-size: var(--rem-base); }

/*@media (min-width: 1024px) {
  :root { --rem-base: 16.80px; }  
}*/


/* ✅ SCOPE TYLKO DLA HOME-CONTENT */
.home-legacy-scope,
.home-legacy-scope h1,
.home-legacy-scope h2,
.home-legacy-scope p {
    font-family: 'Lato', sans-serif;
    text-align: center;
    color: #235391;
}

.home-legacy-scope h1,
.home-legacy-scope h2 {
    font-weight: bold;
}

.home-legacy-scope h1 {
    font-size: 1.5rem; /* 28px */
}

.home-legacy-scope h2 {
    margin-bottom: 10px;
    margin-top: 30px;
    font-size: 1.375rem; /* 22px */
}

.home-legacy-scope p {
    font-size: 1.125rem; /* 18px */
}
/* Nagłówek i stopka */
.site-header, .site-footer {
    background-color: #F9FAFE;
}

.site-footer {
    margin: 5px 0;
    padding: 5px 0;
    font-size: 0.75rem; /* 12px */
}

/* Elementy gry */
.word-box, .translation-input {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    margin: 10px auto;
    width: calc(100% - 40px);
    max-width: 600px;
    min-height: 80px;
    color: white;
    border-radius: 40px;
    font-size: 1.75rem; /* 28px */
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}
.sentence {
    background-color:  white;
    border: 3px solid #BFDEFF;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 10px auto;
    width: calc(100% - 40px);
    max-width: 600px;
    min-height: 80px;
    color: #235391;
    border-radius: 40px;
    font-size: 1.375rem; /* 22px */   
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}
.dsentence {
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 10px auto;
    width: calc(100% - 40px);
    max-width: 600px;
    min-height: 80px;
    color: #235391;
    border-radius: 40px;
    font-size: 1.375rem; /* 22px */  
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}
.word-box {
    background-color: #3dbd3b;
}

.translation-input {
    background-color: #235391;
    border: 3px solid #BFDEFF;
    text-align: center;
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.word-text {
    color: white;
    font-family: 'Lato', sans-serif;
}

/* Przyciski */
.start-game-btn, .btn-primary, .btn-floating {
    padding: 10px;
    margin: 10px auto;
    color: white;
    border: none;
    text-align: center;
    border-radius: 40px;
    cursor: pointer;
    display: block;
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.start-game-btn, .btn-primary {
    background-color: #3dbd3b;
    padding: 15px 30px;
    font-size: 1.75rem; /* 28px */
    margin: 15px auto;
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.btn-success {
    padding: 10px;
    margin: 10px auto;
    color: white;
    border: none;
    text-align: center;
    border-radius: 40px;
    cursor: pointer;
    display: inline-block;
    flex: 1;
    max-width: 200px;
    min-height: 50px;
    background-color: #235391;
    font-size: 1.125rem; /* 18px */    
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.game-action-buttons {
    display: flex;
    gap: 10px; 
    justify-content: center; 
    align-items: center;
    flex-wrap: nowrap;             
}

.game-action-buttons button {
    flex: 1;
    min-width: 133px;
    max-width: 200px;
}

#hintButton, #checkButton, #nextButton, #listeningHintButton, #listeningCheckButton, #listeningNextButton, #scrambleHintButton, #scrambleCheckButton, #scrambleNextButton {
    margin: 0;
}
/* Efekty hover */
.btn-success:hover {
    background-color: #3dbd3b;
}

.btn-primary:hover {
    background-color: #235391;
    color: white;
}

/* Animacje i efekty */
@keyframes floatingGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-floating {
    background-size: 200% 200%;
    background-image: linear-gradient(to right, #3dbd3b 0%, #235391 50%, #3dbd3b 100%);
    animation: floatingGradient 8s ease infinite;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s forwards;
}

/* Stany pola wprowadzania */
.translation-input::placeholder {
    color: #FFFFFF;       
}

.translation-input.active::placeholder {
    color: #FFFFFF;      
}

.translation-input:focus {
    background-color: #FFFFFF;
    border: 3px solid #BFDEFF;
    color: #235391;       
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.translation-input.correct {
    border: 4px solid #3dbd3b;
    transition: border-color 0.5s ease-in-out;    
}

.translation-input.incorrect {
    border: 4px solid rgb(245, 61, 61);
    transition: border-color 0.5s ease-in-out;    
}

/* Dodatkowe elementy */
.hint-text {
    color: #235391;
    font-size: 0.875rem; /* 14px */
    margin-top: 10px;
}

.image-text-block {
    background-color: #F9FAFE;
    padding: 3px 15px 15px;
    margin-bottom: 30px;
}

.image-text-block img {
    height: 150px;
    width: auto;
}

/* Stopka */
.copyright {
    font-size: 0.875rem; /* 14px */
}

.footer-link, .footer-email {
    color: #235391;
    text-decoration: none;
    margin: 0 5px;
    font-size: 0.75rem; /* 12px */
}

.footer-link:hover, .footer-email:hover {
    text-decoration: underline;
}

/* Wynik i dźwięk */
#scoreDisplay {
    font-size: 1.125rem; /* 18px */
    font-weight: bold;
    margin-top: 100px;
}

.soundbtn {
    /* brak font-size – to grafika/ikonka */
    height: 30px;
    width: 30px;
    vertical-align: middle;
    margin-right: 4px;
}
/* Linki */
.home-legacy-scope a {
    color: #235391;
    font-family: 'Lato', sans-serif;
    font-weight: bold;
    text-decoration: none;
}

.home-legacy-scope a:hover {
    text-decoration: underline;
}

.home-legacy-scope a:active {
    color: #3dbd3b;
}

.scroll-link {
    font-size: 1.1rem;
    border-bottom: 2px dotted #3dbd3b;
    border-radius: 0px;
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 8px;
    display: inline-block;
}

/* Obrazy */
.image-col {
    text-align: center;
}

.image-col img {
    display: inline-block;
    margin-top: 20px;
    
    border-radius: 15px;
}

.image-text-block .image-col::after{
  content:"";
  display:block;
  width:88px;
  height:1px;
  border-radius:9999px;
  margin:10px auto 0;
  background: linear-gradient(to right,
  rgba(35,83,145,0) 0%,
  rgba(35,83,145,0.25) 50%,
  rgba(35,83,145,0) 100%
);
}

/* =========================
   CATEGORY NAV: kreska NAD ikoną (zawsze równo)
   ========================= */

/* wyłącz kreskę POD tylko w nawigacji */
#category-nav .image-col::after{
  content: none !important;
  display: none !important;
}

/* dodaj kreskę NAD tylko w nawigacji */
#category-nav .image-col::before{
  content:"";
  display:block;
  width:88px;
  height:1px;
  border-radius:9999px;
  margin:12px auto 10px;              /* odstępy: nad/pod kreską */
  background: linear-gradient(to right,
  rgba(35,83,145,0) 0%,
  rgba(35,83,145,0.25) 50%,
  rgba(35,83,145,0) 100%
);
}

/* opcjonalnie: żeby nie było za dużo luzu nad ikoną w nawigacji */
#category-nav .image-col img{
  margin-top: 6px !important;         /* było 20px globalnie */
}

table {
    width: 90%;
    margin: 20px auto;
    border-collapse: collapse;
    border: 1px solid #235391;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    table-layout: fixed;
}

th, td {
    border: 1px solid #3dbd3b;
    padding: 10px;
    text-align: center;
    width: 50%;
    vertical-align: middle;
}

.nested {
    padding-left: 15px;
}

.wymowa-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    margin-right: 3px;
}

.wymowa {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
}

td .wymowa-btn, td img {
    vertical-align: middle;
}

.example-header {
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}
/* Style dla przykładowego zdania */
#exampleSentence {
    background-color: white;
    color: #235391;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Wycentrowanie w pionie */
    align-items: center;
    
    border-radius: 40px;
    text-align: center;
    padding: 10px;
    margin: 10px auto;
    width: calc(100% - 40px);
    max-width: 600px;
    position: relative;
}


.example-sentence-pl {
    color: #235391;
    font-style: normal;
    margin: 0;
    padding-bottom: 5px;
    text-align: center;
}


.example-sentence-en {
    color: #235391;
    font-weight: bold;
    margin: 0;
    display: flex;
    align-items: center;    
    justify-content: center; 
    gap: 2px;               
    text-align: center;      
}

#playAudioButton.playing,
#playSlowAudioButton.playing {
    background-color: #235391 !important; 
    outline: none; 
}

#playAudioButton,
#playSlowAudioButton {
    background-color: #3dbd3b; 
    border: none; 
    outline: none; 
    transition: background-color 0.3s ease; 
}


#playAudioButton:focus,
#playSlowAudioButton:focus,
#playAudioButton:active,
#playSlowAudioButton:active {
    background-color: #235391; 
    color: white; 
    outline: none; 
}

.sound-icon {
    height: 18px;
    width: auto;
    vertical-align: middle;
}

.phrase-pl {
    font-size: 90%; /* było % – zostawiamy */
    color: #235391;
    margin: 0;
    padding-bottom: 5px;
    text-align: center;
}

.phrase-en {
    font-size: 90%; /* było % – zostawiamy */
    color: #235391;
    margin: 0;
    padding-bottom: 5px;
    font-weight: bold; /* Wytłuszczenie */
    text-align: center;
}

table tbody td {
    background-color: white;
}

td.translation-sentences {
    background-color: #F5FEFE;
}

.divider {
    grid-column: 1 / -1;
    border-top: 1px dashed rgba(35, 83, 145, 0.22);
    margin: 2px 0;
}

.flex-divider {
    align-self: stretch;
    border-top: 1px dashed rgba(35, 83, 145, 0.22);
    margin: 2px 0;
}

.game-complete-message {
    grid-column: 1 / -1;
    margin: 5px 0;
    text-align: center;
    font-weight: bold;
    font-size: 1.125rem; /* 18px */   
}
.content-box {
    background-color: #F5FEFE; 
    border: 1px solid #BFDEFF; 
    padding: 10px; 
    width: 90%;
    margin: 20px auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 
    text-align: center;
    vertical-align: middle;
    font-size: 90%;
}

.content-box p,
.content-box h1,
.content-box h2,
.content-box h3,
.content-box h4,
.content-box ul,
.content-box li {
    font-size: 100%; 
}

.content-box h1,
.content-box h2,
.content-box h3,
.content-box h4 {
    font-weight: bold; 
    margin-top: 15px;
}
.content-box ul {
    list-style-position: inside; 
    padding-left: 0; 
    margin-left: 0; 
}

.content-box li {
    padding-left: 0; 
    margin-left: 0; 
}

.word-match-container {
    display: grid;
    grid-template-rows: auto 5px 1fr;
    grid-template-columns: 1fr 1fr;
    justify-content: center;
    align-items: start;
    margin: 20px auto;
    background-color: #F5FEFE; 
    border: 1px solid #BFDEFF; 
    padding: 10px; 
    width: 90%;
    margin: 10px auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 
    text-align: center;
    vertical-align: middle;
    font-size: 90%;    
}

.word-match-container .dsentence  {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
}

.word-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
    width: 100%;
}

.word-button {
    width: 90%;
    max-width: 300px;
    margin: 8px auto;
    padding: 15px;
    font-size: 1.25rem; /* 20px */
    font-weight: bold;
    border-radius: 40px;
    border: 2px solid #BFDEFF; 
    background-color: white;
    color: #235391;
    cursor: pointer;
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .word-button:hover:not(.wrong-match):not(.selected) {
        background-color: #3dbd3b;
        color: white;
        border-color: #3dbd3b;
    }
}

/* Ukryj hinty skrótów na urządzeniach dotykowych */
@media (hover: none), (pointer: coarse) {
  .memo-kbd-hint { display: none !important; }
}

.word-button.selected {
    background-color: #235391;
    color: white;
}

.word-button:focus {
    outline: none;
    border: 2px solid #BFDEFF;
}

.wrong-match {
    border: 2px solid red !important;
    background-color: white !important;
    color: #235391 !important;
    transition: background-color 0.3s ease, border 0.3s ease;
}

.word-button.matched {
    background-color: #3dbd3b;
    pointer-events: none;
    color: white;
    border-color: #3dbd3b;
}

#translationGameButton {
    font-weight: bold;
}

#matchGameButton {
    font-weight: bold;
}

#listeningGameButton {
    font-weight: bold;
}

#scrambleGameButton {
    font-weight: bold;
}

#exampleSentenceTranslation {    
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    padding: 15px;
    margin: 10px auto;
    width: calc(100% - 30px);
    max-width: 600px;
    min-height: 80px;
    color: #235391;
    border-radius: 40px;
    background-color: white;
    border: 3px solid #BFDEFF;
    font-size: 1.375rem; /* 22px */   
}

.game-selection {     
    justify-content: center; 
    align-items: stretch;
    margin-bottom: 25px;
}

.game-selection button {       
    gap: 10px;     
    min-width: 210px;
}

#listeningGameContainer .word-box {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#listeningGameContainer .word-box button {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#listeningWordDisplay {
    text-align: center;
}

#playSlowAudioButtonm img {
    width: 45px;
    height: 45px;
}

#translationGameButton.active, 
#matchGameButton.active, 
#listeningGameButton.active,
#scrambleGameButton.active {
    background-color: #3dbd3b;
    color: white;
    border-color: #3dbd3b;
}

#scrambleGameContainer {
    width: calc(100% - 40px);
    max-width: 800px;
    margin: 20px auto;
    box-sizing: border-box;
}

/* Ustawienie box-sizing dla wszystkich elementów wewnątrz kontenera */
#scrambleGameContainer,
#scrambleGameContainer * {
    box-sizing: border-box;
}

/* Kontener główny gry rozsypanki */
.sentence-scramble-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white; 
    border: 1px solid #BFDEFF; 
    border-radius: 40px;
    padding: 20px; 
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 
    text-align: center;
}

/* Styl dla polskiego zdania */
#scramblePolishSentence {
    font-size: 1.25rem; /* 20px */
    font-weight: bold; 
    text-align: center;
    margin: 10px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
}

/* Styl dla instrukcji i poprawnego zdania */
.instruction-text,
.scramble-correct-sentence {
    font-size: 1.25rem; /* 20px */
    font-weight: bold; 
    color: #235391; 
    text-align: center; 
    margin: 5px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
}

/* Kontener odpowiedzi */
.scramble-answer-container {
    display: flex;    
    flex-wrap: wrap;
    justify-content: center; 
    align-items: center;     
    padding: 5px;
    margin: 5px 0;
    background-color: white;
    min-height: 80px;
    color: #235391;
    border-radius: 40px;
    text-align: center;
}

/* Kontener słów do wyboru */
.scramble-words-container {
    display: flex;
    flex-wrap: wrap; 
    align-items: flex-start; 
    justify-content: center;
    padding: 5px;
    margin: 5px 0;
    gap: 10px;   
    width: 100%;
}

/* Styl dla słów */
.scramble-word,
.scramble-answer-word {
    display: inline-block;
    font-size: 1rem; /* 16px */
    font-weight: bold;
    background-color: white;
    color: #235391;
    border: 1px solid #BFDEFF;
    border-radius: 20px; 
    padding: 6px 10px; 
    margin: 2px;
    cursor: pointer;
    user-select: none;
    text-align: center;        
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2); 
    transition: box-shadow 0.3s ease;
    
}

/* Efekty podczas przeciągania */
.scramble-word.dragging,
.scramble-answer-word.dragging {
    opacity: 0.5;
}

.scramble-word.over,
.scramble-answer-word.over {
    border: 2px dashed #3dbd3b;
}

/* Styl dla przycisków akcji */
.game-action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 20px 0 10px 0;
}

.game-action-buttons button {
    flex: 1 1 auto;
    max-width: 200px;
    padding: 10px;
    margin: 0;
    color: white;
    border: none;
    text-align: center;
    border-radius: 40px;
    cursor: pointer;
    background-color: #235391;
    font-size: 1.125rem; /* 18px */   
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

/* Efekty hover dla przycisków */
.game-action-buttons button:hover {
    background-color: #3dbd3b;
}
/* Styl dla poprawnej i niepoprawnej odpowiedzi */
.correct-answer {  
    border: 2px solid #3dbd3b;
    border-radius: 40px;
    padding: 12px;
    transition: border 0.5s ease;
}

.incorrect-answer {
    border: 2px solid red;
    border-radius: 40px;
    padding: 12px;
    transition: border 0.5s ease;
}

/* ========== MOBILE QUERIES ========== */
@media (max-width: 768px){
    p { font-size: 1rem; }

    /* stopka ma zostać mała jak na desktop */
    footer p,
    footer a{
        font-size: 0.75rem !important; /* 12px */
    }

    h1 {
        font-size: 1.5rem; /* 24px */
    }

    h2 {
        font-size: 1.25rem; /* 20px */
    }

    h3 {
        font-size: 1.125rem; /* 18px */
        
    }
    h4 {
        font-size: 1.125rem; /* 18px */
    }
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-link, .footer-email {
        margin: 5px 0;
    }
    .image-text-block {
        display: grid;
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .first-block, .second-block {
        display: grid;
        grid-template-areas:
            "title"
            "paragraph1"
            "image1"            
            "image2"           
            "image3";
    }

    .second-block {
        grid-template-areas:
            "title"
            "image4"
            "paragraph3"
            "image5"
            "paragraph4"
            "image6";
    }

    .first-title { grid-area: title; }
    .first-paragraph { grid-area: paragraph1; }
    .first-image { grid-area: image1; }    
    .second-image { grid-area: image2; }    
    .third-image { grid-area: image3; }

    .second-title { grid-area: title; }
    .fourth-image { grid-area: image4; }
    .third-paragraph { grid-area: paragraph3; }
    .fifth-image { grid-area: image5; }
    .fourth-paragraph { grid-area: paragraph4; }
    .sixth-image { grid-area: image6; }


    .images-row .col {
        width: 100%;
        display: block;
    }  
    .image-text-block img {
        height: 130px;
        width: auto; /* Zachowuje proporcje obrazu */
    }
    .logo {
        height: 150px;
        width: auto; /* Zachowuje proporcje obrazu */
    }
    .start-game-btn, .btn-primary {
        padding: 12px 24px;
        font-size: 1.375rem; /* 22px */
        border-radius: 40px;
        cursor: pointer;
        display: block;
        margin: 12px auto;
    }
    .word-box {
        padding: 8px;
        margin: 8px auto;
        width: calc(100% - 30px);   
        min-height: 70px;    
        font-size: 1.375rem; /* 22px */   
    }
    .translation-input {
        padding: 8px;
        margin: 8px auto;
        width: calc(100% - 30px);
        min-height: 70px;
        font-size: 1.375rem; /* 22px */
        box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2); /* Mniejszy cień */
        transition: box-shadow 0.3s ease;
    }
    .sentence {
        padding: 12px;
        margin: 8px auto;
        width: calc(100% - 30px);
        min-height: 70px;
        font-size: 1rem; /* 16px */
    }
    .dsentence {
        padding: 12px;
        margin: 8px auto;
        width: calc(100% - 30px);
        min-height: 70px;
        font-size: 1rem; /* 16px */
        border: none;
        background-color: transparent;
        box-shadow: none;
    }
    .btn-success  {
        padding: 8px;
        margin: 8px auto;
        width: calc(100% - 10px);
        max-width: 200px;        
        font-size: 1rem; /* 16px */
    }
    #scoreDisplay{
        font-size: 1rem; /* 16px */
        font-weight: bold;
    }
    .soundbtn{
        height: 26px;
        width: auto; /* Zachowuje proporcje obrazu */
        vertical-align: middle;
    }
    .wymowa-btn{
        height: 1em;
        width: auto; /* Zachowuje proporcje obrazu */
    }
    .wymowa-btn:focus{
        height: 2em;
        width: auto; /* Zachowuje proporcje obrazu */
    }
    .sound-icon {
        height: 20px;
    }
    .word-button {
       
        padding: 15px;
        font-size: 1.125rem; /* 18px */
        margin: 4px 0;
    }
    #exampleSentenceTranslation {
        padding: 8px;
        margin: 8px auto;
        width: calc(100% - 30px);
        min-height: 70px;
        font-size: 1.125rem; /* 18px */
        border: none;        
        border-radius: 40px;    
        background-color: transparent;
    }

    .game-selection button {       
        gap: 10px;     
        min-width: 155px;
    }
}


@media (max-width: 450px) {
    .btn-success {
        padding: 6px 8px; /* Zmniejszenie paddingu */
        margin: 6px 3px;  /* Zmniejszenie marginesów */
        font-size: 0.875rem;  /* 14px */
        width: calc(50% - 16px); /* Dostosowanie szerokości na 50% minus margines */
        display: inline-block; /* Ustawienie display na inline-block */
        box-sizing: border-box; /* Uwzględnienie paddingu i marginesów w szerokości */
    }
    .word-button {
       
        padding: 15px;
        font-size: 1.125rem; /* 18px */
        margin: 4px 0;
    }

    .game-action-buttons button {
        font-size: 0.875rem; /* 14px */
        padding: 6px; 
    }

    #scramblePolishSentence,
    .instruction-text,
    .scramble-correct-sentence {
        font-size: 1rem; /* 16px */
    }

    .scramble-word,
    .scramble-answer-word {
        font-size: 0.875rem; /* 14px */
    }

}
@media (max-width: 390px) {
.image-text-block img {
    height: 110px;
    width: auto; /* Zachowuje proporcje obrazu */
}
h1 {
    font-size: 1.2rem; /* 20px */
}

h2 {
    font-size: 1.125rem; /* 18px */
}

h3 {
    font-size: 1rem; /* 16px */
}
h4 {
    font-size: 1rem; /* 16px */
}
p {
    font-size: 1rem; /* 16px */
}

.logo {
    height: 120px;
    width: auto; /* Zachowuje proporcje obrazu */
}
.start-game-btn, .btn-primary {
    padding: 10px 20px;
    font-size: 1.25rem; /* 20px */
    border-radius: 40px;
    cursor: pointer;
    display: block;
    margin: 10px auto;
}
.word-box {
    padding: 6px;
    margin: 6px auto;
    width: calc(100% - 20px);   
    min-height: 60px;    
    font-size: 1.25rem; /* 20px */   
}
.translation-input {
    padding: 6px;
    margin: 6px auto;
    width: calc(100% - 20px);
    min-height: 60px;
    font-size: 1.25rem; /* 20px */
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.2); /* Mniejszy cień */
    transition: box-shadow 0.3s ease;
}
.sentence {
    padding: 10px;
    margin: 6px auto;
    width: calc(100% - 20px);
    min-height: 60px;
    font-size: 0.875rem; /* 14px */
}
.dsentence {
    padding: 10px;
    margin: 6px auto;
    width: calc(100% - 20px);
    min-height: 60px;
    font-size: 0.875rem; /* 14px */
}
.btn-success {
    padding: 4px 6px; /* Zmniejszenie paddingu */
    margin: 5px 2px;  /* Zmniejszenie marginesów */
    font-size: 0.8125rem;  /* 13px */
    font-weight: lighter;
    width: calc(50% - 16px); /* Dostosowanie szerokości na 50% minus margines */
    display: inline-block; /* Ustawienie display na inline-block */
    box-sizing: border-box; /* Uwzględnienie paddingu i marginesów w szerokości */
}

#scoreDisplay{
    font-size: 0.875rem; /* 14px */
    font-weight: bold;
}
.soundbtn{
    height: 22px;
    width: auto; /* Zachowuje proporcje obrazu */
    vertical-align: middle;
}

.wymowa{
    height: 1em;
    width: auto; /* Zachowuje proporcje obrazu */
    vertical-align: middle;
}

.sound-icon {
    height: 16px;
    width: auto;
}

.phrase-pl {
    font-size: 100%; 
}

.phrase-en {
    font-size: 100%; 
}
table tbody tr {
    font-size: 90%; 
}
.word-button {       
    padding: 12px;
    font-size: 0.9375rem; /* 15px */
    margin: 4px 0;
}
#exampleSentenceTranslation {
    padding: 6px;
    margin: 6px auto;
    width: calc(100% - 20px);
    min-height: 60px;
    font-size: 1rem; /* 16px */
}

/* Wyłączenie hover dla urządzeń dotykowych */
/*@media (hover: none) and (pointer: coarse) {
    .word-button:hover {
        background-color: inherit;
        color: inherit;
        border-color: inherit;
    }
}*/

.game-selection button {       
    gap: 10px;     
    min-width: 133px;
}
}
/* =========================
   WORDLIST TABLES (scope only)
   ========================= */
/* --- WORDLIST SUBTITLES (H3) --- */
.memo-wordlist-scope h3{
  margin: 14px 0 8px !important;
  font-size: 15px !important;     /* mniejsze */
  font-weight: 800 !important;    /* pogrubione */
  line-height: 1.15 !important;
  color: #235391 !important;
}

@media (min-width: 640px){
  .memo-wordlist-scope h3{
    font-size: 16px !important;
  }
}
   
/* --- TABLE WRAPPER --- */
.memo-wordlist-scope table.sentence-table{
  width: 100% !important;
  margin: 10px 0 18px !important;

  border-collapse: separate !important;
  border-spacing: 0 !important;

  /* klucz do 50/50 (bez auto-rozpychania kolumn) */
  table-layout: fixed !important;

  border: 2px solid rgba(35,83,145,0.55) !important;
  border-radius: 18px !important;
  overflow: hidden !important;

  background: #fff !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12) !important;
}

/* --- FORCE 50/50 ALWAYS (dzielnik zawsze w połowie) --- */
.memo-wordlist-scope table.sentence-table thead th{
  width: 50% !important;
}
.memo-wordlist-scope table.sentence-table tbody tr > td{
  width: 50% !important;
}
/* wiersz colspan=2 nie walczy o szerokość */
.memo-wordlist-scope table.sentence-table tbody td.translation-sentences{
  width: 100% !important;
}

/* --- HEADER CELLS --- */
.memo-wordlist-scope table.sentence-table thead th{
  background: #F9FAFE !important;
  color: #235391 !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  padding: 10px 12px !important;

  border: 0 !important;
  border-bottom: 1px solid rgba(35,83,145,0.25) !important;

  text-align: center !important;
}

/* --- BODY CELLS (reset global th/td rules) --- */
.memo-wordlist-scope table.sentence-table tbody td{
  color: #235391 !important;
  font-size: 13px !important;
  padding: 10px 12px !important;

  border: 0 !important;
  border-top: 1px solid rgba(35,83,145,0.12) !important;

  vertical-align: middle !important;
  text-align: center !important;

  background: transparent !important; /* zebra ustawia tło */
}

/* pionowy podział między kolumnami */
.memo-wordlist-scope table.sentence-table tbody td + td{
  border-left: 1px solid rgba(35,83,145,0.12) !important;
}

/* --- ZEBRA "PARIAMI": (wiersz słówka + wiersz zdań) --- */
.memo-wordlist-scope table.sentence-table tbody tr:nth-child(4n+1) td,
.memo-wordlist-scope table.sentence-table tbody tr:nth-child(4n+2) td{
  background: #ffffff !important;
}
.memo-wordlist-scope table.sentence-table tbody tr:nth-child(4n+3) td,
.memo-wordlist-scope table.sentence-table tbody tr:nth-child(4n+4) td{
  background: #F9FAFE !important;
}

/* --- WIERSZE SŁÓWEK (większe PL/EN) --- */
/* u Ciebie układ jest: 1 = słówko, 2 = zdania, 3 = słówko, 4 = zdania... */
.memo-wordlist-scope table.sentence-table tbody tr:nth-child(odd) td{
  font-size: 14px !important;
  font-weight: 700 !important;
}
@media (min-width: 640px){
  .memo-wordlist-scope table.sentence-table tbody tr:nth-child(odd) td{
    font-size: 15px !important;
  }
}

/* --- WIERSZ ZE ZDANIAMI (colspan=2) --- */
.memo-wordlist-scope td.translation-sentences{
  padding: 12px 14px !important;
  text-align: center !important;
  vertical-align: top !important;

  /* jeśli gdzieś masz globalnie td.translation-sentences background */
  background: inherit !important;
}

/* PL zdanie – czytelne, ale spokojniejsze */
.memo-wordlist-scope td.translation-sentences .phrase-pl{
  font-size: 12.5px !important;
  line-height: 1.35 !important;
  margin: 6px 0 4px !important;
  font-weight: 600 !important;
  color: rgba(35,83,145,0.85) !important;
}

/* EN zdanie – mocno wyróżnione (szybciej widać gdzie kliknąć) */
.memo-wordlist-scope td.translation-sentences .phrase-en{
  font-size: 13px !important;
  line-height: 1.35 !important;
  margin: 4px 0 6px !important;

  font-weight: 900 !important;  /* mocniejszy bold */
  color: #235391 !important;
}

/* przycisk wymowy – niech nie rozpycha i trzyma linię */
.memo-wordlist-scope .wymowa-btn{
  margin-left: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
}
/* większy oddech: tabela -> kolejny podtytuł */
.memo-wordlist-scope table.sentence-table + h3{
  margin-top: 28px !important;   /* ustaw jak chcesz: 18–28px */
}
/* =========================
   WORDLIST: TABLES WITHOUT SENTENCES (words-only)
   ========================= */

/* wszystkie wiersze mają ten sam “większy” styl */
.memo-wordlist-scope table.sentence-table.words-only tbody td{
  font-size: 14px !important;
  font-weight: 700 !important;
}

@media (min-width: 640px){
  .memo-wordlist-scope table.sentence-table.words-only tbody td{
    font-size: 15px !important;
  }
}

/* zebra klasycznie: co drugi wiersz (bo nie ma już “par: słówko+zdania”) */
.memo-wordlist-scope table.sentence-table.words-only tbody tr:nth-child(odd) td{
  background: #ffffff !important;
}
.memo-wordlist-scope table.sentence-table.words-only tbody tr:nth-child(even) td{
  background: #F9FAFE !important;
}
/* =========================
   EXPLAIN BOX (np. "on the" vs "in the") — bez kapsułek
   spójne z wordlist/table UI
   ========================= */

.memo-explain-box{
  /* szerokość jak sąsiednie wrappery/tabele */
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;

  margin: 38px 0 28px !important;
  padding: 14px 14px 12px !important;

  border: 2px solid rgba(35,83,145,0.55) !important;
  border-radius: 18px !important;

  /* odwrócone względem “białego” – tło jak w Twoich akcentach */
  background: #F9FAFE !important;

  box-shadow: 0 1px 2px rgba(0,0,0,0.12) !important;

  /* bo rodzic często ma text-center */
  text-align: left !important;
  color: #235391 !important;
}

/* Nagłówek sekcji (H3) — spójny z tabelami */
.memo-explain-box h3{
  margin: 0 0 8px !important;
  text-align: center !important;
  color: #235391 !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  line-height: 1.15 !important;
}
@media (min-width: 640px){
  .memo-explain-box h3{ font-size: 16px !important; }
}

/* Akapit */
.memo-explain-box p{
  margin: 8px 0 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  font-weight: 600 !important;
  color: rgba(35,83,145,0.85) !important;
}

/* Podnagłówki (H4) — bez kapsułek, z lewym “akcentem” */
.memo-explain-box h4{
  margin: 14px 0 6px !important;

  /* wybijamy ewentualne stare “kapsuły” */
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  border-bottom: 1px solid rgba(35,83,145,0.22) !important;
  padding: 0 0 6px 0 !important;

  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: #235391 !important;

}

/* Listy */
.memo-explain-box ul{
  margin: 6px 0 10px 18px !important;
  padding: 0 !important;
}
.memo-explain-box li{
  margin: 6px 0 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: #235391 !important;
}
.memo-explain-box li strong{
  font-weight: 800 !important;
}

/* Separatory — spokojne, “tabelowe” (bez zielonej przerywanej) */
.memo-explain-box .divider{
  border-top: 1px solid rgba(35,83,145,0.22) !important;
  margin: 12px 0 !important;
}