/***************************************************
 *  MYSTYLES.CSS — ТЁМНАЯ СХЕМА С ФИКСИРОВАННЫМ МЕНЮ
 ***************************************************/

/*--------------------------------------
  1. ШРИФТЫ
--------------------------------------*/

@font-face {
  font-family: "et-book";
  src: url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff") format("woff"),
       url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "et-book";
  src: url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff") format("woff"),
       url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "et-book";
  src: url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff") format("woff"),
       url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}


/*--------------------------------------
  2. БАЗА ДОКУМЕНТА И ПЕРЕМЕННЫЕ
--------------------------------------*/

:root{
  /* ширина левой панели */
  --sidebar-w: 290px;

  /* основная тёмная тема (по умолчанию) */
  --bg:#0b0f19;
  --surface:#121826;
  --text:#e5e7eb;
  --text-weak:#a7b0be;
  --border:#1f2837;
  --brand:#485fc7;
  --brand-contr:#ffffff;
  --hover:#1a2233;
  --active:#1f2a40;

  /* цвет заголовков (можно переопределять темами) */
  --heading:#ffffff;
}



/* жёстко задаём нашу палитру, игнорируя системный light/dark */
html, body{
  margin:0;
  padding:0;
  background: var(--bg);
  color: var(--text);
  font-family: "et-book", Georgia, serif;
}

/* чтобы футер можно было прижать книзу */
body{
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

/* контейнер Bulma — без белых подложек */
.section, .box, .card, .hero, .container{
  background:transparent;
  color:var(--text);
}

/* ссылки и элементы формы в общей тональности */
a{ color:var(--brand); }
.button.is-link{
  background:var(--brand);
  border-color:var(--brand);
  color:var(--brand-contr);
}
.content a:hover{
  text-decoration: underline;
   color: var(--brand); 
}

.input, .textarea, .select select{
  background:var(--surface);
  border-color:var(--border);
  color:var(--text);
}
.input::placeholder,
.textarea::placeholder{
  color:var(--text-weak);
}
.input:focus, .textarea:focus, .select select:focus{
  border-color:var(--brand);
  box-shadow:none;
  outline:2px solid var(--brand);
}
.table, .table td, .table th{
  border-color:var(--border);
  color:var(--text);
}
hr{ background:var(--border); }

/* заголовки — всегда контрастные */
.title, .subtitle,
h1,h2,h3,h4,h5,h6,
.content h1, .content h2, .content h3{
  color:var(--heading) !important;
  opacity:1 !important;
}
.title strong{ color:var(--heading) !important; }


/*--------------------------------------
  3. ЛЕВАЯ ФИКСИРОВАННАЯ ПАНЕЛЬ
--------------------------------------*/

/* панель во всю высоту окна */
.app-sidebar{
  
  position:fixed;
  left:0;
  top:0;
  width:var(--sidebar-w);
  height:100vh;
  overflow-y:auto;
  
  /* top right bottom left */
  padding:16px 0 16px 12px;  
  /* padding:16px 12px; */

  font-size: 1.2rem;   /* left menu text size */

  background: var(--surface);
  border-right:1px solid var(--border);
  color:var(--text-weak);

  z-index:1000;

  font-family:Georgia, "Times New Roman", serif;
}

/* подпись меню */
.menu-label{
  color:var(--text-weak);
  letter-spacing:.03em;
  text-transform:none;
}

/* основной контент, смещённый вправо на ширину меню */
.app-content{
  margin-left:var(--sidebar-w);
  min-height:100vh;

  flex:1;
  display:flex;
  flex-direction:column;
}

/* контейнер Bulma чуть уже, чтобы текст не растекался */
.container{ max-width:1100px; }



/* крупный блок вверху боковой панели — название сайта / логотип */
.app-brand{
  min-height: 80px;                /* высота «кусочка», можно 90–100 */
  display:flex;
  flex-direction:column;
  justify-content:center;

  padding: 8px 0 16px 12px;        /* внутри: слева 12px, как у меню */
  margin-bottom: 12px;             /* отступ вниз до первого пункта */

  border-bottom: 1px solid var(--border);
}

/* основное название */
.app-brand__title{
  font-size: 1.2rem;               /* покрупнее, чем пункты меню */
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand);             /* или var(--text), если не нужен акцент */
}

/* необязательная строка помельче */
.app-brand__subtitle{
  margin-top: 4px;
  font-size: .8rem;
  color: var(--text-weak);
}

/* Mobile menu    - верхняя панель (видна только на телефоне) */
.app-topbar{
  display:none;                 /* по умолчанию скрыта; показываем в media ниже */
}

/* иконка-гамбургер: «квадрат» с тремя полосками */
.app-topbar__toggle{
  border:0;
  background:transparent;
  padding:6px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.app-topbar__toggle span{
  display:block;
  width:20px;
  height:2px;
  background:var(--text);
}

/* скрытый чекбокс-переключатель меню */
.app-menu-toggle{
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  border:0;
  clip:rect(0,0,0,0);
  overflow:hidden;
}




/*--------------------------------------
  4. ПУНКТЫ МЕНЮ — БЕЗ АНИМАЦИЙ
--------------------------------------*/

/* базовый вид ссылок меню */
.menu-list a{
  display:block;
  padding:12px 40px; /* ← размер кнопок по высоте и ширине */  
  border-radius: 8px 0 0 8px;  /*  скругление подстветки сверху-слева, сверху-справа, снизу-справа, снизу-слева */
  color:#d0d0d0;
  text-decoration:none;

  /* без всяких transition — отклик мгновенный */
}

/* наведение / фокус: лишь смена фона и цвета текста */
.menu-list a:hover,
.menu-list a:focus{
  background:#2a2a2a;
    /* background:transparent; */
  color:#ffffff;
}

/* фокус только для клавиатуры (Tab) */
.menu-list a:focus-visible{
  background:#2a2a2a;
  color:#fff;
  outline:2px solid var(--brand);
  outline-offset:2px;
}

/* активный пункт: прямоугольник и жирный шрифт,
   без цветной дуги слева, как вы и желаете */
.menu-list .is-active > a{
  font-weight:700;
  background:#2f3542;
  color:#ffffff;
}




/*--------------------------------------
  5. ПОДМЕНЮ НА <details>/<summary>
--------------------------------------*/

/* заголовок подменю в боковом меню */
.menu-summary{
  cursor:pointer;
  user-select:none;
  padding:8px 10px;
  border-radius:8px;
  color:#c7c7c7;
  background:transparent;
}

/* открытое подменю — тёмный прямоугольник */
.menu-details[open] > .menu-summary{
  background:#2f3542;
  color:#ffffff;
}


/*--------------------------------------
  6. ТИПОГРАФИКА И «ПОЛОСА НАБОРА»
--------------------------------------*/

/* читабельная колонка текста   twidth*/
.readable{
  max-width:140ch; 
  margin-left:auto;
  margin-right:auto;
  line-height:1.7;
}

/* дополнительно: чуть более широкая мера для таблиц и пр. */
.measure-wide{
  max-width:100ch;
  margin-inline:auto;
}

/* выравнивание по ширине и переносы */
.content{ line-height:1.7; }
.content p{
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
}


  /*  __textsize - size of the all text */
.content p,
.content li,
.content dt,
.content dd{
  font-size:1.16rem;
}

/* ссылки отдельным font-size можно вообще не трогать:
   по умолчанию они и так наследуют размер от родителя */
.content p a,
.content li a,
.content dt a,
.content dd a{
  font-size:1em; /* можно убрать, это то же самое, что наследовать */
}




/* картинка той же ширины, что текст */
.image--narrow{

  /* margin:1rem auto; */

  max-width:500px;      /* подправьте под свой вкус */
  margin:1rem 0;       /* без auto → прижмётся влево, как текст*/
}





.image--narrow img{
  display:block;
  width:100%;
  height:auto;
  border-radius:8px;
  background:var(--surface);
  border:1px solid var(--border);
}
.image--narrow figcaption{
  text-align:center;
  opacity:.8;
  margin-top:.4rem;
}


/*--------------------------------------
  7. ТАБЛИЦЫ ЦЕН (PRICE TABLE)
--------------------------------------*/

/* убираем фон у таблицы, оставляем только границы */
.price-table,
.price-table thead,
.price-table tbody,
.price-table tr,
.price-table th,
.price-table td{
  background-color:transparent !important;
}

/* на всякий случай отключаем ховеры/зебру */
.price-table.is-hoverable tbody tr:hover,
.price-table.is-striped tbody tr:nth-child(even){
  background-color:transparent !important;
}

/* рамки вокруг ячеек */
.price-table th,
.price-table td{
  border-color:#b5b5b5 !important;
  border-width:1px !important;
}

/* ширина отдельных колонок */
.price-table .col-price{ width:14ch; }
.price-table .col-work{  width:auto; }

/* шапка таблицы — лёгкий, не кричащий текст */
.content .table.price-table thead th{
  font-weight:300 !important;
  color:#dfe0ebc0 !important;
  background:transparent !important;
}


/*--------------------------------------
  8. ФУТЕР
--------------------------------------*/

/* прижатие футера к низу страницы */
.app-content{
  flex:1;
}

/* оболочка футера */
.footer.app-footer{
  margin-top:auto;
  margin-left:var(--sidebar-w);

  background:transparent !important;
  border-top:1px solid rgba(255,255,255,.10);
  color:inherit;
  padding:2rem 0 1.25rem;  /*1st number is padding from horiz line __footer*/

  /*padding: 2rem clamp(12px, 2.2vw, 32px) 1.25rem;*/
  
}

/* ссылки футера */
.footer.app-footer a{
  color:inherit;
  opacity:.9;
  text-decoration:none;
}
.footer.app-footer a:hover{
  opacity:1;
  text-decoration:underline;
}
.footer.app-footer hr{
  height:1px;
  border:0;
  background:rgba(255,255,255,.15);
}

/* внутренний контейнер футера по ширине контента */
.app-footer__inner{
  max-width:1200px;
  margin-inline:auto;
}

/* сетка: контакты + логотипы */
.app-footer__grid{
  display:grid;
  grid-template-columns:1fr 2fr;
  gap:1rem 1.5rem;
  align-items:center;
}



/*  ******    MOBILE ************ */
@media (max-width: 768px){

  /* верхняя полоска */
  .app-topbar{
  position:fixed;
  left:0; top:0; right:0;
  height:52px;
  padding:0 12px;
  background:var(--surface);
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  
  /* justify-content:center;   центрируем заголовок */
  justify-content:flex-start;;  
  
  
  z-index:1100;
}

.app-topbar__brand{
  font-weight:700;
  font-size:1.05rem;
  letter-spacing:.06em;
  color:var(--brand);
  

  margin-left:50px /* ofset of site_name in the top*/ 
}

/* квадрат-меню фиксируем слева */
.app-topbar__toggle{
  border:0;
  background:transparent;
  padding:6px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:4px;

  position:absolute;
  left:12px;
}

  /* dont show upper left logo */
  .app-brand{
    display:none;
  }

  /* боковое меню прячем */
  .app-sidebar{
    top:52px;
    height:calc(100vh - 52px);
    transform:translateX(-100%);
    transition:transform .18s ease-out;
    box-shadow:3px 0 12px rgba(0,0,0,.4);
  }

  /* чекбокс открыт → меню выехало */
  #menu-toggle:checked ~ .app-sidebar{
    transform:translateX(0);
  }

  /* основной контент: без отступа слева, с отступом сверху под топбар */
  .app-content{
    margin-left:0;
    padding-top:52px;
  }

  /* футер: без левого отступа и БЕЗ margin-top:auto */
  .footer.app-footer{
    margin-left:0;
    margin-top:1.5rem;      /* можно 0, если хотите вплотную к контенту */
  }

  /* чтобы футер не прилипал к краям на телефоне */
  .app-footer__inner{
    padding-inline:1rem;
  }

  /* сетка футера в один столбец – контакты над логотипами */
  .app-footer__grid{
    grid-template-columns:1fr;
    gap:1.25rem;
  }


  /* секция компактнее */
  .section{
    padding:1.25rem 1rem 2rem;
  }
}

/* по умолчанию ширма не видна */
.app-overlay{
  display:none;
}

.footer.app-footer .app-footer__inner{
  padding-left: 12px;
  padding-right: 10px;
  box-sizing: border-box;
}


/* мобильный вид */
@media (max-width: 768px){

  .app-overlay{
    position:fixed;
    left:0;
    right:0;
    top:52px;          /* ровно под верхней полосой */
    bottom:0;
    background:rgba(0,0,0,.45);  /* затемнение фона */
    z-index:900;
  }

  /* пока чекбокс не включён — ширму скрываем */
  #menu-toggle:not(:checked) ~ .app-overlay{
    display:none;
  }

  /* чекбокс включён → ширма включается */
  #menu-toggle:checked ~ .app-overlay{
    display:block;
  }
}






/* блок контактов */
.app-footer__brand{
  display:block;
  font-weight:700;
  margin-bottom:.25rem;
}
.app-footer__contacts p{
  margin:.15rem 0;
}

/* логотипы партнёров */
.app-footer-logos{
  list-style:none;
  margin:0;
  padding:0;

  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(160px,1fr));
  gap:1rem 1.25rem;
  align-items:center;
  justify-items:center;
  justify-content: end;
}

.app-footer-logos li:nth-child(1){
  margin-right: 220px;
}



.app-footer-logos img{
  height:78px;
  width:auto;
  display:block;
  opacity:.9;
  filter:grayscale(100%);
}
.app-footer-logos a:hover img{
  opacity:1;
  filter:none;
}

/* нижняя строка футера */
.app-footer__bottom{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem 1rem;
  justify-content:space-between;
  font-size:.9rem;
}
.app-footer__bottom .sep{
  opacity:.6;
}

/* скрытый, но доступный заголовок */
.is-sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}


/*--------------------------------------
  9. АЛЬТЕРНАТИВНЫЕ ТЁМНЫЕ ТЕМЫ
  (переключаются через data-theme на <html>)
--------------------------------------*/

/* строгий почти ч/б */
html[data-theme="onyx-dark"]{
  --bg:#0a0a0a;
  --surface:#121212;
  --text:#ffffff;
  --text-weak:#d1d5db;
  --border:#262626;
  --brand:#ffffff;
  --hover:#1b1b1b;
  --active:#232323;
  --heading:#ffffff;
}

/* океаническая, с голубым акцентом */
html[data-theme="ocean-dark"]{
  --bg:#0a1220;
  --surface:#0f192b;
  --text:#ffffff;
  --text-weak:#cfe1ff;
  --border:#1b2a45;
  --brand:#3aa6ff;
  --hover:#14213a;
  --active:#1a2a45;
  --heading:#ffffff;
}

/* лесная зелёная */
html[data-theme="forest-dark"]{
  --bg:#0c1510;
  --surface:#111b15;
  --text:#ffffff;
  --text-weak:#cfead9;
  --border:#1b2a22;
  --brand:#22c55e;
  --hover:#14231a;
  --active:#193022;
  --heading:#ffffff;
}

/* янтарно-оранжевая */
html[data-theme="ember-dark"]{
  --bg:#100c09;
  --surface:#17100c;
  --text:#ffffff;
  --text-weak:#f3e2d4;
  --border:#2a1c12;
  --brand:#f59e0b;
  --hover:#1a130e;
  --active:#22170f;
  --heading:#ffffff;
}

/* фиолетовая */
html[data-theme="violet-dark"]{
  --bg:#0d0b15;
  --surface:#141126;
  --text:#ffffff;
  --text-weak:#e0dbff;
  --border:#221e3a;
  --brand:#8b5cf6;
  --hover:#171334;
  --active:#1f1848;
  --heading:#ffffff;
}

/* розовая / малиновая */
html[data-theme="rose-dark"]{
  --bg:#130a0f;
  --surface:#1b0f17;
  --text:#ffffff;
  --text-weak:#ffd9e3;
  --border:#301825;
  --brand:#f43f5e;
  --hover:#21131b;
  --active:#2b1823;
  --heading:#ffffff;
}

/* бирюзовая (неоновая) — та, что у вас сейчас стоит */
html[data-theme="cyan-dark"]{
  --bg:#071015;
  --surface:#0a1620;
  --text:#ffffff;
  --text-weak:#c6f6ff;
  --border:#122433;
  --brand:#06b6d4;
  --hover:#0d1d28;
  --active:#112535;
  --heading:#ffffff;
}

/* золото на чёрном */
html[data-theme="gold-dark"]{
  --bg:#0f0f0a;
  --surface:#16160f;
  --text:#ffffff;
  --text-weak:#fff2cc;
  --border:#2a2a1a;
  --brand:#facc15;
  --hover:#1c1c12;
  --active:#232316;
  --heading:#ffffff;
}


/* убираем квадратный подсвет при тапе на ссылку меню (android/chrome и проч.) */
.app-sidebar .menu-list a{
  -webkit-tap-highlight-color: transparent;
}

/* одинаковое скругление во всех состояниях */
.app-sidebar .menu-list a,
.app-sidebar .menu-list a:hover,
.app-sidebar .menu-list a:focus,
.app-sidebar .menu-list a:active{
  border-radius:8px 0 0 8px;
}

/* то же самое для активного пункта */
.app-sidebar .menu-list .is-active > a,
.app-sidebar .menu-list .is-active > a:hover,
.app-sidebar .menu-list .is-active > a:focus,
.app-sidebar .menu-list .is-active > a:active{
  border-radius:8px 0 0 8px;
  background:#2f3542;
  color:#ffffff;
}



/* --------------------------------------
   ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКА EN / DE
-------------------------------------- */

/* LANGUAGE SWITCH – SINGLE PILL BUTTON */
.lang-switch{
  position:fixed;
  top:18px;
  /* right:20px; */
  right:max(12px, env(safe-area-inset-right));
  z-index:1200;
}

/* сама кнопкаxxx */
.lang-switch__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-width:2.6rem;
  height:2.5rem;
  padding:0 1.1rem;

  border-radius:999px;
  border:0px solid var(--border);
  background:var(--surface);

  color:var(--text);
  font-family:"et-book", Georgia, serif;
  font-size:0.9rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  text-decoration:none;
  line-height:1;

    width:50px;
      height:30px;
      padding:0; 
      min-width:44px; 
}

.lang-switch__btn:hover{
  background:var(--hover);
  color:var(--text);
    font-weight:bold;          
}

@media (min-width: 769px){
  .app-content{
    padding-right:50px;  /* 44 кнопка + отступы */
    box-sizing:border-box;
  }

}



/* на телефоне чуть меньше и ближе к краю */
@media (max-width: 768px){
  .lang-switch{
    top:8px;
    right:10px;
  }
  .lang-switch__btn{
    height:1.9rem;
    padding:0 0.7rem;
    font-size:0.8rem;
  }
}



/* ===== ГАЛЕРЕЯ САМОДЕЯТЕЛЬНОСТИ ===== */

/* Картинки не шире текстовой колонки */
.gallery{
  max-width: var(--text-width);
  margin: 1.5rem auto 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* четыре превью в ряд на широком экране */
.gallery__item{
  flex: 0 0 calc(25% - 0.75rem);
  border-radius: 6px; /* скругление превью*/ 
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.gallery__item img{
  display: block;
  width: 100%;
  /* height: 150px; */
    /* object-fit: cover; */
  
    height: auto;        /* вместо фиксированных 150px */
  object-fit: contain;


}

.gallery__item:hover{
  border-color: var(--brand);
}

/* на планшете — по три в ряд, на телефоне — по две */
@media (max-width: 900px){
  .gallery__item{ flex-basis: calc(33.333% - 0.75rem); }
}
@media (max-width: 600px){
  .gallery__item{ flex-basis: calc(50% - 0.75rem); }
}

/* Пагинация в духе: 1 … 4 5 6 … 15 */

.gallery-pagination{
  max-width: var(--text-width);
  margin: 0 auto 2rem;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  align-items: center;
  font-size: 1.1rem;
}

.gallery-pagination a,
.gallery-pagination span{
  display: inline-block;
  padding: 0.25rem 0.4rem;
  text-align: center;
  border: none;
  background: transparent;

  width: 2.4rem;                     /* ВАЖНО: фиксированная ширина */
  font-variant-numeric: tabular-nums;/* ровные цифры, если шрифт умеет */
}

.gallery-pagination a{
  text-decoration: none;
  color: var(--text-weak);
  font-weight: 400;
}
.gallery-pagination a:hover{
  font-weight: 400;
  text-decoration: underline;  
  /* border: 2px solid var(--border); */
}

.gallery-pagination .is-current{
  background: transparent;
  /* border-color: var(--brand); */
  text-decoration: underline;  
  color: var(--brand-contr);
  font-weight: 600;
  /* border-bottom: 1px solid var(--brand); */
}

.gallery-pagination span{
  border: none;
  padding: 0 0.2rem;
}

/* «Предыдущая» / «Следующая» */
.gallery-pagination__nav{
  width: auto;        /* слова по естественной ширине */
  min-width: 8rem;    /* чтобы оба слова занимали одинаковое место */
  text-align: center;
  font-weight: 400;

}

/* неактивные – побледневшие и без клика */
.gallery-pagination__nav--disabled{
  opacity: .4;
  pointer-events: none;
  
}

.gallery-pagination__placeholder{
  min-width: 2.4rem;  /* такая же ширина, как у цифр */
  display: inline-block;
  visibility: hidden; /* места занимает, но не видна */
}



/* Full view */

/* ===== FULL VIEW: картинка + описание сбоку ===== */

/***************************************************
 *  MYSTYLES.CSS — ТЁМНАЯ СХЕМА С ФИКСИРОВАННЫМ МЕНЮ
 ***************************************************/

/*--------------------------------------
  1. ШРИФТЫ
--------------------------------------*/

@font-face {
  font-family: "et-book";
  src: url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff") format("woff"),
       url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "et-book";
  src: url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff") format("woff"),
       url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "et-book";
  src: url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff") format("woff"),
       url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}


/*--------------------------------------
  2. БАЗА ДОКУМЕНТА И ПЕРЕМЕННЫЕ
--------------------------------------*/

:root{
  /* ширина левой панели */
  --sidebar-w: 290px;

  /* основная тёмная тема (по умолчанию) */
  --bg:#0b0f19;
  --surface:#121826;
  --text:#e5e7eb;
  --text-weak:#a7b0be;
  --border:#1f2837;
  --brand:#485fc7;
  --brand-contr:#ffffff;
  --hover:#1a2233;
  --active:#1f2a40;

  /* цвет заголовков (можно переопределять темами) */
  --heading:#ffffff;
}



/* жёстко задаём нашу палитру, игнорируя системный light/dark */
html, body{
  margin:0;
  padding:0;
  background: var(--bg);
  color: var(--text);
  font-family: "et-book", Georgia, serif;
}

/* чтобы футер можно было прижать книзу */
body{
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

/* контейнер Bulma — без белых подложек */
.section, .box, .card, .hero, .container{
  background:transparent;
  color:var(--text);
}

/* ссылки и элементы формы в общей тональности */
a{ color:var(--brand); }
.button.is-link{
  background:var(--brand);
  border-color:var(--brand);
  color:var(--brand-contr);
}
.content a:hover{
  text-decoration: underline;
   color: var(--brand); 
}

.input, .textarea, .select select{
  background:var(--surface);
  border-color:var(--border);
  color:var(--text);
}
.input::placeholder,
.textarea::placeholder{
  color:var(--text-weak);
}
.input:focus, .textarea:focus, .select select:focus{
  border-color:var(--brand);
  box-shadow:none;
  outline:2px solid var(--brand);
}
.table, .table td, .table th{
  border-color:var(--border);
  color:var(--text);
}
hr{ background:var(--border); }

/* заголовки — всегда контрастные */
.title, .subtitle,
h1,h2,h3,h4,h5,h6,
.content h1, .content h2, .content h3{
  color:var(--heading) !important;
  opacity:1 !important;
}
.title strong{ color:var(--heading) !important; }


/*--------------------------------------
  3. ЛЕВАЯ ФИКСИРОВАННАЯ ПАНЕЛЬ
--------------------------------------*/

/* панель во всю высоту окна */
.app-sidebar{
  
  position:fixed;
  left:0;
  top:0;
  width:var(--sidebar-w);
  height:100vh;
  overflow-y:auto;
  
  /* top right bottom left */
  padding:16px 0 16px 12px;  
  /* padding:16px 12px; */

  font-size: 1.2rem;   /* left menu text size */

  background: var(--surface);
  border-right:1px solid var(--border);
  color:var(--text-weak);

  z-index:1000;

  font-family:Georgia, "Times New Roman", serif;
}

/* подпись меню */
.menu-label{
  color:var(--text-weak);
  letter-spacing:.03em;
  text-transform:none;
}

/* основной контент, смещённый вправо на ширину меню */
.app-content{
  margin-left:var(--sidebar-w);
  min-height:100vh;

  flex:1;
  display:flex;
  flex-direction:column;
}

/* контейнер Bulma чуть уже, чтобы текст не растекался */
.container{ max-width:1100px; }



/* крупный блок вверху боковой панели — название сайта / логотип */
.app-brand{
  min-height: 80px;                /* высота «кусочка», можно 90–100 */
  display:flex;
  flex-direction:column;
  justify-content:center;

  padding: 8px 0 16px 12px;        /* внутри: слева 12px, как у меню */
  margin-bottom: 12px;             /* отступ вниз до первого пункта */

  border-bottom: 1px solid var(--border);
}

/* основное название */
.app-brand__title{
  font-size: 1.2rem;               /* покрупнее, чем пункты меню */
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand);             /* или var(--text), если не нужен акцент */
}

/* необязательная строка помельче */
.app-brand__subtitle{
  margin-top: 4px;
  font-size: .8rem;
  color: var(--text-weak);
}

/* Mobile menu    - верхняя панель (видна только на телефоне) */
.app-topbar{
  display:none;                 /* по умолчанию скрыта; показываем в media ниже */
}

/* иконка-гамбургер: «квадрат» с тремя полосками */
.app-topbar__toggle{
  border:0;
  background:transparent;
  padding:6px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.app-topbar__toggle span{
  display:block;
  width:20px;
  height:2px;
  background:var(--text);
}

/* скрытый чекбокс-переключатель меню */
.app-menu-toggle{
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  border:0;
  clip:rect(0,0,0,0);
  overflow:hidden;
}




/*--------------------------------------
  4. ПУНКТЫ МЕНЮ — БЕЗ АНИМАЦИЙ
--------------------------------------*/

/* базовый вид ссылок меню */
.menu-list a{
  display:block;
  padding:12px 40px; /* ← размер кнопок по высоте и ширине */  
  border-radius: 8px 0 0 8px;  /*  скругление подстветки сверху-слева, сверху-справа, снизу-справа, снизу-слева */
  color:#d0d0d0;
  text-decoration:none;

  /* без всяких transition — отклик мгновенный */
}

/* наведение / фокус: лишь смена фона и цвета текста */
.menu-list a:hover,
.menu-list a:focus{
  background:#2a2a2a;
  color:#ffffff;
}

/* активный пункт: прямоугольник и жирный шрифт,
   без цветной дуги слева, как вы и желаете */
.menu-list .is-active > a{
  font-weight:700;
  background:#2f3542;
  color:#ffffff;
}




/*--------------------------------------
  5. ПОДМЕНЮ НА <details>/<summary>
--------------------------------------*/

/* заголовок подменю в боковом меню */
.menu-summary{
  cursor:pointer;
  user-select:none;
  padding:8px 10px;
  border-radius:8px;
  color:#c7c7c7;
  background:transparent;
}

/* открытое подменю — тёмный прямоугольник */
.menu-details[open] > .menu-summary{
  background:#2f3542;
  color:#ffffff;
}


/*--------------------------------------
  6. ТИПОГРАФИКА И «ПОЛОСА НАБОРА»
--------------------------------------*/

/* читабельная колонка текста   twidth*/
.readable{
  max-width:140ch; 
  margin-left:auto;
  margin-right:auto;
  line-height:1.7;
}

/* дополнительно: чуть более широкая мера для таблиц и пр. */
.measure-wide{
  max-width:100ch;
  margin-inline:auto;
}

/* выравнивание по ширине и переносы */
.content{ line-height:1.7; }
.content p{
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
}


  /*  __textsize - size of the all text */
.content p,
.content li,
.content dt,
.content dd{
  font-size:1.03rem;
}

/* ссылки отдельным font-size можно вообще не трогать:
   по умолчанию они и так наследуют размер от родителя */
.content p a,
.content li a,
.content dt a,
.content dd a{
  font-size:1em; /* можно убрать, это то же самое, что наследовать */
}




/* картинка той же ширины, что текст */
.image--narrow{

  /* margin:1rem auto; */

  max-width:500px;      /* подправьте под свой вкус */
  margin:1rem 0;      /* без auto → прижмётся влево, как текст*/
}





.image--narrow img{
  display:block;
  width:100%;
  height:auto;
  border-radius:8px;
  background:var(--surface);
  border:1px solid var(--border);
}
.image--narrow figcaption{
  text-align:center;
  opacity:.8;
  margin-top:.4rem;
}


/*--------------------------------------
  7. ТАБЛИЦЫ ЦЕН (PRICE TABLE)
--------------------------------------*/

/* убираем фон у таблицы, оставляем только границы */
.price-table,
.price-table thead,
.price-table tbody,
.price-table tr,
.price-table th,
.price-table td{
  background-color:transparent !important;
}

/* на всякий случай отключаем ховеры/зебру */
.price-table.is-hoverable tbody tr:hover,
.price-table.is-striped tbody tr:nth-child(even){
  background-color:transparent !important;
}

/* рамки вокруг ячеек */
.price-table th,
.price-table td{
  border-color:#b5b5b5 !important;
  border-width:1px !important;
}

/* ширина отдельных колонок */
.price-table .col-price{ width:14ch; }
.price-table .col-work{  width:auto; }

/* шапка таблицы — лёгкий, не кричащий текст */
.content .table.price-table thead th{
  font-weight:300 !important;
  color:#dfe0ebc0 !important;
  background:transparent !important;
}


/*--------------------------------------
  8. ФУТЕР
--------------------------------------*/

/* прижатие футера к низу страницы */
.app-content{
  flex:1;
}

/* оболочка футера */
.footer.app-footer{
  margin-top:auto;
  margin-left:var(--sidebar-w);

  background:transparent !important;
  border-top:1px solid rgba(255,255,255,.10);
  color:inherit;
  padding:2rem 0 1.25rem;  /* 1st number is padding from horiz line __footer*/
}

/* ссылки футера */
.footer.app-footer a{
  color:inherit;
  opacity:.9;
  text-decoration:none;
}
.footer.app-footer a:hover{
  opacity:1;
  text-decoration:underline;
}
.footer.app-footer hr{
  height:1px;
  border:0;
  background:rgba(255,255,255,.15);
}

/* внутренний контейнер футера по ширине контента */
.app-footer__inner{
  max-width:1200px;
  margin-inline:auto;
}

/* сетка: контакты + логотипы */
.app-footer__grid{
  display:grid;
  grid-template-columns:1fr 2fr;
  gap:1rem 1.5rem;
  align-items:center;
}



/*  ******    MOBILE ************ */
@media (max-width: 768px){

  /* верхняя полоска */
  .app-topbar{
  position:fixed;
  left:0; top:0; right:0;
  height:52px;
  padding:0 12px;
  background:var(--surface);
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  
  /* justify-content:center;   центрируем заголовок */
  justify-content:flex-start;;  
  
  
  z-index:1100;
}

.app-topbar__brand{
  font-weight:700;
  font-size:1.05rem;
  letter-spacing:.06em;
  color:var(--brand);
  

  margin-left:50px /* ofset of site_name in the top*/ 
}

/* квадрат-меню фиксируем слева */
.app-topbar__toggle{
  border:0;
  background:transparent;
  padding:6px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:4px;

  position:absolute;
  left:12px;
}

  /* dont show upper left logo */
  .app-brand{
    display:none;
  }

  /* боковое меню прячем */
  .app-sidebar{
    top:52px;
    height:calc(100vh - 52px);
    transform:translateX(-100%);
    transition:transform .18s ease-out;
    box-shadow:3px 0 12px rgba(0,0,0,.4);
  }

  /* чекбокс открыт → меню выехало */
  #menu-toggle:checked ~ .app-sidebar{
    transform:translateX(0);
  }

  /* основной контент: без отступа слева, с отступом сверху под топбар */
  .app-content{
    margin-left:0;
    padding-top:52px;
  }

  /* футер: без левого отступа и БЕЗ margin-top:auto */
  .footer.app-footer{
    margin-left:0;
    margin-top:1.5rem;      /* можно 0, если хотите вплотную к контенту */
  }

  /* чтобы футер не прилипал к краям на телефоне */
  .app-footer__inner{
    padding-inline:1rem;
  }

  /* сетка футера в один столбец – контакты над логотипами */
  .app-footer__grid{
    grid-template-columns:1fr;
    gap:1.25rem;
  }


  /* секция компактнее */
  .section{
    padding:1.25rem 1rem 2rem;
  }
}

/* по умолчанию ширма не видна */
.app-overlay{
  display:none;
}

/* мобильный вид */
@media (max-width: 768px){

  .app-overlay{
    position:fixed;
    left:0;
    right:0;
    top:52px;          /* ровно под верхней полосой */
    bottom:0;
    background:rgba(0,0,0,.45);  /* затемнение фона */
    z-index:900;
  }

  /* пока чекбокс не включён — ширму скрываем */
  #menu-toggle:not(:checked) ~ .app-overlay{
    display:none;
  }

  /* чекбокс включён → ширма включается */
  #menu-toggle:checked ~ .app-overlay{
    display:block;
  }
}






/* блок контактов */
.app-footer__brand{
  display:block;
  font-weight:700;
  margin-bottom:.25rem;
}
.app-footer__contacts p{
  margin:.15rem 0;
}

/* логотипы партнёров */
.app-footer-logos{
  list-style:none;
  margin:0;
  padding:0;

  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(110px,1fr));
  gap:1rem 1.25rem;
  align-items:center;
  justify-items:center;
}
.app-footer-logos img{
  height:78px;
  width:auto;
  display:block;
  opacity:.9;
  filter:grayscale(100%);
}
.app-footer-logos a:hover img{
  opacity:1;
  filter:none;
}

/* нижняя строка футера */
.app-footer__bottom{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem 1rem;
  justify-content:space-between;
  font-size:.9rem;
}
.app-footer__bottom .sep{
  opacity:.6;
}

/* скрытый, но доступный заголовок */
.is-sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}


/*--------------------------------------
  9. АЛЬТЕРНАТИВНЫЕ ТЁМНЫЕ ТЕМЫ
  (переключаются через data-theme на <html>)
--------------------------------------*/

/* строгий почти ч/б */
html[data-theme="onyx-dark"]{
  --bg:#0a0a0a;
  --surface:#121212;
  --text:#ffffff;
  --text-weak:#d1d5db;
  --border:#262626;
  --brand:#ffffff;
  --hover:#1b1b1b;
  --active:#232323;
  --heading:#ffffff;
}

/* океаническая, с голубым акцентом */
html[data-theme="ocean-dark"]{
  --bg:#0a1220;
  --surface:#0f192b;
  --text:#ffffff;
  --text-weak:#cfe1ff;
  --border:#1b2a45;
  --brand:#3aa6ff;
  --hover:#14213a;
  --active:#1a2a45;
  --heading:#ffffff;
}

/* лесная зелёная */
html[data-theme="forest-dark"]{
  --bg:#0c1510;
  --surface:#111b15;
  --text:#ffffff;
  --text-weak:#cfead9;
  --border:#1b2a22;
  --brand:#22c55e;
  --hover:#14231a;
  --active:#193022;
  --heading:#ffffff;
}

/* янтарно-оранжевая */
html[data-theme="ember-dark"]{
  --bg:#100c09;
  --surface:#17100c;
  --text:#ffffff;
  --text-weak:#f3e2d4;
  --border:#2a1c12;
  --brand:#f59e0b;
  --hover:#1a130e;
  --active:#22170f;
  --heading:#ffffff;
}

/* фиолетовая */
html[data-theme="violet-dark"]{
  --bg:#0d0b15;
  --surface:#141126;
  --text:#ffffff;
  --text-weak:#e0dbff;
  --border:#221e3a;
  --brand:#8b5cf6;
  --hover:#171334;
  --active:#1f1848;
  --heading:#ffffff;
}

/* розовая / малиновая */
html[data-theme="rose-dark"]{
  --bg:#130a0f;
  --surface:#1b0f17;
  --text:#ffffff;
  --text-weak:#ffd9e3;
  --border:#301825;
  --brand:#f43f5e;
  --hover:#21131b;
  --active:#2b1823;
  --heading:#ffffff;
}

/* бирюзовая (неоновая) — та, что у вас сейчас стоит */
html[data-theme="cyan-dark"]{
  --bg:#071015;
  --surface:#0a1620;
  --text:#ffffff;
  --text-weak:#c6f6ff;
  --border:#122433;
  --brand:#06b6d4;
  --hover:#0d1d28;
  --active:#112535;
  --heading:#ffffff;
}

/* золото на чёрном */
html[data-theme="gold-dark"]{
  --bg:#0f0f0a;
  --surface:#16160f;
  --text:#ffffff;
  --text-weak:#fff2cc;
  --border:#2a2a1a;
  --brand:#facc15;
  --hover:#1c1c12;
  --active:#232316;
  --heading:#ffffff;
}


/* убираем квадратный подсвет при тапе на ссылку меню (android/chrome и проч.) */
.app-sidebar .menu-list a{
  -webkit-tap-highlight-color: transparent;
}

/* одинаковое скругление во всех состояниях */
.app-sidebar .menu-list a,
.app-sidebar .menu-list a:hover,
.app-sidebar .menu-list a:focus,
.app-sidebar .menu-list a:active{
  border-radius:8px 0 0 8px;
}

/* то же самое для активного пункта */
.app-sidebar .menu-list .is-active > a,
.app-sidebar .menu-list .is-active > a:hover,
.app-sidebar .menu-list .is-active > a:focus,
.app-sidebar .menu-list .is-active > a:active{
  border-radius:8px 0 0 8px;
  background:#2f3542;
  color:#ffffff;
}



/* --------------------------------------
   ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКА EN / DE
-------------------------------------- */

/* LANGUAGE SWITCH – SINGLE PILL BUTTON */
.lang-switch{
  position:fixed;
  top:18px;
  right:20px;
  z-index:1200;
}

/* сама кнопкаxxx */
.lang-switch__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-width:2.6rem;
  height:2.5rem;
  padding:0 1.1rem;

  border-radius:999px;
  border:0px solid var(--border);
  background:var(--surface);

  color:var(--text);
  font-family:"et-book", Georgia, serif;
  font-size:0.9rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  text-decoration:none;
  line-height:1;
}

.lang-switch__btn:hover{
  background:var(--hover);
  color:var(--text);
    font-weight:bold;          
}

/* на телефоне чуть меньше и ближе к краю */
@media (max-width: 768px){
  .lang-switch{
    top:8px;
    right:10px;
  }
  .lang-switch__btn{
    height:1.9rem;
    padding:0 0.7rem;
    font-size:0.8rem;
  }
}



/* ===== ГАЛЕРЕЯ САМОДЕЯТЕЛЬНОСТИ ===== */

/* Картинки не шире текстовой колонки */
.gallery{
  max-width: var(--text-width);
  margin: 1.5rem auto 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* четыре превью в ряд на широком экране */
.gallery__item{
  flex: 0 0 calc(25% - 0.75rem);
  border-radius: 6px; /* скругление превью*/ 
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
    aspect-ratio: 1 / 1;
}

.gallery__item img{
  display: block;
  width: 100%;
  /* height: 150px; */
    /* object-fit: cover; */
  
    height: auto;        /* вместо фиксированных 150px */
  object-fit: contain;


}

.gallery__item:hover{
  border-color: var(--brand);
}

/* на планшете — по три в ряд, на телефоне — по две */
@media (max-width: 900px){
  .gallery__item{ flex-basis: calc(33.333% - 0.75rem); }
}
@media (max-width: 600px){
  .gallery__item{ flex-basis: calc(50% - 0.75rem); }
}

/* Пагинация в духе: 1 … 4 5 6 … 15 */

.gallery-pagination{
  max-width: var(--text-width);
  margin: 0 auto 2rem;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  align-items: center;
  font-size: 1.1rem;
}

.gallery-pagination a,
.gallery-pagination span{
  display: inline-block;
  padding: 0.25rem 0.4rem;
  text-align: center;
  border: none;
  background: transparent;

  width: 2.4rem;                     /* ВАЖНО: фиксированная ширина */
  font-variant-numeric: tabular-nums;/* ровные цифры, если шрифт умеет */
}

.gallery-pagination a{
  text-decoration: none;
  color: var(--text-weak);
  font-weight: 400;
}
.gallery-pagination a:hover{
  font-weight: 400;
  text-decoration: underline;  
  /* border: 2px solid var(--border); */
}

.gallery-pagination .is-current{
  background: transparent;
  /* border-color: var(--brand); */
  text-decoration: underline;  
  color: var(--brand-contr);
  font-weight: 600;
  /* border-bottom: 1px solid var(--brand); */
}

.gallery-pagination span{
  border: none;
  padding: 0 0.2rem;
}

/* «Предыдущая» / «Следующая» */
.gallery-pagination__nav{
  width: auto;        /* слова по естественной ширине */
  min-width: 8rem;    /* чтобы оба слова занимали одинаковое место */
  text-align: center;
  font-weight: 400;

}

/* неактивные – побледневшие и без клика */
.gallery-pagination__nav--disabled{
  opacity: .4;
  pointer-events: none;
  
}

.gallery-pagination__placeholder{
  min-width: 2.4rem;  /* такая же ширина, как у цифр */
  display: inline-block;
  visibility: hidden; /* места занимает, но не видна */
}



/* Full view */

/* ===== FULL VIEW: картинка + описание сбоку ===== */

/* ===== FULL VIEW: фото крупно, текст справа ===== */

/* ===== FULL VIEW: фото крупно, текст справа, без жёстких пикселей ===== */

.photo-layout{
  max-width: 1200px;              /* ширина всего блока */
  margin: 1.5rem auto 2rem;       /* центрируем */
  display: flex;
  gap: 4.5rem;
  align-items: flex-start;
}

/* левая колонка: фото + кнопки
   занимаем около половины блока, но с разумными пределами */
.photo-layout__left{
  flex: 0 0 clamp(320px, 50%, 620px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* фото: просто на всю ширину своей колонки */
.photo-view{
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.photo-view img{
  display: block;
  width: 100%;
  height: auto;
  background: transparent;
  border: none;
  border-radius: 0;
}

/* подпись под фото */
.photo-view figcaption{
  text-align: center;
  opacity: .8;
  margin-top: .4rem;
}

/* правая колонка: описание */
.photo-view__desc{
  flex: 1;
  line-height: 1.7;
}

.photo-view__desc p{
  margin: 0 0 .75rem;
}

/* кнопки под фото */
.photo-view__actions{
  margin-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 8rem;
  align-items: center;
  

  align-self: stretch;
}

.photo-view__back-link{
  text-decoration: none;
  color: var(--text-weak);
}

.photo-view__back-link:hover{
  text-decoration: underline;
}

.photo-view__back-link:hover,
.photo-view__back-link:focus{
  text-decoration: underline;
  color: var(--brand);              /* при наведении – тот же лазуревый, что и в .content a:hover */
}



.photo-view__3d{
  text-transform: none;
  font-size: 0.9rem;
  letter-spacing: .03em;
}

/* на телефоне — в один столбец */
@media (max-width: 900px){
  .photo-layout{
    flex-direction: column;
    max-width: var(--text-width);
  }
  .photo-layout__left{
    flex: 0 0 auto;
    width: 100%;
  }
}



/* ===== 3D ВИТРИНА: ОТДЕЛЬНАЯ СЕКЦИЯ ===== */

/* общий блок страницы 3D */
.object3d-container{
  max-width:none;
  width:100%;
  margin:0 auto;
  padding:1.5rem 0 2.5rem;
}

/* оболочка вокруг model-viewer */
.object3d-viewer{
  margin:0;
}

/* само окно 3D */
.object3d-viewer model-viewer{
  display:block;
  width:100%;
  height:clamp(320px, 88vh, 1000px);

  background:#000;
  border-radius:12px;
  box-shadow:0 18px 40px rgba(0,0,0,.55);

  --poster-color:transparent;
}

/* надпись "loading…" на постере */
.mv-poster{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:0.95rem;
  letter-spacing:.06em;
  color:var(--text-weak);
  background:#000;
}

/* описание под окном */
.object3d-desc{
  max-width:80ch;
  margin:1.5rem auto 0;
}

/* мобильная правка */
@media (max-width:768px){
  .object3d-container{
    padding:1rem 0 2rem;
  }

  .object3d-viewer model-viewer{
    height:clamp(260px, 55vh, 420px);
    border-radius:8px;
  }

  .object3d-title{
    text-align:center;
  }

  .object3d-desc{
    padding-inline:0.5rem;
  }
}


/* спец-режим для 3D-страницы: почти полная ширина */
.section-3d{
  padding-left:10px;
  /* padding-right:10px; */
}

.container-3d{
  max-width: none;
  width: 100%;             /* ровно ширина .app-content */
  margin-left: 10px;
  margin-right: 10px;               /* без auto, чтобы не центрировать искусственно */
}


.app-content > .section.section-3d{
  padding: 10px 26px 10px 30px;
  padding-left:12px;
  padding-right:90px;
  padding-top:0px;
}

.app-content > .section.section-3d > .container.container-3d{
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}



/* оболочка вокруг model-viewer */
.object3d-viewer{
  position: relative;   /* чтобы подсказка позиционировалась внутри */
  margin:0;
}

/* маленькая подсказка в углу чёрной зоны */
.object3d-hint{
  position:absolute;
  right:24px;
  bottom:20px;

  max-width: 220px;
  padding:0.35rem 0.6rem;

  font-size:0.8rem;
  line-height:1.4;
  color:var(--text-weak);

  background:rgba(0,0,0,.55);
  border-radius:6px;

  pointer-events:none;  /* чтобы клики и драги шли в model-viewer */
}

/* на телефоне — чуть поменьше и повыше */
@media (max-width:768px){
  .object3d-hint{
    right:12px;
    bottom:12px;
    max-width: 60%;
    font-size:0.7rem;
  }
}

/* ===== МОБИЛЬНЫЙ РЕЖИМ 3D: ПОЧТИ ВО ВЕСЬ ЭКРАН ===== */
@media (max-width: 768px){

  /* убираем горизонтальные паддинги секции и контейнера */
  .app-content > .section.section-3d{
    padding: 0;
  }

  .app-content > .section.section-3d > .container.container-3d{
    margin: 0;
    padding: 0;
    max-width: none !important;
    width: 100% !important;
  }

  /* сам блок под 3D — тоже без внутренних отступов */
  .object3d-container{
    padding: 0;
  }

  /* model-viewer растягиваем почти на всю высоту окна */
  .object3d-viewer model-viewer{
    height: calc(100vh - 52px); /* 52px — высота верхней полосы на мобиле */
    border-radius: 0;
    box-shadow: none;
  }
}




/* контейнер под viewer: даём опорную систему координат */
.object3d-viewer{
  position: relative;
}

/* подсказка в верхнем правом углу ЧЁРНОЙ области */
.object3d-hint{
   font-family: "JetBrains Mono", "Fira Mono", "SF Mono",
               Menlo, Consolas, "Courier New", monospace;
  position: absolute;
  top: 16px;
  /* right: 22px;left: auto; */
  left: 22px;right: auto;
  bottom: auto;

  z-index: 20;
  max-width: 370px;

  padding: 0.35rem 0.6rem;
  font-size: 0.7rem;
  line-height: 1.4;
  text-align: left;

  color: var(--text-weak);
  background: none;
  border-radius: 6px;

  pointer-events: none; /* не мешает вращать модель */
}



.object3d-caption{
  position: absolute;
  top: 16px;
  right: 22px;
  left: auto;
  bottom: auto;

  z-index: 20;

  max-width: 260px;
  padding: 0.3rem 0.6rem;

  font-size: 0.85rem;
  line-height: 1.3;
  letter-spacing: .04em;

  color: var(--text-weak);
  background: none;
  border-radius: 6px;

  pointer-events: none;
  font-family: "Space Mono", monospace;
}



@media (max-width: 768px){

  /* подсказка — слева, не шире половины экрана */
  .object3d-hint{
    top: 10px;
    left: 8px;
    right: auto;

    max-width: 46vw;        /* около половины ширины */
    font-size: 0.68rem;
    line-height: 1.3;
  }

  /* подпись предмета — справа, тоже не шире половины экрана */
  .object3d-caption{
    top: 10px;
    right: 8px;
    left: auto;
    bottom: auto;

    max-width: 46vw;
    font-size: 0.72rem;
    line-height: 1.3;
    text-align: right;       /* выравнивание к правому краю */
  }
}


/* мини-превью 3D в колонке просмотра */

/* мини-превью 3D в колонке просмотра */
.photo-view--3d-preview{
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.photo-view--3d-preview model-viewer{
  display: block;
  width: 100%;
  height: clamp(240px, 45vh, 420px);
  background: #000;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.55);
  --poster-color: transparent;
}

/* постер поменьше, чем на полноэкранной странице */
.mv-poster--preview{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.85rem;
  letter-spacing: .06em;
  color: var(--text-weak);
  background: #000;
}

.photo-view__download{
  margin-top: 1.6rem;
  align-self: flex-end;   /* прижали сам блок к правому краю колонки */
  text-align: right;      /* на всякий случай выравниваем текст по правому краю */
  font-size: 1.1rem;      /* выберите размер по вкусу */
}


.photo-view__download a{
  color: var(--text-weak);
  text-decoration: none;
}

.photo-view__download a:hover{
  text-decoration: underline;
}



.object3d-footer{
  margin-top: 1.5rem;
  margin-left: 15px;
  display: flex;
  justify-content: flex-start;   /* стрелка у левого края */
}

.object3d-back{
  font-size: 1.15rem;            /* при желании можно убрать/поменять */
}





/**************************  UTILS *****************************/
.mv-metrics {
  font: 14px/1.3 system-ui, sans-serif;
  background: #111;
  color: #eee;
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 10px;
  max-width: 520px;
}
.mv-metrics b { color: #fff; }
.mv-metrics .ok { color: #8f8; }
.mv-metrics .warn { color: #fd8; }
.mv-metrics .bad { color: #f88; }

/* контейнер: левый блок слева, правый — справа */
.mv-metrics-split{
  display:flex;
  justify-content: flex-start;  /* вместо space-between */
  align-items:flex-start;
  gap: 18px;                    /* вот это и есть расстояние между ними */
}

/* пусть оба блока занимают место поровну */
.mv-metrics-split > .mv-metrics{
  flex: 1 1 0;
  max-width: 520px;             /* можно оставить, если хотите одинаковые карточки */
}


/* на узком экране — пусть падают столбиком */
@media (max-width: 1100px){
  .mv-metrics-split{
    flex-direction: column;
  }
  .mv-metrics-split > .mv-metrics{
    flex: 0 0 auto;
    width: 100%;
    max-width: 520px;
  }
}





/*** TERMS ***********/
.terms-pop{
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.terms-pop__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.0); /* сделайте .35 если хотите затемнение */
}

/* ВАЖНО: fixed, чтобы не “уезжало” */
.terms-pop__box{
  position: fixed;
  right: 16px;
  bottom: 16px;

  width: min(520px, calc(100vw - 32px));
  max-height: min(55vh, 420px);
  overflow: auto;

  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .85rem 1rem;
  box-shadow: 0 18px 40px rgba(0,0,0,.55);
}

.terms-pop__title{
  font-weight: 700;
  letter-spacing: .04em;
  margin: 0 2.25rem .35rem 0; /* место под крест */
  color: var(--heading);
}

.terms-pop__text{
  font-size: .95rem;
  line-height: 1.35;
  opacity: .95;
}

/* Кнопка-крест */
.terms-pop__close{
  position: absolute;
  top: 8px;
  right: 10px;

  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: 0;

  background: transparent;
  color: var(--text);
  opacity: .75;
  cursor: pointer;

  display: grid;
  place-items: center;

  font-size: 28px;
  line-height: 1;
  box-sizing: border-box;

  -webkit-appearance: none;
  appearance: none;

  border-radius: 10px; /* чтобы hover был ровный */
}

.terms-pop__close:hover{
  opacity: 1;
  background: rgba(255,255,255,.06);
}

/* Ссылка */
.terms-link{ text-decoration: none; }
.terms-link:hover{ text-decoration: underline; }



/****  textures ON/OFF button   ******/

.mv-pill{
  position:absolute;
  z-index: 30;

  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15);

  background: rgba(0,0,0,.55);
  color: var(--text-weak);
  font-family: "Space Mono", monospace;
  font-size: .72rem;
  letter-spacing: .06em;

  cursor: pointer;
  pointer-events: auto;
}

.mv-pill:hover{
  color:#fff;
  border-color: rgba(255,255,255,.28);
  background: rgba(0,0,0,.68);
}

/* именно “правый нижний угол” */
.mv-pill--br{
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
}

@media (max-width: 768px){
  .mv-pill--br{
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    font-size: .68rem;
  }
}
