@font-face {
  font-family: 'Futura';
  src: url('font/futura-light-webfont.woff2') format('woff2'),
       url('font/futura-light-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Arimo';
  src: url('font/Arimo-Bold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Cherokee&family=Arimo:wght@400;600;700&display=swap');

:root {
  --brand:      #A71C20;
  --brand-dark: #8B0000;
  --brand-deep: #3E0B0B;
  --gold:       #C8941A;
  --gold-light: #E8B84B;
  --gold-bright:#ffc107;
  --cream:      #F7F3EE;
  --panel-bg:   #FAFAF8;
  --divider:    #E2DDD7;
  --tp:         #1A1714;
  --ts:         #6B6560;
  --tm:         #767676;  /* was #9E9A95 (2.8:1) — now 4.54:1 on white for WCAG AA */
  --text-main:  #525252;
  --text-dark:  #333333;
  --text-scale: 1;        /* controlled by text-size buttons */
}

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

/* ── Accessibility: visible keyboard focus indicator (WCAG 2.4.7) ──
   Uses :focus-visible so mouse/touch users don't see rings, but
   keyboard users get a clear high-contrast outline everywhere. */
:focus-visible {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
  border-radius: 3px;
}
/* On the dark red header/panel, use a light ring for contrast */
.app-header :focus-visible,
.selector-bar :focus-visible,
.ptop :focus-visible,
.audio-panel :focus-visible,
.w:focus-visible,
.vn:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(0,0,0,0.45);
}
/* Older browsers without :focus-visible fall back to :focus, but we
   suppress the default ring only where we provide our own above. */

html, body {
  font-family: 'Futura', 'Arimo', 'Noto Sans Cherokee', sans-serif;
  background-color: #ffffff;
  color: var(--text-main);
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
  margin-bottom: 100px;
  height: 100%;
  overflow: hidden;
}

#sidebarMenu {
  padding-top: 60px;
  height: 100%;
  top: 0;
  position: fixed;
  left: 0;
  width: 250px;
  transform: translateX(-250px);
  transition: transform 250ms ease-in-out;
  background: linear-gradient(180deg, #a71c20 0%, #0C0203 100%);
  z-index: 1001;
}

.helpBtn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: white;
    padding-left: 10px;
    padding-right: 10px;
}

input[type="checkbox"]:checked ~ #sidebarMenu {
  transform: translateX(0);
}

input[type=checkbox] {
  transition: all 0.3s;
  box-sizing: border-box;
  display: none;
}

.sidebarMenuInner {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.sidebarMenuInner li {
  list-style: none;
  color: #fff;
  text-transform: uppercase;
  font-weight: bold;
  padding: 20px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.sidebarMenuInner li a {
  color: #fff;
  text-transform: uppercase;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
}

.sidebarMenuInner li a i {
  margin-right: 8px;
  color: var(--gold-bright);
}

.sidebarIconToggle {
  transition: all 0.3s;
  box-sizing: border-box;
  cursor: pointer;
  position: fixed;
  z-index: 1002;
  top: 40px;
  left: 15px;
  height: 22px;
  width: 22px;
  padding-top: 30px;
}

.spinner {
  transition: all 0.3s;
  box-sizing: border-box;
  position: absolute;
  height: 3px;
  width: 100%;
  background-color: #fff;
}

.horizontal {
  transition: all 0.3s;
  box-sizing: border-box;
  position: relative;
  float: left;
  margin-top: 3px;
  box-shadow: 0.5px 0.5px;
  border-radius: 6px;
}

.diagonal.part-1 {
  position: relative;
  transition: all 0.3s;
  box-sizing: border-box;
  float: left;
  box-shadow: 0.5px 0.5px;
  border-radius: 6px;
  height: 3px;
  width: 15px;
}

.diagonal.part-2 {
  transition: all 0.3s;
  box-sizing: border-box;
  position: relative;
  float: left;
  margin-top: 3px;
  box-shadow: 0.5px 0.5px;
  border-radius: 6px;
  height: 3px;
  width: 15px;
}

input[type=checkbox]:checked ~ .sidebarIconToggle > .horizontal {
  opacity: 0;
}

input[type=checkbox]:checked ~ .sidebarIconToggle > .diagonal.part-1 {
  transform: rotate(135deg);
  margin-top: 8px;
}

input[type=checkbox]:checked ~ .sidebarIconToggle > .diagonal.part-2 {
  transform: rotate(-135deg);
  margin-top: -9px;
}

.language-switcher-container {
  padding: 5px;
  display: flex;
  border-radius: 5px;
  width: fit-content;
  margin: 20px;
}

.language-button {
  padding: 10px 15px;
  font-weight: bold;
  border-radius: 0;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-color: transparent;
  color: white;
  font-family: 'Futura', 'Arimo', 'Noto Sans Cherokee', sans-serif;
}

.language-button:first-child { border-top-left-radius: 5px; border-bottom-left-radius: 5px; }
.language-button:last-child  { border-top-right-radius: 5px; border-bottom-right-radius: 5px; }
.language-button.active      { background-color: #333; color: #fff; outline: 2px solid #525252; }
.language-button:not(.active){ background-color: #fff; color: #5A5A5A; }
.language-button:not(.active):hover { background-color: #f0f0f0; }

.app-header {
  background: #A71C20;
  background-size: cover;
  background-image: url(pattern-background-02.svg);
  padding: 55px 20px;
  padding-top: 80px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}


.hback {
  color: #ffffff;
  font-size: 40px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s;
  user-select: none;
}

.hback:hover { background: rgba(255,255,255,0.12); }
.htb { flex: 1; text-align: center; }

.hml {
  font-size: 10px;
  color: var(--gold-bright);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 2px;
}

.hbt {
  font-size: 16px;
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
}

.hch {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-top: 3px;
  letter-spacing: 0.04em;
}

.hico {
  color: #ffffff;
  font-size: 30px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s;
  user-select: none;
}

.hico:hover { background: rgba(255,255,255,0.12); }

.selector-bar {
  background-color: #3E0B0B;
  background-image: url('pattern-background-02.svg');
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
  scrollbar-width: none;
}

.selector-bar::-webkit-scrollbar { display: none; }

.sel-btn {
  flex-shrink: 0;
  padding: 9px 16px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.8);  /* was 0.5 (2.0:1) — now 5.2:1 on brand red */
  font-family: 'Futura', 'Arimo', 'Noto Sans Cherokee', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.sel-btn.active { color: var(--gold-bright); border-bottom-color: var(--gold); }
.sel-btn:hover:not(.active) { color: rgba(255,255,255,0.95); }

.sel-divider {
  width: 1px; height: 16px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0; margin: 0 2px;
}

.split {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.ptop {
  background-color: var(--brand);
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 48px;
}

.plbl {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px 6px;
  position: sticky; top: 0; z-index: 2;
  background: rgba(139,26,26,0.97);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pldot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold-bright); opacity: 0.7; flex-shrink: 0;
}

.pltxt {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: var(--gold-bright); opacity: 0.9;
}

.vb {
  padding: 8px 18px 8px 0;
  display: flex; gap: 0; align-items: stretch;
  border-radius: 6px; margin: 2px 6px;
  transition: background 0.18s;
}

.vb.av { background: rgba(255,255,255,0.08); }

.vn {
  font-size: 11px; font-weight: 700;
  color: var(--gold-bright); opacity: 0.85;
  min-width: 44px; width: 44px;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 6px;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 6px 0 0 6px;
  transition: background 0.12s;
  user-select: none;
  -webkit-tap-highlight-color: rgba(255,193,7,0.15);
  background: #7c1517;
}

.vn:active { background: rgba(255,193,7,0.15); }

.vtc {
  font-family: 'Noto Sans Cherokee', 'Futura', 'Arimo', sans-serif;
  font-size: calc(13px * var(--text-scale)); line-height: 1.9;
  color: rgba(255,255,255,0.88); flex: 1;
  padding-left: 10px;
}

.w {
  cursor: pointer;
  border-radius: 4px; padding: 1px 2px; display: inline;
  transition: background 0.06s, color 0.06s;
  position: relative;
}

.w:hover   { background: rgba(255,255,255,0.12); }
.w.played  { color: rgba(255,255,255,0.22); }
.w.current {
  background: var(--gold-bright); color: #1A0800;
  border-radius: 5px; padding: 2px 5px; font-weight: 700;
  box-shadow: 0 1px 6px rgba(255,193,7,0.45);
}
.w.pending { color: rgba(255,255,255,0.88); }

.w.dict-found   { font-weight: 700; }
.w.dict-missing { font-weight: 400; opacity: 0.82; }

@keyframes lpFlash {
  0%   { background: rgba(255,193,7,0.55); }
  100% { background: transparent; }
}

.long-press-flash { animation: lpFlash 0.3s ease-out; }

#dictBubble {
  display: none;
  position: absolute;
  z-index: 3000;
  min-width: 260px;
  max-width: 300px;
  background: #F7F3EE;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
  padding: 18px 20px 14px;
  transform: translateY(-100%) translateY(-12px);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}

#dictBubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: #F7F3EE;
  border-bottom: 0;
}

.db-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 5px;
}

.db-label {
  font-size: 11px;
  color: #9E9A95;
  min-width: 62px;
  text-align: right;
  font-family: 'Futura', sans-serif;
  letter-spacing: 0.02em;
}

.db-val {
  font-size: 15px;
  color: #1A1714;
  font-weight: 400;
  font-family: 'Noto Sans Cherokee', 'Futura', sans-serif;
  line-height: 1.3;
}

.db-prac {
  font-family: 'Futura', 'Arimo', sans-serif;
}

.db-eng {
  font-family: 'Futura', 'Arimo', sans-serif;
  color: #333333;
}

.db-more {
  display: block;
  margin-top: 10px;
  margin-left: auto;
  width: fit-content;
  background: var(--brand);
  color: #ffffff;
  font-size: 14px;
  font-family: 'Futura', 'Arimo', sans-serif;
  padding: 8px 20px;
  border-radius: 20px;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.01em;
}

.db-more:hover { background: var(--brand-dark); }

.w .phon {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%; transform: translateX(-50%);
  background: #1A0800;
  color: var(--gold-bright);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  border: 1px solid rgba(255,255,255,0.15);
}

.w:hover .phon { display: block; }

.pbot {
  background-color: var(--panel-bg);
  display: flex; 
  flex-direction: column;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 44px;
  overflow: hidden;
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 1px solid var(--divider);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
  z-index: 10;
}

.pbot.drawer-open {
  height: 50%;
  overflow-y: auto;
}

.plblt {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  padding: 0 18px;
  position: sticky; top: 0;
  background: rgba(250,250,248,0.97);
  backdrop-filter: blur(4px);
  z-index: 2;
  border-bottom: 0.5px solid var(--divider);
  cursor: pointer;
  height: 44px;
  flex-shrink: 0;
}

.drawer-icon {
  color: var(--tm);
  font-size: 14px;
  transition: transform 0.3s ease;
}

.pbot.drawer-open .drawer-icon {
  transform: rotate(180deg);
}

.pldott {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--tm); opacity: 0.6; flex-shrink: 0;
}

.pltxtt {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: var(--tm);
}

.ven {
  padding: 8px 18px;
  display: flex; gap: 10px; align-items: flex-start;
  transition: background 0.2s, border-color 0.2s, padding-left 0.2s;
  border-left: 2px solid transparent;
  margin: 2px 0;
  cursor: pointer;
}

.ven:hover {
  background: rgba(255,255,255,0.05);
}

.ven:active {
  background: rgba(255,193,7,0.1);
}

.ven.active {
  background: rgba(255,193,7,0.08);
  border-left-color: var(--gold);
  padding-left: 16px;
}

.vne {
  font-size: 10px; font-weight: 600;
  color: var(--gold); min-width: 16px; padding-top: 4px;
  text-align: right; flex-shrink: 0;
}

.vte {
  font-family: 'Futura', 'Arimo', 'Noto Sans Cherokee', sans-serif;
  font-size: calc(13px * var(--text-scale)); line-height: 1.7; color: var(--text-dark); flex: 1;
}

.audio-panel {
  background-color: #2C2829;
  flex-shrink: 0;
  padding: 13px 20px 30px;
  display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── Track row: [0:33] ──●────── [7:21] ──────────────────────── */
.ww {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 28px;
  cursor: default;
  overflow: visible;
}

.wc { display: none; } /* canvas no longer used */

.ww-time-start,
.ww-time-end {
  font-size: 12px;
  font-family: 'Futura', 'Arimo', sans-serif;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  min-width: 34px;
  user-select: none;
}
.ww-time-end { text-align: right; }

/* The clickable track container */
.ww-track {
  flex: 1;
  position: relative;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 99px;
  cursor: pointer;
}

/* Filled (played) portion */
.po {
  position: absolute;
  top: 0; left: 0; height: 100%;
  background: #a71c20;
  border-radius: 99px;
  pointer-events: none;
  transition: width 0.05s linear;
}

/* Circular thumb */
.pn {
  position: absolute;
  top: 50%;
  width: 16px; height: 16px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: left 0.05s linear;
  box-shadow: 0 1px 5px rgba(0,0,0,0.35);
}

.scrub-hover {
  position: absolute; top: -26px;
  background: #2C2829; color: #ffffff;
  font-size: 9px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px;
  pointer-events: none; opacity: 0; transition: opacity 0.1s;
  white-space: nowrap; border: 1px solid rgba(255,255,255,0.1);
}
.ww-track:hover .scrub-hover { opacity: 1; }

/* ── Controls row ───────────────────────────────────────────── */
.trow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

.tb {
  background: transparent; border: none; cursor: pointer;
  padding: 6px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: background 0.12s;
}
.tb:hover { background: rgba(255,255,255,0.12); }
.tb svg {
  width: 22px; height: 22px; fill: none; stroke: #ffffff;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block;
}

/* Large centred play button */
.pbtn {
  width: 62px; height: 62px; border-radius: 50%;
  background: #f1a91c;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s, transform 0.1s, box-shadow 0.12s;
  box-shadow: 0 4px 18px rgba(122,18,21,0.55);
}
.pbtn:hover  { background: #f1a91c; }
.pbtn:active { transform: scale(0.93); }
.pbtn svg   { width: 24px; height: 24px; fill: #ffffff; stroke: none; display: block; }

.tlbl { display: none; }
.sp   { display: none; }

.pill {
  font-size: 12px;
  letter-spacing: 0.03em; color: #1a1a1a;
  border: 1.5px solid rgba(0,0,0,0.15); border-radius: 999px;
  padding: 8px 18px; cursor: pointer;
  background: rgba(255,255,255,0.92);
  transition: all 0.15s; white-space: nowrap;
  font-family: 'Futura', 'Arimo', sans-serif;
  display: flex; align-items: center; gap: 6px;
}
.pill:hover { background: #ffffff; }
.pill.on {
  color: #ffffff; border-color: #ffc106; background: rgb(139 99 22);
}

.pill-text {
  font-size: 12px;
  letter-spacing: 0.03em; color: #1a1a1a;
  border: 1.5px solid rgba(0,0,0,0.15); border-radius: 999px;
  padding: 8px 18px; cursor: pointer;
  background: rgba(255,255,255,0.92);
  transition: all 0.15s; white-space: nowrap;
  font-family: 'Futura', 'Arimo', sans-serif;
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px;
}
.pill-text:hover { background: #ffffff; }
.pill-text.on {
  color: #ffffff; border-color: #ffc106; background: rgb(139 99 22);
}

/* ── Text size control row ───────────────────────────────────── */
.jump-to-verse {
	display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    padding-left: 15px;
    /* padding-bottom: 15px; */
    font-size: 11px;
    text-transform: uppercase;
    background: #a81c1f;
    color: #ffffff;
}

.text-size-control {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  justify-content: space-between;
  flex-direction: row;
  background: #ffffff;
}
.text-size-label {
  font-size: 11px;
  color: #1a1a1a;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.text-size-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.15);
  background: #f5f5f5;
  color: #1a1a1a;
  font-size: 17px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
  flex-shrink: 0;
  line-height: 1;
}
.text-size-btn:hover  { background: #e8e8e8; }
.text-size-btn:active { transform: scale(0.92); }
.text-size-preview {
  flex: 1;
  font-family: 'Noto Sans Cherokee', 'Futura', sans-serif;
  font-size: calc(13px * var(--text-scale));
  color: #1a1a1a;
  text-align: center;
  letter-spacing: 0.02em;
  transition: font-size 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.loading-msg {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: rgba(255,255,255,0.4);
  font-size: 13px; letter-spacing: 0.06em;
}

.fixed-bottom-nav,
.bnav {
  position: fixed;
  bottom: 0;
  z-index: 1000;
  background-color: #fff;
  padding-top: 1rem;
  padding-bottom: 1rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  border-top: 1px solid #e5e7eb;
  flex-wrap: nowrap;
  box-shadow: 0px 1px 3px rgba(0,0,0,0.15);
}

.fixed-bottom-title,
.ni {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  margin: 0 0.2rem;
  color: #9C9C9C;
  padding: 0.2rem;
  border-radius: 0.375rem;
  transition: color 200ms;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.fixed-bottom-title i,
.ni svg {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  width: 20px; height: 20px;
  fill: none; stroke: #9C9C9C;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

.fixed-bottom-title span,
.nl {
  font-size: 0.75rem;
  font-family: 'Futura', 'Arimo', 'Noto Sans Cherokee', sans-serif;
}

.fixed-bottom-title img {
  width: 30px; height: 24px;
  margin-bottom: 0.25rem;
}

.fixed-bottom-title.active-page,
.ni.active {
  color: #AD1D35;
}

.fixed-bottom-title.active-page svg,
.ni.active svg { stroke: #AD1D35; }
.fixed-bottom-title:hover,
.ni:hover { color: #AD1D35; }
.fixed-bottom-title:hover svg,
.ni:hover svg { stroke: #AD1D35; }
.nl { color: inherit; }

.verse-menu {
  position: fixed; top: 0; right: 0; bottom: 0; width: 280px;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.18);
  z-index: 1100;
  display: flex; flex-direction: column;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
}

.verse-menu.open { transform: translateX(0); }

.vm-head {
  background: var(--brand); padding: 16px 18px;
  padding-top: 100px;
  display: flex; align-items: center; justify-content: space-between;
  background-image: url('pattern-background-02.svg');
}

.vm-title {
  color: #fff; font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
}

.vm-close {
  background: none; border: none;
  color: #ffffff; font-size: 30px; cursor: pointer;
  line-height: 1; padding: 2px;
}

.vm-list { overflow-y: auto; flex: 0 1 auto; max-height: 50vh; }

.vm-item {
  padding: 12px 18px;
  border-bottom: 0.5px solid var(--divider);
  cursor: pointer; display: flex; gap: 12px; align-items: flex-start;
  transition: background 0.15s;
}

.vm-item:hover   { background: #fdf4f4; }
.vm-item.current { background: rgba(255,193,7,0.08); border-left: 2px solid var(--gold); }

.vm-vn {
  font-size: 10px; font-weight: 600;
  color: var(--gold); min-width: 24px; padding-top: 2px;
}

.vm-text {
  font-family: 'Noto Sans Cherokee', 'Futura', 'Arimo', sans-serif;
  font-size: calc(13px * var(--text-scale)); color: var(--ts); line-height: 1.5;
}

.vm-overlay {
  position: fixed; inset: 0; z-index: 1099; display: none;
}

.vm-overlay.open { display: block; }

.history-sidebar {
  position: fixed;
  top: 0; right: -400px;
  height: 100%;
  background-color: #fff;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  padding: 20px;
  padding-top: 40px;
  z-index: 1200;
  width: 300px;
}

.history-sidebar.open { right: 0; }
.history-sidebar h2 { color: #333; margin-bottom: 12px; }

#closeHistoryButton {
  position: absolute; top: 15px; right: 10px;
  background: none; border: none; font-size: 24px; cursor: pointer; color: #333;
}

#closeHistoryButton:hover { color: #8a8573; }
#historyList { list-style: none; padding: 0; }
#historyList li { margin-bottom: 10px; border-bottom: 1px dashed #ddd; padding-bottom: 8px; }
#historyList li a { color: #333; text-decoration: none; font-size: 16px; }
#historyList li a:hover { text-decoration: underline; }

.Favorites-sidebar {
  position: fixed;
  top: 0; right: -300px;
  height: 100%;
  background-color: #fff;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  padding: 20px;
  padding-top: 40px;
  z-index: 1200;
  width: 300px;
}

.Favorites-sidebar.open { right: 0; }
.Favorites-sidebar h2 { color: #333; margin-bottom: 12px; }

#closeFavoritesButton {
  position: absolute; top: 15px; right: 10px;
  background: none; border: none; font-size: 24px; cursor: pointer; color: #333;
}

#closeFavoritesButton:hover { color: #005bb5; }
#FavoritesList { list-style: none; padding: 0; }
#FavoritesList li { margin-bottom: 10px; border-bottom: 1px dashed #ddd; padding-bottom: 8px; }

button {
  cursor: pointer;
  font-family: 'Futura', 'Arimo', 'Noto Sans Cherokee', sans-serif;
}

@media (max-width: 640px) {
  .split {
    display: flex;
  }
}

.ptop::-webkit-scrollbar,
.pbot::-webkit-scrollbar,
.vm-list::-webkit-scrollbar { width: 4px; }
.ptop::-webkit-scrollbar-track  { background: transparent; }
.ptop::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.15); border-radius: 2px; }
.pbot::-webkit-scrollbar-track  { background: transparent; }
.pbot::-webkit-scrollbar-thumb  { background: rgba(0,0,0,0.1); border-radius: 2px; }

body {
  display: flex;
  flex-direction: column;
}

.split {
  flex: 1;
  min-height: 0;
}

/* =============================================================
   LANDSCAPE — side-by-side panels
   Placed at end of file so these rules win over portrait styles
   above (same specificity, last-rule-wins).
   ============================================================= */
@media (orientation: landscape) and (max-height: 500px) {

  .app-header   { display: none; }
  .selector-bar { top: 0; padding-left: 50px; }
  .audio-panel {padding-top: 10px; padding-bottom: 10px;}
  .pbtn {width: 35px; height: 35px;}
  .trow {padding-bottom: 10px;}
  .pbtn svg {width: 18px; height: 18px;}

  body {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  /* Split row fills all space between selector and audio panel */
  .split {
    flex: 1;
    display: flex;
    flex-direction: row;
    min-height: 0;
    overflow: hidden;
    position: relative;
  }

  /* Cherokee — left column */
  .ptop {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    padding-bottom: 8px;
    border-right: 1px solid rgba(255,255,255,0.1);
  }

  /* English — right column, fully visible, no drawer behaviour */
  .pbot {
    position: relative;
    bottom: auto;
    left: auto;
    width: auto;
    height: 100%;
    flex: 1;
    overflow-y: auto;
    overflow: hidden auto;
    border-top: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
  }

  /* Prevent the drawer-open class from overriding height */
  .pbot,
  .pbot.drawer-open {
    height: 100%;
    overflow-y: auto;
  }

  /* Remove drawer chevron — not needed side by side */
  .pbot .drawer-icon { display: none; }

  /* English label header — sticky at top of right column */
  .pbot .plblt {
    position: sticky;
    top: 0;
    cursor: default;
  }

  /* Audio panel full width at bottom */
  .audio-panel {
    flex-shrink: 0;
    width: 100%;
  }
}