
  .searchbar {
    z-index:1;
  }
  ::-webkit-scrollbar {
  width: 16px;
  height: 16px; }

  ::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  -webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,0.10),inset 0 -1px 0 rgba(0,0,0,0.07); }

  .ui-autocomplete { 
  max-height: 220px; 
  min-height: 38px;
  overflow-y: auto; 
  overflow-x: hidden;
  scrollbar-color: #c1c1c1ff #424242; 
  border-radius: 1rem;
  max-width: 274px;
  align-items: center;
  }
  #arrowImg {
      height: 13px;
      margin-left: -6px;
      margin-top: -15px;
  }

  #arrowImg.dark {
     color: #000;
  }

  article {
      margin-left: 5px;
  }

  #sutta p, 
  #sutta ol, 
  #sutta ul, 
  #sutta li { 
    margin-bottom: 1.5rem; 
    font-size: 1.1rem; 
  }

  #sutta h1 {
    text-align: center;
  }

  #sutta hr { 
  display: none;
  }

  #scrollToTopBtn {
  border-width: 2px;
    border-radius: 32px;
    bottom: 30px;
    right: 90px;
  /*  background-color: #424269;
    border-color: #5A5A5A;*/
    height: 30px;
    width: 30px;
    opacity: 0.8;
  }

  html.dark #scrollToTopBtn #arrowImg,
  body.dark #scrollToTopBtn #arrowImg,
  body[data-theme="dark"] #scrollToTopBtn #arrowImg {
    filter: invert(1);
  }

  .go-button {
    margin-left: 5px;
    height: 35px;
    width: 35px;
    border-radius: 32px;
    -webkit-border-radius: 32px;
    border: 1px solid #5a5a5a; /* --dark-gray */
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
   /* background-color: transparent;*/
    background-color: rgb(221, 221, 221);
    color: #5a5a5a;
  }

  .byline p {
    overflow: hidden;  
    text-overflow: ellipsis; /* "..." если текст не помещается */
    margin: 0;          /* Убираем отступы */
  }

    /* 
  .rus-lang {
    font-family: "Robto Serif", serif;
  }
  */

  .hint {
    font-family: sans-serif;
  }

  .byline .pli-lang,
  .byline .rus-lang, .byline .eng-lang {
    display: inline;    /* Отменяем inline-block для byline */
    width: auto;        /* Сбрасываем ширину */
  }

  /* Резервируем место, даже если текст пуст или скрыт */
  .byline::after {
    content: "";
    display: inline-block;
    height: 1.2rem;  /* Такая же высота, как у текста */
    visibility: hidden;  /* Невидим, но сохраняет место */
  }

  .dark .go-button {
    border-color: #dddddd; /* --off-white */
    background-color: #42426a; /* --dark-blue */
    color: #dddddd; /* --off-white */
  }

  .dark .go-button:hover {
    background-color: #8f8f8f; /* --light-gray */
  }

  .roundedborder{
    position: absolute; 
    right :35px; 
    z-index:999999;
  }

  input,
  button,
  select,
  optgroup,
  textarea {
   /* font-family: "Robto Serif";*/
    font-size: 0.8rem;
    line-height: 1rem;
  }
  .svgarrow {
    color: #000;
  }

  .dark .svgarrow {
    color: #D5D5D5;
  }

  #match-button-next {
    border-radius: 32px;
    position: fixed; 
    bottom: 30px; 
    right: 100px; 
    z-index: 99; 
    padding: 5px; 
  }

  #match-button-clear {
    display: none;
    border-radius: 32px;
    position: fixed; 
    bottom: 30px; 
    right: 100px; 
    z-index: 99; 
    padding: 5px; 
  }

  .warning {
    color: #902A07;
    text-align: center;
  }

  .dark p.warning {
    color: rgb(170,69,16);
  }

  .close-warning {
    cursor: pointer; 
    margin-left: 0px; 
    font-weight: bold;
  }

  /* На маленьких мобильных: показываем только номер */
  #navigation {
    display: flex;
    gap: 8px; 
    overflow: hidden;
  }

  #previous2,
  #next2 {
      max-width: 49%;
    word-break: break-word;
  }

  #previous,
  #previous2 {
    margin-right: auto;
    text-align: left;
  }

  #next,
  #next2 {
    margin-left: auto;
    text-align: right;
  }

  #previous,
  #next {
    max-width: 49%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    line-height: 1.2em; /* или 1.4em, в зависимости от шрифта */
    height: 2.4em;       /* 1.2em * 2 строки */
  }

  #previous a,
  #next a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2em;
    height: 2.4em;
  }

  /* Стиль для названия сутты (одна строка + обрезка) */
  .sutta-name {
    white-space: nowrap; /* Запрещаем перенос */
    overflow: hidden;
    text-overflow: ellipsis; /* Добавляем "..." */
    max-width: 48%; /* Ограничиваем ширину (можно адаптивно) */
  }

  .afternav {
      display: none;
    }

    @media (max-width: 356px) {
   .sutta-name {
      display: none;
    }

  .afternav {
        display: block;
      }
    }

  .finder {
    color: #902A07;
      font-weight: bold;
  }

  .dark .finder  {
    color: #DA420E;
        font-weight: bold;
  }  

  .common-size-icon4 {
    margin-top: -3px; 
  margin-left: 6px;	
    height: 25px; 
    width: 22px;
  }


  /* === Базовые стили для всех режимов === */

  .pli-lang, .eng-lang, .rus-lang {
    display: inline;
  }

  .column-view .pli-lang,
  .column-view .eng-lang,
  .column-view .rus-lang {
    display: inline-block;
    vertical-align: top;
    text-align: left;
    box-sizing: border-box;
    word-wrap: break-word;
  }

  .column-view .pli-lang:not(:empty) + .rus-lang:not(:empty),
  .column-view .pli-lang:not(:empty) + .eng-lang:not(:empty),
  .column-view .eng-lang:not(:empty) + .rus-lang:not(:empty) {
    width: 48%;  
  }

  header .column-view .pli-lang:not(:empty) {
      width: 100%;  

  }


  .column-view .pli-lang:not(:empty) {
    width: 48%;
    padding-right: 10px;
    max-width: 48%;
  }

  /* === Новый стиль: с .right-column === */

  /* Если внутри .column-view есть .right-column */
  .column-view .right-column {
    display: inline-block;
    width: 48%;
    padding-left: 10px;
    vertical-align: top;
    box-sizing: border-box;

    /* Убираем возможные пробельные отступы между дочерними элементами 
    font-size: 0;*/ /* Отключаем влияние размера шрифта на inline-block элементы */
  }

  /* Внутри right-column — восстанавливаем нормальный размер текста 
  .column-view .right-column * {
    font-size: medium;  
  }*/

  /* Pali — слева */
  .column-view .pli-lang:not(:empty) {
    width: 48%;
    padding-right: 10px;
    max-width: 48%;
  }

  /* Переводы внутри right-column — блочные элементы */
  .column-view .right-column .rus-lang,
  .column-view .right-column .eng-lang {
    display: block;
    width: 100%;
    margin: 0; /* Убираем все внешние отступы */
    padding: 0;
  }

  /* Убедимся, что <br> не добавляет лишний отступ */
  .column-view .right-column br {
    display: none; /* Либо удалите <br> из HTML, если он не нужен */
  }

  /* Скрытие пустых */
  .column-view .pli-lang:empty,
  .column-view .eng-lang:empty,
  .column-view .rus-lang:empty {
    display: none;
  }

  /* Ширина контейнера */
  #sutta.column-view {
    max-width: 105rem;
  }

  /* Перенос слов для читаемости    white-space: pre-wrap; */
  #sutta * {
    word-break: break-word;
    overflow-wrap: break-word;
  }


  .greyedout {
    color: #5a5a5a !important;
  }

  .dark .greyedout {
    color: #8f8f8f !important;
  }


  .variant {
    display: inline; /* или inline-block */
    vertical-align: baseline;
    line-height: 1.4; /* совпадает с основным текстом */
    margin: 0;
    padding: 0;
    color: #95796b !important;
  }

  .dark .variant {
    color: #83676a !important;
  }

  .dark .btn-close {
    color: #989898 !important;
    filter: invert(1) grayscale(100%) brightness(200%);
  }


  .hidden-variant {
    display: none !important;
  }


  .sutta-title .variant {
    display: block;
    font-size: 18px;
    font-weight: normal;
    line-height: 1.4;
  }



  #language-button-dummy {
    border-radius: 32px !important;
    /*position: absolute;
    right: 10px;
    top: 20px;*/
    padding: 5px; 
  }

  .voice-dropdown {
      position: relative;
      display: inline-block;
  }

  .voice-link {
      position: relative; 
      display: inline-block;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
  }


  .voice-player {
      display: none;
      position: fixed;
      top: 25%;
      left: 50%;
      transform: translateX(-50%);
      background: white;
      padding: 20px;
      border: 1px solid #ddd;
      z-index: 1000;
      min-width: 350px;    
      max-width: 90vw;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      border-radius: 24px;
  }

  .voice-dropdown:hover .voice-player {
      display: none;
  }

  .voice-player:hover {
      display: block !important;
  }


  .voice-link:focus + .voice-player,
  .voice-player:focus-within {
      display: block;
  }


  .voice-dropdown.active .voice-player {
      display: block;
  }

  .dark .voice-player {
      background: #333;
      border-color: #555;
      color: #fff;
      box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  }

  .close-player {
      position: absolute;
      top: 5px;
      right: 5px;
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;
  }

  .player-links {
      margin-top: 15px;
  }

  .copyLink {
      position: relative;
      display: inline-block;
      vertical-align: middle;
      -webkit-tap-highlight-color: transparent;
    /*   touch-action: manipulation;
      user-select: none;
      -webkit-user-select: none;
      -webkit-touch-callout: none; */
  }

  .copyLink::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: -2px;
      bottom: -2px;
      background-color: transparent;
      transition: 
          background-color 0.5s ease-out,
          box-shadow 0.5s ease-out,
          opacity 0.5s ease-out,
          top 0.3s ease-out,
          bottom 0.3s ease-out,
          left 0.3s ease-out,
          right 0.3s ease-out;
      border-radius: 3px;
      opacity: 0;
      pointer-events: none;
  }

  /* Для десктопов - hover */
  @media (hover: hover) {
      .copyLink:hover::after {
          background-color: rgba(19, 104, 87, 0.8); /* Полупрозрачный вариант */
          top: -3px;
          bottom: -3px;
          left: -3px;
          right: -3px;
          box-shadow: 0 0 4px rgba(19, 104, 87, 0.5);
          opacity: 1;
      }
  }

  /* Яркое подтверждение при касании */
  .copyLink:active::after {
      background-color: #136857; /* Полностью непрозрачный */
      box-shadow: 0 0 8px rgba(19, 104, 87, 0.8); /* Ярче свечение */
      top: -4px;
      bottom: -4px;
      left: -4px;
      right: -4px;
      opacity: 1;
      transition: 
          background-color 0.1s ease-out,
          box-shadow 0.1s ease-out,
          top 0.1s ease-out,
          bottom 0.1s ease-out,
          left 0.1s ease-out,
          right 0.1s ease-out; /* Очень быстрое появление */
  }

  /* Для тач-устройств - фокус после касания */
  .copyLink:focus::after {
      background-color: rgba(19, 104, 87, 0.6);
      top: -3px;
      bottom: -3px;
      left: -3px;
      right: -3px;
      box-shadow: 0 0 4px rgba(19, 104, 87, 0.5);
      opacity: 1;
      outline: none;
      transition-duration: 0.5s; /* Медленное затухание */
  }

  /* Убираем фокус для мыши */
  @media (hover: hover) {
      .copyLink:focus::after {
          background-color: transparent;
          box-shadow: none;
          opacity: 0;
      }
  }



  /* Firefox-specific styles */
  @-moz-document url-prefix() {
    .voice-player {
      display: none;
      position: fixed;
      top: 25%;
      left: 50%;
      transform: translateX(-50%);
      background: white;
      padding: 20px;
      border: 1px solid #ddd;
      z-index: 1000;
      min-width: 350px;
      max-width: 90vw;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      border-radius: 24px;
    }

    .voice-dropdown.active .voice-player {
      display: block;
    }

    .dark .voice-player {
      background: #333;
      border-color: #555;
      color: #fff;
      box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    }

    /* Улучшение для Firefox Mobile */
    .voice-link:focus {
      outline: none;
    }
  }

  /* Общие улучшения для всех браузеров */
  .voice-player {
    white-space: nowrap; /* Предотвращаем перенос строк */
  }

  .player-links {
    display: inline-block;
    margin-top: 10px;
  }

  .player-links a {
    margin: 0 5px;
    white-space: nowrap;
  }

  /* Для мобильных устройств - делаем окно уже */
  @media (max-width: 480px) {
    .voice-player {
      min-width: 280px;
      padding: 15px;
      white-space: normal;
    }

    .player-links {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 5px;
    }

    .player-links a {
      margin: 2px;
    }
  }

  /* Делаем родительские элементы контекстом для позиционирования */
  .pli-lang, .rus-lang, .eng-lang, .variant {
    position: relative;
  }


  p .copyLink,
  p .copyLink-start {
      font-size: 1.2em; /* или другой желаемый размер */
  }

  a.copyLink::before,
  a.copyLink-start::before {
    content: '✦';
  }

  .copyLink {
        opacity: 0;
  }

  .copyLink-start {
      position: absolute;
      top: -0.2em;
      left: -1.0em;

      color: inherit;
      opacity: 0;
      text-decoration: none;
      cursor: pointer;
      transition: opacity 0.3s ease;
  }
  .copyLink:hover,
  .copyLink:focus,
  .copyLink-start:hover,
  .copyLink-start:focus {
      opacity: 0.9;
  }

  h1.sutta-title > span,
  header ul li > span {
    position: relative;
  /*  display: inline-block; */
    vertical-align: top; 
  }

