/* ==================================================
   Paleta kolorów — tryb jasny i ciemny
   ================================================== */
:root {
  color-scheme: light;

  --prosody-text: #222222;
  --prosody-muted: #5f5f5f;
  --prosody-accent: #8b1a1a;
  --prosody-danger: #b91c1c;
  --prosody-arabic: #166534;
  --prosody-info-text: #1e3a8a;

  --prosody-inline-bg: rgba(255, 255, 255, 0.32);
  --prosody-note-bg: rgba(185, 28, 28, 0.06);
  --prosody-card-start: #fff8e6;
  --prosody-card-end: #ffffff;
  --prosody-panel-yellow: #fffbdc;
  --prosody-panel-blue: #cde9f2;

  --prosody-button-bg: #b7efb7;
  --prosody-button-hover: #ffc2b3;
  --prosody-button-active: #a7e7a7;
  --prosody-button-text: #075f07;

  --prosody-border-strong: #8b5a2b;
  --prosody-menu-bg: #a0522d;
  --prosody-shadow: rgba(80, 152, 160, 0.5);
  --prosody-panel-shadow: rgba(169, 98, 98, 0.55);
  --prosody-button-shadow: #999999;
  --prosody-button-shadow-active: #666666;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --prosody-text: #f2f4f7;
    --prosody-muted: #c2c7d0;
    --prosody-accent: #f3a6a6;
    --prosody-danger: #fca5a5;
    --prosody-arabic: #9ae6b4;
    --prosody-info-text: #bfdbfe;

    --prosody-inline-bg: rgba(255, 255, 255, 0.045);
    --prosody-note-bg: rgba(252, 165, 165, 0.08);
    --prosody-card-start: #23201a;
    --prosody-card-end: #191b20;
    --prosody-panel-yellow: #29261a;
    --prosody-panel-blue: #17242c;

    --prosody-button-bg: #285f3c;
    --prosody-button-hover: #6b3d43;
    --prosody-button-active: #34744b;
    --prosody-button-text: #effff4;

    --prosody-border-strong: #b89668;
    --prosody-menu-bg: #63351f;
    --prosody-shadow: rgba(0, 0, 0, 0.38);
    --prosody-panel-shadow: rgba(0, 0, 0, 0.42);
    --prosody-button-shadow: #111827;
    --prosody-button-shadow-active: #080b10;

    --metric: #fca5a5;
    --muted: #c2c7d0;
    --title: #fca5a5;
    --table-bg: #1c1f24;
    --border: rgba(255, 255, 255, 0.16);
  }
}

html[data-theme="dark"],
body.dark-mode {
  color-scheme: dark;

  --prosody-text: #f2f4f7;
  --prosody-muted: #c2c7d0;
  --prosody-accent: #f3a6a6;
  --prosody-danger: #fca5a5;
  --prosody-arabic: #9ae6b4;
  --prosody-info-text: #bfdbfe;

  --prosody-inline-bg: rgba(255, 255, 255, 0.045);
  --prosody-note-bg: rgba(252, 165, 165, 0.08);
  --prosody-card-start: #23201a;
  --prosody-card-end: #191b20;
  --prosody-panel-yellow: #29261a;
  --prosody-panel-blue: #17242c;

  --prosody-button-bg: #285f3c;
  --prosody-button-hover: #6b3d43;
  --prosody-button-active: #34744b;
  --prosody-button-text: #effff4;

  --prosody-border-strong: #b89668;
  --prosody-menu-bg: #63351f;
  --prosody-shadow: rgba(0, 0, 0, 0.38);
  --prosody-panel-shadow: rgba(0, 0, 0, 0.42);
  --prosody-button-shadow: #111827;
  --prosody-button-shadow-active: #080b10;

  --metric: #fca5a5;
  --muted: #c2c7d0;
  --title: #fca5a5;
  --table-bg: #1c1f24;
  --border: rgba(255, 255, 255, 0.16);
}

    p {
      /* margin: 0 0 16px; */
      font-size: 1.05rem;
    }
    strong {
      font-weight: 700;
    }
    em, .italic {
      font-style: italic;
    }
    .metric {
      color: var(--metric);
      font-family: "Cardo", serif;
      font-weight: 650;
      white-space: nowrap;
      letter-spacing: 0.02em;
    }
    .metric-block,
    .transliteration {
      margin: 16px 0 22px;
      padding: 14px 18px;
      border: 1px solid var(--border);
      border-radius: 14px;
      overflow-x: auto;
      background: var(--prosody-inline-bg);
      font-size: 1.02rem;
    }
    .transliteration {
      font-style: italic;
    }
    .metric-block {
      font-family: "Cardo", serif;
      color: var(--metric);
      letter-spacing: 0.03em;
    }
    .indent {
      display: inline-block;
      padding-left: 2.5rem;
    }
    .indent2 {
      padding-left: 4.5rem;
    }
    .arabic-table-wrap {
      margin: 16px auto 8px;
      overflow-x: auto;
    }
    table.arabic-table {
      direction: rtl;
      width: min(var(--table-width), 100%);
      margin: 0 auto;
      border-collapse: separate;
      border-spacing: 8px 8px;
      background: var(--table-bg);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 8px;
    }
    .arabic-table td {
      direction: rtl;
      text-align: right;
      vertical-align: top;
      padding: 8px 16px;
      font-family: "Noto Naskh Arabic", "Amiri", "Scheherazade New", serif;
      font-size: 1.27rem;
      line-height: 1.75;
      white-space: nowrap;
    }
    .footnote {
      width: min(var(--table-width), 100%);
      margin: 4px auto 22px;
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.4;
      text-align: right;
    }
    .note {
      margin-top: 28px;
      padding: 16px 18px;
      border-left: 4px solid var(--title);
      border-radius: 12px;
      background: var(--prosody-note-bg);
    }
.font-cardo {
  font-family: "Cardo", serif;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.2rem;
  color: var(--prosody-danger);
}
.cardo-red {
  font-family: 'Cardo', serif;
  font-size: 1.6rem;
  color: var(--prosody-danger);
  letter-spacing: 0.2rem;
}
.metr {
  font-family: 'Cardo', serif;
  font-size: 1.6rem;
  letter-spacing: 0.2rem;
}
.serif-talic {
    font-family: "Times New Roman", Times, serif; 
  }
    @media (max-width: 620px) {
      main {
        width: min(100% - 20px, 900px);
        padding: 24px 0 40px;
      }
      article {
        border-radius: 18px;
      }
      .arabic-table td {
        font-size: 1.12rem;
        padding: 6px 10px;
      }
      .indent {
        padding-left: 1.25rem;
      }
    }
    .center {
      text-align: center;
    }

    /* --------wiersze------------ */

	    .fiszka-con7 {
	    	display: inline-block;
	    	width: 530px;
	    	height: 740px;
	    	margin-bottom: 35px;
        margin-right: 20px;
	    	/* perspective: 1000px; */
	    }
.fiszka7 {
  position: relative;
  width: 100%;
  height: 100%;
  /* transition: transform 0.6s; */
}

.fiszka-con7.flip .fiszka7 {
  transform: rotateY(180deg);
/* transform-style: preserve-3d; */
}

    .fiszka-front1a,
    .fiszka-tyl1a {
      position: absolute;
      width: 100%;
      height: 100%;
      cursor: pointer;
      inset: 0;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      display: flex;
      border-radius: 15px;
      box-shadow: 0 7px 15px 0 rgba(80, 152, 160, 0.5);
      border: 2px solid;
      border-color: hsl(34, 85%, 25%);
    }

    .fiszka-front1a {
      position: absolute;
      width: 100%;
      height: 100%;
      cursor: pointer;
      display: flex;
      padding-right: 5px;
      padding-left: 5px;
      margin-top: 30px;
      text-align: right;
      justify-content: center;
      align-items: center;
      background-image: linear-gradient(to right, rgb(255, 248, 230), white);
      color: maroon;
      font-size: 1.1rem;
      line-height: 1.4rem;
      text-align: center;
      border-radius: 15px;
      box-shadow: 0 7px 15px 0 rgba(80, 152, 160, 0.5);
      border: 2px solid;
      border-color: hsl(34, 85%, 25%);
    }

    .fiszka-tyl1a {
      text-align: left;
      padding-top: 45px;
      padding-right: 15px;
      padding-left: 15px;
      background-color: #cde9f2;
      transform: rotateY(180deg);
      color: rgb(8, 48, 107);
      border-width: 2px;
      border-color: maroon;
    }
    .buttn {
      display: block;
      position: absolute;
      margin-left: 5px;
      margin-top: 35px;
      height: 20px;
      padding: 3px 7px 3px 7px;
      font-size: 0.8rem;
      line-height: 0.8rem;
      font-weight: bold;
      cursor: pointer;
      text-align: center;
      outline: none;
      color: var(--prosody-button-text);
      background-color: var(--prosody-button-bg);
      border: none;
      border-radius: 7px;
      box-shadow: 0 3px var(--prosody-button-shadow);
      z-index: 1000;
    }
    .drop {
      display: none;
      position: absolute;
      width: 300px;
      background-color: var(--prosody-panel-yellow);
     top: 4rem;
      left: 1rem;
      right: 1rem;
      direction: ltr;
      margin-bottom: 0;
      text-align: justify;
      color: var(--prosody-info-text);
      box-shadow: 0 8px 16px 0 var(--prosody-panel-shadow);
      padding: 15px;
      border: 2px solid;
      border-radius: 15px;
      border-color: var(--prosody-accent);
      z-index: 1;
    }
    .drpdown {
      display: none;
      position: absolute;
      width: 400px;
      right: 10%;
      left: 5%;
      top: -120px;
      direction: ltr;
      margin-bottom: 0;
      text-align: justify;
      background-color: var(--prosody-panel-blue);
      color: var(--prosody-info-text);
      padding: 10px;
      border: 2px solid;
      border-radius: 15px;
      border-color: var(--prosody-accent);
      box-shadow: 0 8px 16px 0 var(--prosody-panel-shadow);
    }
    .show {
      display: flow-root;
      width: auto;
    }
    .em {
      color: var(--prosody-danger);
    }
    .btn {
      display: block;
      position: absolute;
      margin-top: 70px;
      margin-right: 5px;
      margin-left: 10px;
      width: 30px;
      height: 20px;
      font-size: 1.2rem;
      font-weight: 900;
      line-height: 0.8rem;
      padding: 0;
      text-decoration: none;
      cursor: pointer;
      text-align: center;
      text-indent: 0;
      color: var(--prosody-danger);
      background-color: var(--prosody-panel-yellow);
      border-color: var(--prosody-accent);
      border-radius: 7px;
      box-shadow: 0 3px var(--prosody-button-shadow);
      z-index: 1000;
    }
    .btn:hover {
      background-color: var(--prosody-button-hover);
    }
    .btn:active {
      background-color: var(--prosody-button-active);
      box-shadow: 0 4px var(--prosody-button-shadow-active);
      /* transform: translatey(4px); */
    }
    .dropik {
      font-size: clamp(0.875rem, 0.82rem + 0.22vw, 1rem);  
      line-height: 1.45; 
      margin-top: 0; 
      margin-bottom: 0
    }
    table#tab1 {
      width: 390px;
    }
    table#tab2 {
      width: 370px;
    }
    table#tab3 {
      width: 390px;
    }
    table#tab4 {
      width: 380px;
    }
    table#t5 {
      width: 360px;
    }
    table#tab6 {
      width: 370px;
    }
    table#tab7 {
      width: 250px;
    }
    table#tab8 {
      width: 350px;
    }
    table#t9 {
      width: 440px;
      color: var(--prosody-arabic);
      /* line-height: 1.2rem; */
    }
    table#tab10 {
      width: 330px;
    }
    table#tabab11 {
      width: 380px;
    }
    table#t12 {
      width: 310px;
    }
    table#tab13 {
      width: 300px;
      color: var(--prosody-arabic);
      line-height: 0.7rem;
    }
    /* Nagłówek fiszki arabskiej */
    .tytar {
      font-size: 1.3rem;
      font-weight: bold;
      margin-bottom: 1rem;
    }
    .tytar0 {
      font-size: 1.2rem;
      font-weight: bold;
      margin-bottom: 1rem;
    }
    /* Nagłówek fiszki polskiej */
    .tyt {
      font-family: 'Times New Roman', Times, serif;
      font-size: 1rem;
      font-weight: bold;
      text-align: center;
      line-height: 1rem;
      margin-bottom: 0;
    }
    .podtyt {
      font-family: 'Times New Roman', Times, serif;
      font-size: 0.9rem;
      line-height: 0.9rem;
      font-style: italic;
      font-weight: bold;
      text-align: center;
      margin-bottom: 0;
    }
    .data {
      font-family: 'Times New Roman', Times, serif;
      font-size: 0.8rem;
      font-weight: bold;
      text-align: center;
      line-height: 0.8rem;
    }
td.clas {
color: var(--prosody-danger);
}
    td {
      border: none;
      font-family: 'Times New Roman', Times, serif;
      width: auto;
      text-align: justify;
      -moz-text-align-last: justify;
      text-align-last: justify;
      padding-top: 0;
      padding-bottom: 0;
      font-size: 1rem;
      color: var(--prosody-arabic);
      line-height: 1.2rem;
      vertical-align: middle;
    }
    td.gubran2 {
      border: none;
      font-family: 'Times New Roman', Times, serif;
      width: auto;
      text-align: center;
      -moz-text-align-last:unset;
      text-align-last:unset;
      padding-top: 0;
      padding-bottom: 0;
      /* padding-left: 50px;
      padding-right: 50px; */
      font-size: 1rem;
      color: var(--prosody-arabic);
      line-height: 1.2rem;
      vertical-align: middle;
    }
    td:first-child {
      direction: rtl;
      padding-right: 10px;
    }
    td:last-child {
      direction: rtl;
      padding-left: 10px;
    }
    .proza {
      font-family: 'Times New Roman', Times, serif;
      font-size: 0.7rem;
      /* margin-left: 1rem; */
      /* margin-right: 1rem; */
      margin-bottom: 0;
      /* text-indent: 1rem; */
      text-align: right;
      line-height: 0.9rem;
      /* -ms-hyphens: auto;
      hyphens: auto; */
    }
    .prozaar {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 0.9rem;
      line-height: 1.2rem;
      direction: rtl;
      text-align: justify;
      margin-left: 0.5rem;
      margin-right: 0.5rem;
      text-indent: 1.5rem;
      margin-bottom: 3px;
      color: var(--prosody-arabic);
    }
    .prozaar2 {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 0.9rem;
      line-height: 1.2rem;
      direction: rtl;
      text-align: justify;
      margin-left: 0.5rem;
      margin-right: 0.5rem;
      text-indent: 1.5rem;
      margin-bottom: 3px;
      color: var(--prosody-arabic);
    }
.proza,
.pol2,
.pol2a {
  margin-right: 2rem;
}
    .pol1 {
      font-size: 0.7rem;
      color: #08306b;
      line-height: 0.9rem;
      margin-left: 10px;
      text-indent: 0;
    }
    .pol2 {
      font-size: 0.7rem;
      font-style: normal;
      line-height: 0.8rem;
      margin-top: 10px;
      margin-bottom: 0px;
      margin-left: 1rem;
      text-align: justify;
    }
    .pol2a {
      font-size: 0.7rem;
      font-style: normal;
      /* font-family: Cardo; */
      line-height: 0.7rem;
      text-align: right;
      margin-top: 10px;
      margin-bottom: 0px;
      margin-left: 0;
    }
    .mrg0 {
      margin-top: 0;
      margin-bottom: 0;
      font-size: clamp(0.8rem, 0.6rem, 0.7rem);
      line-height: 1rem;
    }
    .indnt {
      text-indent: 15px;
    }
    p.margin {
      margin-top: 0px;
      margin-bottom: 0px;
    }
    .tytar0 {
	font-size: 1.2rem;
	font-weight: bold;
	margin-bottom: 1rem;
}
.nowy {
	font-family: 'Times New Roman', Times, serif;
		font-size: 1rem;
		direction: rtl;
		text-align: justify;
		margin-left: 1rem;
		margin-right: 1rem;
		margin-bottom: 0;
	margin-top: 0;
		color: var(--prosody-arabic);
	}
.italic {
  font-style: italic;
}
.serif-italic {
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
    font-size: 1.2rem;
  }
.cent-kolor {
  text-align: center;
  color: var(--prosody-accent);
}
h4 {
  margin-bottom: 0;
}
.maroon {
  color: var(--prosody-accent);
}
.bayt-scroll {
  overflow-x: auto;
  max-width: 100%;
  padding: 2px 0;
}
.bayt-table {
  width: 420px;
  min-width: 420px;
  /* background-color: var(--prosody-panel-yellow);
  border: 1px solid #d1d5db;
  border-radius: 12px; */
  border-spacing: 20px 0;
  padding: 10px 0;
  table-layout: fixed;
}
.bayt-table td {
  width: 50%;
  padding: 2px 20px;
  min-height: 30px;
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
  vertical-align: middle;
  color: var(--prosody-arabic);
  border: none;
}
.bayt-table2 {
  width: 420px;
  min-width: 420px;
  /* background-color: var(--prosody-panel-yellow);
  border: 1px solid #d1d5db;
  border-radius: 12px; */
  border-spacing: 20px 0;
  padding: 10px 0;
  table-layout: fixed;
}
.bayt-table2 td {
  width: 50%;
  padding: 2px 20px;
  min-height: 30px;
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
  vertical-align: middle;
  color: var(--prosody-arabic);
  border: none;
}
.bayt-table3 {
  width: 340px;
  min-width: 340px;
  /* background-color: var(--prosody-panel-yellow);
  border: 1px solid #d1d5db;
  border-radius: 12px; */
  border-spacing: 20px 0;
  padding: 10px 0;
  table-layout: fixed;
}
.bayt-table3 td {
  width: 50%;
  padding: 2px 15px;
  min-height: 30px;
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
  vertical-align: middle;
  color: var(--prosody-arabic);
  border: none;
}
.bayt-table4 {
  width: 440px;
  min-width: 440px;
  /* background-color: var(--prosody-panel-yellow);
  border: 1px solid #d1d5db;
  border-radius: 12px; */
  border-spacing: 20px 0;
  padding: 10px 0;
  table-layout: fixed;
}
.bayt-table4 td {
  width: 50%;
  padding: 2px 10px;
  min-height: 30px;
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
  vertical-align: middle;
  color: var(--prosody-arabic);
  border: none;
}
.bayt-table5 {
  width: 300px;
  min-width: 300px;
  /* background-color: var(--prosody-panel-yellow);
  border: 1px solid #d1d5db;
  border-radius: 12px; */
  border-spacing: 20px 0;
  padding: 10px 0;
  table-layout: fixed;
}
.bayt-table5 td {
  width: 50%;
  padding: 2px 20px;
  min-height: 30px;
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
  vertical-align: middle;
  color: var(--prosody-arabic);
  border: none;
}
.bayt-table6 {
  width: 230px;
  min-width: 230px;
  /* background-color: var(--prosody-panel-yellow);
  border: 1px solid #d1d5db;
  border-radius: 12px; */
  border-spacing: 20px 0;
  padding: 10px 0;
  table-layout: fixed;
}
.bayt-table6 td {
  width: 50%;
  padding: 2px 20px;
  min-height: 30px;
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
  vertical-align: middle;
  color: var(--prosody-arabic);
  border: none;
}
  @media (max-width: 768px) {
  #main-menu {
    width: 50vw;         /* 50% szerokości viewportu */
    max-width: 300px;    /* opcjonalnie ogranicz maksymalnie */
    position: absolute;  /* lub fixed — zależnie od projektu */
    top: 100%;           /* pod górnym paskiem */
    left: 0;
    background-color: var(--prosody-menu-bg);  /* sienna tło */
    z-index: 999;
    display: none;       /* domyślnie ukryte */
  }
  #main-menu.open {      /* np. po kliknięciu burgera */
    display: block;
  }
}

/* ==================================================
   Uzupełniające reguły dostępności i trybu ciemnego
   ================================================== */
.metric-block,
.transliteration,
.note,
.fiszka-front1,
.drop,
.drpdown {
  color: var(--prosody-text);
}

.buttn,
.btn {
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.buttn:hover {
  background-color: var(--prosody-button-hover);
}

.buttn:active {
  background-color: var(--prosody-button-active);
  box-shadow: 0 4px var(--prosody-button-shadow-active);
}

.buttn:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--title, var(--prosody-danger));
  outline-offset: 3px;
}

.drop,
.drpdown {
  scrollbar-color: var(--prosody-border-strong) transparent;
}

/* Zachowaj czerwone wyróżnienia i zielony tekst arabski także w dark mode. */
.font-cardo,
.cardo-red,
.em,
td.clas {
  color: var(--prosody-danger);
}

.maroon,
.cent-kolor {
  color: var(--prosody-accent);
}

#t9,
#tab13,
td,
td.gubran2,
.prozaar,
.prozaar2,
.nowy,
.bayt-table td,
.bayt-table2 td,
.bayt-table3 td,
.bayt-table4 td,
.bayt-table5 td,
.bayt-table6 td {
  color: var(--prosody-arabic);
}

@media (prefers-color-scheme: dark) {
  .fiszka-front1,
  .drop,
  .drpdown {
    box-shadow: 0 7px 18px var(--prosody-panel-shadow);
  }
}

html[data-theme="dark"] .fiszka-front1,
html[data-theme="dark"] .drop,
html[data-theme="dark"] .drpdown,
body.dark-mode .fiszka-front1,
body.dark-mode .drop,
body.dark-mode .drpdown {
  box-shadow: 0 7px 18px var(--prosody-panel-shadow);
}

/* ==================================================
   RESPONSYWNOŚĆ — PROZODIA NA TELEFONACH I TABLETACH
   Dostosowane m.in. do iPhone SE (320–375 px)
   ================================================== */

.metric-block,
.transliteration,
.arabic-table-wrap,
.bayt-scroll {
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

@media (max-width: 768px) {
  main {
    width: 100%;
    max-width: 100%;
    padding:
      1rem
      max(0.65rem, env(safe-area-inset-right))
      2rem
      max(0.65rem, env(safe-area-inset-left));
  }

  article {
    width: 100%;
    max-width: 100%;
    padding: clamp(1rem, 4.8vw, 1.5rem);
    border-radius: 16px;
  }

  p {
    font-size: 1rem;
    line-height: 1.55;
  }

  .metric-block,
  .transliteration,
  .note {
    margin-block: 0.85rem 1.15rem;
    padding: 0.8rem 0.9rem;
    border-radius: 11px;
  }

  .font-cardo,
  .cardo-red,
  .metr {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
    letter-spacing: clamp(0.08rem, 0.8vw, 0.16rem);
  }

  .indent {
    padding-left: 1rem;
  }

  .indent2 {
    padding-left: 1.75rem;
  }

  .arabic-table-wrap,
  .bayt-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  table.arabic-table {
    width: max-content;
    min-width: min(100%, 32rem);
    max-width: none;
    border-spacing: 5px;
    padding: 5px;
  }

  .arabic-table td {
    padding: 5px 8px;
    font-size: clamp(1.05rem, 4.5vw, 1.18rem);
    line-height: 1.65;
  }

  .footnote {
    width: 100%;
    margin-bottom: 1rem;
    font-size: 0.76rem;
    text-align: left;
  }

  #main-menu {
    width: min(88vw, 320px);
    max-width: calc(100vw - 1rem);
    max-height: min(75vh, 34rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #main-menu a {
    min-height: 44px;
    padding: 0.65rem 0.85rem;
    line-height: 1.25;
  }
.over {
	overflow: auto;
}
.fiszka-con6 {
  display: inline-block;
  width: 530px;
  height: 740px;
  margin-right: 20px;
  margin-bottom: 20px;
  perspective: 1000px;
} 
.fiszka-con7 {
  display: inline-block;
  width: 530px;
  height: 740px;
  margin-right: 20px;
  margin-bottom: 20px;
  
  /* perspective: 1000px; */
} 

  .fiszka-front1 {
    margin-top: 1.5rem;
    padding: 3rem 0.75rem 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .buttn {
    top: 0.5rem;
    left: 0.5rem;
    min-width: 44px;
    min-height: 36px;
    margin: 0;
    padding: 0.45rem 0.65rem;
    line-height: 1;
    touch-action: manipulation;
  }

  .btn {
    top: 0.5rem;
    right: 0.5rem;
    left: auto;
    width: 40px;
    height: 40px;
    margin: 0;
    line-height: 38px;
    touch-action: manipulation;
  }

  .drop,
  .drpdown {
    right: 0.65rem;
    left: 0.65rem;
    width: auto;
    max-width: none;
    max-height: calc(100% - 5.5rem);
    margin-right: 0;
    margin-left: 0;
    padding: 0.85rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  /* .drop {
    top: 4rem;
    margin-top: 0;
  } */

  .drpdown {
    top: 4rem;
  }

  table#tab1,
  table#tab2,
  table#tab3,
  table#tab4,
  table#t5,
  table#tab6,
  table#tab7,
  table#tab8,
  table#t9,
  table#tab10,
  table#tabab11,
  table#t12,
  table#tab13 {
    width: 100%;
    max-width: 100%;
    table-layout: auto;
  }

  td,
  td.gubran2 {
    overflow-wrap: anywhere;
  }

  .proza,
  .prozaar,
  .prozaar2,
  .nowy {
    margin-inline: 0.35rem;
  }

  .bayt-table,
  .bayt-table2,
  .bayt-table3,
  .bayt-table4,
  .bayt-table5,
  .bayt-table6 {
    border-spacing: 8px 0;
    padding-block: 0.35rem;
  }

  .bayt-table,
  .bayt-table2 {
    width: 380px;
    min-width: 380px;
  }

  .bayt-table3 {
    width: 320px;
    min-width: 320px;
  }

  .bayt-table4 {
    width: 390px;
    min-width: 390px;
  }

  .bayt-table5 {
    width: 280px;
    min-width: 280px;
  }

  .bayt-table6 {
    width: 220px;
    min-width: 220px;
  }

  .bayt-table td,
  .bayt-table2 td,
  .bayt-table3 td,
  .bayt-table4 td,
  .bayt-table5 td,
  .bayt-table6 td {
    padding-inline: 8px;
    font-size: clamp(1.05rem, 4.8vw, 1.18rem);
    line-height: 1.45;
  }
}

@media (max-width: 480px) {
  article {
    padding: 0.9rem;
    border-radius: 12px;
  }

  .fiszka-con6 {
    height: min(740px, max(610px, calc(100svh - 2rem)));
  }

  .fiszka-front1 {
    font-size: 1rem;
    line-height: 1.35rem;
  }

  .drop,
  .drpdown {
    right: 0.4rem;
    left: 0.4rem;
    padding: 0.7rem;
    border-width: 1px;
    border-radius: 11px;
  }

  .tytar {
    font-size: 1.15rem;
  }

  .tytar0 {
    font-size: 1.05rem;
  }

  .serif-italic {
    font-size: 1.05rem;
  }

  .proza,
  .prozaar,
  .prozaar2,
  .nowy {
    margin-inline: 0;
  }
}

@media (max-width: 375px) {
  main {
    padding-inline:
      max(0.45rem, env(safe-area-inset-left))
      max(0.45rem, env(safe-area-inset-right));
  }

  article {
    padding: 0.75rem;
    border-radius: 10px;
  }

  p {
    line-height: 1.48;
  }

  .metric-block,
  .transliteration,
  .note {
    padding: 0.7rem;
  }

  .fiszka-con6 {
    width: 100%;
    height: min(720px, max(590px, calc(100svh - 1rem)));
  }

  .fiszka-front1 {
    margin-top: 1rem;
    padding-inline: 0.5rem;
  }

  #main-menu {
    width: calc(100vw - 0.75rem);
    max-width: none;
  }

  .bayt-table,
  .bayt-table2 {
    width: 360px;
    min-width: 360px;
  }

  .bayt-table4 {
    width: 370px;
    min-width: 370px;
  }
}


/* -----------------słówka----------------- */
    .card {
      background: #fff;
      border: 2px solid #ddd;
      border-radius: 10px;
      width: 250px;
      height: 150px;
      margin: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      font-size: 1.2em;
      box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
      cursor: pointer;
      transition: transform 0.3s;
      perspective: 1000px;
      position: relative;
    }
    .card:hover {
      transform: scale(1.05);
    }
    .card .front,
    .card .back {
      position: absolute;
      width: 100%;
      height: 100%;
      backface-visibility: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 15px;
      overflow: visible;
      box-shadow: 0 7px 15px 0 rgba(80, 152, 160, 0.5);
      border: 2px solid;
      border-color: hsl(34, 85%, 25%);
      padding: 10px;
      box-sizing: border-box;
    }

    .card .front {
      background-color: rgb(218, 237, 222);
      color: maroon;
      font-size: 1.3rem;
      line-height: 1.4rem;
      padding-right: 5px;
      padding-left: 5px;
      text-align: center;
      -ms-hyphens: none;
      hyphens: none;
    }

    .card .back {
      transform: rotateY(180deg);
      background-color: #cde9f2;
      font-size: 1.5rem;
      line-height: 1.7rem;
      color: rgb(8, 48, 107);
      border-width: 2px;
      border-color: maroon;
      text-align: center;
      padding-right: 5px;
      padding-left: 5px;
    }

    .card.flipped .front {
      transform: rotateY(180deg);
    }

    .card.flipped .back {
      transform: rotateY(360deg);
    }

    section {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      margin-top: 20px;
    }

    .but {
      cursor: pointer;
      margin: 0 10px;
      display: inline-block;
      padding: 5px;
      color: darkgreen;
      font-family: Arial, Helvetica, sans-serif;
      font-weight: bold;
      font-style: normal;
      font-size: 1.5rem;
      text-align: center;
      text-decoration: none;
      border-width: 1px;
      border-radius: 10px;
      background-color: lightyellow;
      box-shadow: 0 4px 11px 0 darkgreen;
    }

    .center {
      text-align: center;
    }

    .word {
      font-size: 1.2rem;
      font-weight: bold;
      color: maroon;
    }

    .result {
      font-size: 1.1rem;
      color: maroon;
      margin-top: 10px;
    }

    .score {
      font-weight: bold;
      color: darkgreen;
      margin-top: 10px;
    }

    .toggle {
      margin-bottom: 20px;
      text-align: center;
    }

    .center {
      text-align: center;
    }

    .div1 {
      width: 90%;
      background-color: aliceblue;
      padding-top: 5px;
      padding-bottom: 5px;
      border-radius: 10px;
      border: 1px solid;
      border-color: d;
      margin: auto
    }

    .word {
      font-size: 1.2rem;
      font-weight: bold;
      font-style: italic;
      color: maroon;
      text-align: center;
      /* background-color: aliceblue;     */
    }

    .result {
      font-size: 1.2rem;
      font-weight: bold;
      font-style: italic;
      color: maroon;
      text-align: center;
      background-color: aliceblue;
    }

    .darkgreen {
      font-family: sans-serif;
      font-size: 1.2rem;
      font-weight: bold;
      margin-bottom: 7px;
      color: darkgreen;
    }

    .sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  padding: 5px;
  z-index: 100;
}


/* Tylna strona fiszki */

.card .back {
  position: relative;
  overflow: visible;
}

.card .back-text {
  padding: 0.5rem 0.5rem 2.5rem;
}

/* Kontener przycisku i rozwijanego okna */

.card-dropdown {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 30;
}

/* Przycisk ze strzałką */

.card-dropdown-button {
  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 30px;
  height: 24px;
  padding: 2px 8px;

  color: var(--button-text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;

  background-color: var(--button-bg);
  border: 1px solid transparent;
  border-radius: 7px;
  box-shadow: 0 3px var(--button-shadow);

  cursor: pointer;
}

.card-dropdown-button:hover,
.card-dropdown-button:focus-visible {
  transform: translateY(-1px);
}

/* Rozwijana zawartość */

.card-dropdown-content {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);

  width: min(280px, 80vw);
  padding: 0.8rem;

  color: rgb(1, 56, 1);
  background-color: #e6f4d7;

  border: 2px solid #5b8c26;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(36, 74, 16, 0.35);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
}

/*
 * Komputer: najechanie myszką.
 * Klawiatura: focus-within.
 * Telefon: klasa is-open ustawiana przez JavaScript.
 */

.card-dropdown:hover .card-dropdown-content,
.card-dropdown:focus-within .card-dropdown-content,
.card-dropdown.is-open .card-dropdown-content {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.card-dropdown-content ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-dropdown-content li {
  margin: 0 0 0.45rem;
  text-align: right;
  direction: rtl;
}

.card-dropdown-content li:last-child {
  margin-bottom: 0;
}

/* Tryb ciemny */

:root.dark .card-dropdown-content {
  color: #dcefd0;
  background-color: #24331d;
  border-color: #70984c;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55);
}