 html,
 body {
     height: 100%;
     overflow: hidden;
     margin: 0;
     padding: 0;
 }

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

 body,
 div,
 dl,
 dt,
 dd,
 ul,
 ol,
 li,
 pre,
 form,
 fieldset,
 input,
 textarea,
 p,
 blockquote,
 th,
 td {
     font-size: 14px;
     line-height: 1.2;
 }

 h4 {
     font-size: 14px !important;
 }

 @font-face {
     font-family: "Ro";
     src: url('https://m.utopie-game.ru/fonts/Roboto-Black.ttf') format('truetype');
 }

 :root {
     --lib-color-light: #fffcf2;
     --lib-color-dark: #403d39;
     --lib-color-content-dark: #ccc5b9;
     --lib-color-dark-text: #252422;
     --lib-color-accent: #eb5e28;
     --lib-color-anti-accent: #f9e2d9;
     --paddings: 20px;
     --margins: 20px;
     --hero-image-height: 0px;
 }


 .anchor {
     cursor: pointer;
     color: var(--lib-color-accent);
     text-decoration: none;
 }

 .anchor:hover {
     text-decoration: underline;
 }

 /* Плавная анимация для заголовков */
 h2 {
     transition: all 0.3s ease;
 }

 /* Подсветка заголовка при переходе по якорю */
 h2.highlight-animation {
     background-color: var(--lib-color-anti-accent);
     /* Полупрозрачный акцентный цвет */
 }



 .article-hero img {
     width: 100%;
 }

 ul {
     list-style-position: inside;
 }

 .message.is-small {
     margin-bottom: 10px;
 }

 .message.is-small .message-header {
     background: var(--lib-color-anti-accent) !important;
     border: 1px solid var(--lib-color-content-dark) !important;
     border-bottom: none !important;
     color: var(--lib-color-accent);
     padding: 5px 10px;
 }

 .message.is-small .message-body {
     border: 1px solid var(--lib-color-content-dark) !important;
     padding: 10px;
 }

 .message.is-info {
     border-bottom: 2px solid var(--lib-color-content-dark) !important;
     padding: 5px 10px;
     margin-bottom: 10px;
 }

 .link {
     color: var(--lib-color-accent);
     text-decoration: underline;
     cursor: pointer;
 }

 .link:hover {
     color: var(--lib-color-dark-text);
 }

 .library-relic-info-list {
     grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
     gap: 12px;
     margin: 1rem 0;
 }

 .library-relic-info-trigger {
     display: block;
     width: 100%;
     margin: 0;
     padding: 0;
     border: none;
     background: none;
     font: inherit;
     text-align: left;
     cursor: pointer;
 }

 .library-relic-info-list .library-section-item-description {
     flex-direction: column;
     align-items: center;
     text-align: center;
     padding: 10px 8px;
     height: 100%;
     box-sizing: border-box;
     transition: border-color 0.15s ease, box-shadow 0.15s ease;
 }

 .library-relic-info-list .library-section-item-description img {
     max-width: 64px;
     width: 64px;
     height: 64px;
 }

 .library-relic-info-list .library-section-item-description .item-text {
     width: 100%;
 }

 .library-relic-info-list .library-section-item-description .item-title {
     margin-bottom: 0;
     font-size: 14px;
     line-height: 1.25;
 }

 .library-relic-info-trigger:hover .library-section-item-description,
 .library-relic-info-trigger:focus .library-section-item-description {
     border-color: var(--lib-color-accent, #eb5e28);
     box-shadow: 0 2px 6px rgba(235, 94, 40, 0.2);
     outline: none;
 }

 .library-relic-info-trigger:focus-visible .library-section-item-description {
     outline: 2px solid var(--lib-color-accent, #eb5e28);
     outline-offset: 2px;
 }

 .info-modal-body .library-section-item-description.info-modal-relic-head {
     margin-bottom: 12px;
 }

 .info-modal-body .library-section-item-description.info-modal-relic-head img {
     max-width: 48px;
 }

 .info-modal-body .info-modal-relic-particles {
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     gap: 6px;
     flex-shrink: 0;
     margin-left: auto;
     padding: 8px 10px;
     border: 1px solid var(--lib-color-content-dark, #bdc3c7);
     border-radius: 4px;
     background: #fff;
     text-align: center;
     min-width: 88px;
 }

 .info-modal-body .info-modal-relic-particles img {
     width: 32px;
     height: 32px;
     max-width: 32px;
     object-fit: contain;
 }

 .info-modal-body .info-modal-relic-particles-name {
     font-size: 12px;
     line-height: 1.25;
     font-weight: 600;
     color: var(--lib-color-dark-text, #2c3e50);
 }

 @media (max-width: 768px) {
     .info-modal-body .library-section-item-description.info-modal-relic-head {
         flex-wrap: wrap;
     }

     .info-modal-body .info-modal-relic-particles {
         margin-left: 0;
         width: 100%;
         flex-direction: row;
         justify-content: flex-start;
     }

     .library-relic-info-list {
         grid-template-columns: repeat(3, 1fr);
         gap: 8px;
     }

     .library-relic-info-list .library-section-item-description img {
         max-width: 52px;
         width: 52px;
         height: 52px;
     }

     .library-relic-info-list .library-section-item-description .item-title {
         font-size: 11px;
     }
 }

 .location-layout-image {
     background: url(/assets/library/hero_bg.jpg);
     background-size: cover;
     max-width: 85rem;
     margin: 0 auto;
     height: var(--hero-image-height);
     width: 100%;
     flex-shrink: 0;
     position: relative;
     display: flex;
     align-items: flex-end;
 }

 .layout {
     display: grid;
     grid-template-columns: 260px 1fr;
     height: calc(100vh - var(--hero-image-height));
     max-width: 85rem;
     width: 100%;
     margin: 0 auto;
     align-items: start;
     flex: 1;
     overflow: hidden;
     /* padding-bottom: var(--paddings); */
 }

 .content {
     border: 1px solid var(--lib-color-dark);
     background: var(--lib-color-light);
     align-self: stretch;
     height: 100%;
     min-height: 0;
     color: var(--lib-color-dark-text);
     padding: var(--paddings);
     overflow-y: auto;
 }


 .accent-color {
     color: var(--lib-color-accent);
 }

 ul {
     margin-top: .5rem;
 }

 ul li {
     margin-bottom: .5rem;
 }


 .justify-list {
     padding: 0 !important;
 }

 .justify-list li {
     display: flex;
     align-items: baseline;
     gap: 5px;
 }

 .justify-list .title {
     font-weight: bold;
     flex-shrink: 0;
 }

 .justify-list .dots {
     flex-grow: 1;
     border-bottom: 2px dotted var(--lib-color-content-dark);
     min-width: 20px;
     height: 1em;
 }

 .justify-list .value {
     flex-shrink: 0;
     text-align: right;
 }

 @media (max-width: 768px) {
     .justify-list.big-list li {
         flex-direction: column;
         align-items: stretch;
         gap: 2px;
         margin-bottom: 8px;
     }

     .justify-list.big-list .title,
     .justify-list.big-list .value {
         flex-shrink: 1;
         text-align: left;
     }

     .justify-list.big-list .dots {
         display: none;
     }
 }


 .library-section-item-description {
     background: var(--lib-color-light);
     border: 1px solid var(--lib-color-content-dark);
     padding: 15px;
     display: flex;
     align-items: flex-start;
     gap: 15px;
     transition: box-shadow 0.2s;
 }

 .library-section-item-description img {
     max-width: 50px;
     object-fit: contain;
     flex-shrink: 0;
     padding: 2px;
 }

 .library-section-item-description .item-text {
     flex: 1;
     color: var(--lib-color-dark-text);
     font-size: 14px;
     line-height: 1.5;
 }

 .library-section-item-description .item-title {
     font-weight: bold;
     margin-bottom: 5px;
     color: var(--lib-color-dark-text);
 }

 .library-section-item-description .item-subtitle {
     font-weight: bold;
     margin-top: 10px;
     color: var(--lib-color-dark-text);
 }

 .library-section-item-description .item-desc {
     color: var(--lib-color-dark-text);
     opacity: 0.9;
 }




 .library-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
     gap: var(--margins);
     margin-top: 10px;
 }

 .library-section-block {
     background: var(--lib-color-light);
     border: 1px solid var(--lib-color-content-dark);
     height: 100%;
     display: flex;
     flex-direction: column;
 }

 .library-section-title {
     background: var(--lib-color-content-dark);
     padding: 10px 15px;
     font-weight: bold;
     border-bottom: 1px solid var(--lib-color-content-dark);
     font-size: 14px;
     color: var(--lib-color-dark-text);
 }

 .library-section-list {
     flex-grow: 1;
     background: var(--lib-color-light);
 }

 .library-article-link-block {
     padding: 8px 15px;
     cursor: pointer;
     border-bottom: 1px solid var(--lib-color-content-dark);
     transition: background 0.2s, color 0.2s;
     display: flex;
     align-items: center;
     color: #333;
     text-decoration: none;
 }

 .library-article-link-block:last-child {
     border-bottom: none;
 }

 .library-article-link-block:hover {
     background: var(--lib-color-anti-accent);
     color: var(--lib-color-accent);
 }

 .library-article-link-block::before {
     content: "•";
     margin-right: 8px;
     color: var(--lib-color-dark-text);
 }

 .library-article-link-block:hover::before {
     color: var(--lib-color-accent);
 }








 .table {
     width: 100%;
     border-collapse: collapse;
     background: var(--lib-color-light);
     border: 1px solid var(--lib-color-content-dark);
 }

 .table th {
     background: var(--lib-color-light);
     color: var(--lib-color-dark-text);
     font-weight: bold;
     padding: 10px 12px;
     text-align: center;
     border: 1px solid var(--lib-color-content-dark);
     text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
     font-size: 13px;
 }

 .table td {
     padding: 8px 12px;
     border: 1px solid var(--lib-color-content-dark);
     text-align: center;
     background: rgba(250, 250, 250, 0.21);
 }

 .table tbody tr:nth-child(even) td {
     background: rgba(240, 240, 240, 0.16);
 }

 .table tbody tr:hover td {
     background: rgba(232, 232, 232, 0.37);
 }

 .table td strong {
     color: var(--lib-color-dark-text);
     font-weight: 600;
 }

 .table td[rowspan] {
     vertical-align: middle;
     text-align: left;
     padding-left: 15px;
 }



 .sidebar .header {
     display: flex;
     flex-direction: column;
     align-items: stretch;
     gap: 10px;
     margin-bottom: 8px;
 }

 .sidebar .header .search-container {
     flex: none;
     margin-left: 0;
     width: 100%;
 }

 .search-container {
     position: relative;
     flex: 1;
     margin-left: auto;
 }

 .header input[type="search"] {
     width: 100%;
     padding: 6px 10px;
     border: 1px solid var(--lib-color-content-dark);
     border-radius: 4px;
     font-size: 14px;
 }

 .search-results {
     position: absolute;
     top: 100%;
     left: 0;
     right: 0;
     margin-top: 4px;
     background: var(--lib-color-light);
     border: 1px solid var(--lib-color-dark);
     border-radius: 4px;
     max-height: 400px;
     overflow-y: auto;
     z-index: 1000;
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
     display: none;
 }

 .search-results.active {
     display: block;
 }

 .search-result-item {
     padding: 12px 15px;
     border-bottom: 1px solid var(--lib-color-content-dark);
     cursor: pointer;
     transition: background 0.2s;
 }

 .search-result-item:last-child {
     border-bottom: none;
 }

 .search-result-item:hover {
     background: var(--lib-color-anti-accent);
 }

 .search-result-title {
     font-weight: bold;
     color: var(--lib-color-dark-text);
     margin-bottom: 4px;
     font-size: 14px;
 }

 .search-result-section {
     font-size: 12px;
     color: #666;
     margin-bottom: 6px;
 }

 .search-result-snippet {
     font-size: 13px;
     color: var(--lib-color-dark-text);
     line-height: 1.4;
 }

 .search-highlight {
     background: var(--lib-color-accent);
     color: var(--lib-color-light);
     padding: 2px 4px;
     border-radius: 2px;
     font-weight: bold;
 }

 .search-no-results {
     padding: 15px;
     text-align: center;
     color: #666;
     font-size: 14px;
 }

 .search-loading {
     padding: 15px;
     text-align: center;
     color: #666;
     font-size: 14px;
 }


 .sidebar {
     border-right: 1px solid #ccc;
     padding: var(--paddings);
     overflow-y: auto;

     background: linear-gradient(270deg, var(--lib-color-content-dark) 0%, var(--lib-color-light) 5%, var(--lib-color-light) 80%) !important;
     border: 1px solid var(--lib-color-dark) !important;
     border-right: none !important;

     box-shadow: 1px 8px 8px -6px #0000007a;

     max-height: 100%;


 }

 .sidebar .section {
     font-size: 14px !important;
 }

 .section {
     font-weight: bold;
     border-bottom: 1px solid var(--lib-color-dark);
     padding: 5px 5px;
 }

 .articles {
     padding: 5px;
 }

 /* остальные .section, кроме первого */
 .section:not(:first-child) {
     margin-top: 12px;
 }


 .section .articles {
     margin-left: 12px;
     margin-top: 6px;
 }

 .article-link {
     cursor: pointer;
     padding: 5px 5px;
     display: flex;
     align-items: center;
     color: var(--lib-color-dark-text);
 }

 .article-link.active {
     text-decoration: none;
     position: relative;
     background: var(--lib-color-accent);
     color: var(--lib-color-anti-accent);
 }

 .article-link:hover:not(.active) {
     color: var(--lib-color-accent);
 }




 .article-link.active::after {
     content: "";
     position: absolute;
     right: 5px;
     top: 50%;
     transform: translateY(-50%);
     width: 0;
     height: 0;
     border-left: 6px solid currentColor;
     border-top: 4px solid transparent;
     border-bottom: 4px solid transparent;
 }

 .article-link-sub {
     padding-left: 22px;
     font-size: 13px;
     color: #5a5a5a;
     position: relative;
 }

 .article-link-sub::before {
     content: "↳";
     position: absolute;
     left: 8px;
     top: 50%;
     transform: translateY(-50%);
     font-size: 12px;
     color: var(--lib-color-content-dark);
     line-height: 1;
 }

 .article-link-sub:hover:not(.active) {
     color: var(--lib-color-accent);
 }

 .article-link-sub.active {
     color: var(--lib-color-anti-accent);
 }

 .article-link-parent-active {
     color: var(--lib-color-accent);
     font-weight: 600;
 }

 .library-breadcrumbs-link {
     color: var(--lib-color-accent);
     cursor: pointer;
     text-decoration: underline;
 }

 .library-breadcrumbs-link:hover {
     color: var(--lib-color-dark-text);
 }

 .library-article-link-block-sub {
     padding-left: 28px;
     font-size: 13px;
     color: #5a5a5a;
 }

 .library-article-link-block-sub::before {
     content: "↳";
     margin-right: 6px;
     color: var(--lib-color-content-dark);
 }



 .small {
     color: #666;
     margin-bottom: 16px;
 }

 .block {
     margin-bottom: 16px;
 }

 .links span {
     cursor: pointer;
     text-decoration: underline;
     margin-right: 8px;
     padding: 4px 8px;
     display: inline-block;
     min-height: 32px;
     line-height: 32px;
 }

 #mobileMenuToggle {
     display: flex;
     visibility: hidden;
     justify-content: center;
     font-size: 18px;
     line-height: 27px;
     color: white;
     position: absolute;
     top: 10px;
     left: 10px;
 }

 /* Мобильные стили */
 @media (max-width: 768px) {
     #mobileMenuToggle {
         display: flex;
         visibility: visible;
     }

     .location-layout-image {
         height: auto;
         min-height: var(--hero-image-height);
         padding-bottom: 48px;
     }



     .header input[type="search"] {
         flex: 1;
         min-width: 0;
         font-size: 14px;
     }

     .search-container {
         max-width: none;
     }

     .layout {
         grid-template-columns: 1fr;
         height: calc(100vh - var(--hero-image-height));
         min-height: calc(100vh - var(--hero-image-height));
         padding-bottom: var(--paddings);
     }

     .sidebar {
         position: fixed;
         top: 48px;
         left: -280px;
         width: 260px;
         height: calc(100vh - 48px);
         z-index: 1000;
         transition: left 0.3s ease;
         box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
     }

     .sidebar.open {
         left: 0;
     }

     .sidebar-overlay {
         display: none;
         position: fixed;
         top: 48px;
         left: 0;
         right: 0;
         bottom: 0;
         background: rgba(0, 0, 0, 0.5);
         z-index: 999;
     }

     .sidebar-overlay.active {
         display: block;
     }



     .section {
         font-size: 14px;
     }

     .article-link {
         font-size: 14px;
         padding: 8px 0;
         min-height: 40px;
     }

     .article-link-sub {
         padding-left: 26px;
         font-size: 13px;
         min-height: 36px;
     }

     .content h1 {
         font-size: 24px;
         margin-top: 0;
     }

     .content h3 {
         font-size: 18px;
     }

     .links span {
         font-size: 14px;
         padding: 6px 10px;
         margin-bottom: 4px;
     }
 }

 @media (max-width: 480px) {
     .header {
         padding: 0 8px;
         height: 44px;
     }

     .header strong {
         font-size: 16px;
     }

     .content {
         padding: 10px;
     }

     .content h1 {
         font-size: 20px;
     }

     .content h3 {
         font-size: 16px;
     }

     .block {
         margin-bottom: 12px;
     }
 }



 h2.news-placeholder-text,
 h2.news-title {
     border-bottom: none !important;
     margin-top: 0 !important;
     margin-bottom: 0 !important;
 }

 .news-full-content h2 {
     border-color: var(--lib-color-content-dark) !important;
 }


 .note {
     background-color: var(--lib-color-anti-accent);
     padding: 15px;
     margin: 15px 0;
     border-left: 4px solid var(--lib-color-accent);
 }

 .library-formula {
     background-color: var(--lib-color-light);
     border: 1px solid var(--lib-color-content-dark);
     border-radius: 6px;
     padding: 16px 20px;
     margin: 12px 0 16px;
     text-align: center;
 }

 .library-formula-line {
     display: flex;
     flex-wrap: wrap;
     align-items: baseline;
     justify-content: center;
     gap: 6px 10px;
     margin: 0 0 8px;
     font-size: 17px;
     line-height: 1.5;
 }

 .library-formula-var {
     font-weight: 600;
     color: var(--lib-color-dark-text);
 }

 .library-formula-eq,
 .library-formula-op {
     color: var(--lib-color-dark);
     font-weight: 400;
 }

 .library-formula-exp {
     font-size: 0.72em;
     line-height: 0;
 }

 .library-formula-limit {
     margin: 0 0 12px;
     font-size: 13px;
     color: var(--lib-color-dark);
 }

 .library-formula-vars {
     list-style: none;
     padding: 12px 0 0;
     margin: 0;
     text-align: left;
     font-size: 13px;
     line-height: 1.45;
     border-top: 1px solid var(--lib-color-content-dark);
 }

 .library-formula-vars li {
     margin: 6px 0;
 }

 /* Кнопка назад и хлебные крошки */
 .library-navigation {
     display: flex;
     align-items: center;
     gap: 12px;
     margin-bottom: 20px;
     padding-bottom: 15px;
     border-bottom: 1px solid var(--lib-color-content-dark);
 }

 .library-back-button {
     flex-shrink: 0;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .library-back-button .iconBack {
     display: flex;
     align-items: center;
     justify-content: center;
     width: 100%;
     height: 100%;
     font-size: 18px;
     line-height: 1;
     color: white;
     font-weight: bold;
 }

 .library-breadcrumbs {
     display: flex;
     align-items: center;
     gap: 8px;
     flex: 1;
     font-size: 14px;
     color: var(--lib-color-dark-text);
 }

 .library-breadcrumbs-item {
     color: var(--lib-color-dark-text);
 }

 .library-breadcrumbs-separator {
     color: var(--lib-color-content-dark);
 }

 .library-nav-to-game {
     display: flex;
     align-items: center;
     gap: 10px;
     flex-shrink: 0;
     text-decoration: none;
     color: var(--lib-color-accent);
     font-size: 14px;
     font-weight: 600;
     justify-content: center;
     margin-top: -10px;
     margin-bottom: 10px;
 }

 .library-nav-to-game:hover {
     text-decoration: underline;
 }

 .library-nav-to-game:hover .library-nav-to-game-logo {
     opacity: 0.92;
 }

 .library-nav-to-game-logo {
     height: 32px;
     width: auto;
     display: block;
 }

 .library-nav-to-game-label {
     white-space: nowrap;
 }


 .links span {
     color: var(--lib-color-accent);
     text-decoration: underline;
     cursor: pointer;
 }

 @media (max-width: 768px) {
     .library-navigation {
         margin-bottom: 15px;
         padding-bottom: 12px;
     }

     .library-breadcrumbs {
         font-size: 13px;
     }

     .library-nav-to-game-logo {
         height: 28px;
     }
 }

 .image {
     max-width: 100%;
     height: auto;
     display: block;
     border-radius: 10px;
     margin-top: 10px;
     margin-bottom: 10px;
 }


 .image-thumbnail::backdrop {
     background: rgba(0, 0, 0, .55);
 }

 .image-thumbnail[open] {
     position: fixed;
     inset: 0;
     width: auto;
     max-width: none;
     height: 100%;
     max-height: none;
     margin: 0;
     border: none;
     padding: 16px;
     box-sizing: border-box;
     background: transparent;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .image-thumbnail .lib-menyala-weapon-panel {
     border: 1px solid #5a6d85;
     padding: 10px;
     background: #e4e9ef;
     max-width: 95vw;
 }

 /* Список кланов (как clanpage) */
 .library-clan-page h1 {
     margin-top: 0;
 }

 .library-clan-layout {
     display: grid;
     grid-template-columns: 1fr minmax(220px, 280px);
     gap: var(--margins);
     align-items: start;
 }

 .library-clan-main {
     min-width: 0;
 }

 .library-clan-title {
     margin-top: 0;
 }

 .library-clan-aside h4 {
     margin: 1em 0 0.5em;
 }

 .library-clan-about-btn {
     display: block;
     width: 100%;
     box-sizing: border-box;
     margin: 0 0 8px;
     padding: 6px 10px;
     border: 1px solid var(--lib-color-content-dark);
     border-radius: 2px;
     background: var(--lib-color-light);
     color: var(--lib-color-dark-text);
     font-size: 14px;
     cursor: pointer;
     text-align: center;
 }

 .library-clan-about-btn:hover {
     background: var(--lib-color-anti-accent);
     color: var(--lib-color-accent);
     border-color: var(--lib-color-accent);
 }

 .library-clan-search-label {
     display: block;
     margin-bottom: 6px;
     font-weight: bold;
 }

 .library-clan-search {
     width: 100%;
     box-sizing: border-box;
     padding: 8px 10px;
     border: 1px solid var(--lib-color-content-dark);
     background: var(--lib-color-light);
     color: var(--lib-color-dark-text);
     margin-bottom: 8px;
 }

 .library-clan-search:focus {
     outline: none;
     border-color: var(--lib-color-accent);
 }

 .library-clan-search-empty {
     color: var(--lib-color-accent);
     margin: 0 0 8px;
     font-size: 13px;
 }

 .library-clan-list {
     list-style: none;
     margin: 0;
     padding: 0;
 }

 .library-clan-list li {
     margin: 0;
     padding: 2px 0;
 }

 .library-clan-list a {
     display: flex;
     align-items: center;
     gap: 2px;
     text-decoration: none;
     color: var(--lib-color-dark-text);
     padding: 3px 4px;
     border-radius: 2px;
 }

 .library-clan-list a:hover {
     background: var(--lib-color-anti-accent);
     color: var(--lib-color-accent);
 }

 .library-clan-list li.selected a {
     background: var(--lib-color-anti-accent);
     font-weight: bold;
 }

 .library-clan-list-power {
     flex-shrink: 0;
     min-width: 2.5em;
     font-variant-numeric: tabular-nums;
     color: var(--lib-color-dark-text);
     opacity: 0.85;
 }

 .library-clan-list a:hover .library-clan-list-power {
     color: inherit;
     opacity: 1;
 }

 .library-clan-list img {
     vertical-align: baseline;
     flex-shrink: 0;
 }

 .library-clan-detail-head {
     display: flex;
     flex-wrap: wrap;
     gap: 10px;
     align-items: flex-start;
 }

 .library-clan-logo img {
     max-width: 200px;
     height: auto;
 }

 .library-clan-cups {
     display: flex;
     flex-wrap: wrap;
     gap: 4px;
 }

 .library-clan-info-table {
     flex: 1;
     min-width: 200px;
 }

 .library-clan-active-relics {
     margin-top: 4px;
     font-size: 0.9em;
     color: var(--lib-color-dark-text);
     opacity: 0.9;
 }

 .library-clan-relics {
     margin: 1.25em 0;
 }

 .library-clan-relics h3 {
     margin: 0 0 10px;
     font-size: 1.05rem;
     color: var(--lib-color-dark, #403d39);
 }

 .library-clan-relics-headline {
     display: flex;
     flex-wrap: wrap;
     gap: 8px 16px;
     font-size: 0.9rem;
     margin-bottom: 8px;
 }

 .library-clan-relics-formula {
     margin: 0 0 12px;
     font-size: 0.82rem;
     color: var(--lib-color-dark-text);
     opacity: 0.85;
 }

 .library-clan-relics-empty {
     margin: 0;
     font-size: 0.9rem;
     color: var(--lib-color-dark-text);
     opacity: 0.75;
 }

 .library-clan-relics-summary-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
     gap: 12px;
     align-items: stretch;
 }

 .library-clan-relic-summary-card {
     display: flex;
     flex-direction: column;
     align-items: stretch;
     width: 100%;
     height: 100%;
     margin: 0;
     padding: 0;
     border: 1px solid var(--lib-color-content-dark);
     border-radius: 4px;
     background: #fff;
     font: inherit;
     cursor: pointer;
     transition: border-color 0.15s ease, box-shadow 0.15s ease;
     overflow: hidden;
     box-sizing: border-box;
 }

 .library-clan-relic-summary-content {
     display: flex;
     flex: 1 1 auto;
     flex-direction: column;
     align-items: center;
     width: 100%;
     padding: 12px 10px 10px;
     box-sizing: border-box;
 }

 .library-clan-relic-summary-icon {
     width: 48px;
     height: 48px;
     max-width: 48px;
     max-height: 48px;
     object-fit: contain;
     flex-shrink: 0;
 }

 .library-clan-relic-summary-card:hover,
 .library-clan-relic-summary-card:focus {
     border-color: var(--lib-color-accent, #eb5e28);
     box-shadow: 0 2px 6px rgba(235, 94, 40, 0.18);
     outline: none;
 }

 .library-clan-relic-summary-card:focus-visible {
     outline: 2px solid var(--lib-color-accent, #eb5e28);
     outline-offset: 2px;
 }

 .library-clan-relic-summary-title {
     margin: 8px 0 10px;
     font-weight: bold;
     font-size: 0.9rem;
     line-height: 1.2;
     text-align: center;
     color: var(--lib-color-dark, #403d39);
 }

 .library-clan-relic-summary-stats {
     width: 100%;
     margin: 0;
     padding: 0;
     display: flex;
     flex-direction: column;
     gap: 5px;
 }

 .library-clan-relic-summary-stat {
     display: flex;
     flex-wrap: wrap;
     align-items: baseline;
     gap: 4px 6px;
     font-size: 0.78rem;
     line-height: 1.2;
 }

 .library-clan-relic-summary-stat dt {
     margin: 0;
     font-weight: normal;
     color: var(--lib-color-dark-text);
     opacity: 0.85;
 }

 .library-clan-relic-summary-stat dt::after {
     content: ':';
 }

 .library-clan-relic-summary-stat dd {
     margin: 0;
     font-weight: bold;
     color: var(--lib-color-dark, #403d39);
     white-space: nowrap;
 }

 .library-clan-relic-summary-hint {
     flex: 0 0 auto;
     width: 100%;
     box-sizing: border-box;
     margin: 0;
     margin-top: auto;
     padding: 8px 10px;
     border-top: 1px solid var(--lib-color-content-dark);
     background: var(--lib-color-anti-accent, #f9e2d9);
     font-size: 0.75rem;
     line-height: 1.2;
     text-align: center;
     color: var(--lib-color-accent, #eb5e28);
 }

 .library-clan-relic-summary-card:hover .library-clan-relic-summary-hint,
 .library-clan-relic-summary-card:focus .library-clan-relic-summary-hint {
     background: rgba(235, 94, 40, 0.12);
 }

 .library-clan-relic-modal-rows {
     display: flex;
     flex-direction: column;
     gap: 10px;
 }

 .library-clan-relic-row {
     border: 1px solid var(--lib-color-content-dark);
     border-radius: 4px;
     padding: 10px 12px;
     background: #fff;
 }

 .library-clan-relic-row.is-own {
     border-color: #5a8fb8;
     background: #f0f6fb;
 }

 .library-clan-relic-row-head {
     display: flex;
     align-items: center;
     gap: 12px;
 }

 .library-clan-relic-row-icon {
     width: 64px;
     height: 64px;
     max-width: 64px;
     max-height: 64px;
     object-fit: contain;
     flex-shrink: 0;
 }

 .library-clan-relic-row-icon--empty {
     display: block;
     border: 1px dashed var(--lib-color-content-dark);
     border-radius: 4px;
     box-sizing: border-box;
 }

 .info-modal-body .library-clan-relic-row-icon {
     width: 64px;
     height: 64px;
     max-width: 64px;
     max-height: 64px;
 }

 .library-clan-relic-row-info {
     flex: 1;
     min-width: 0;
 }

 .library-clan-relic-row-name {
     font-weight: bold;
     font-size: 0.92rem;
     line-height: 1.25;
     color: var(--lib-color-dark, #403d39);
 }

 .library-clan-relic-row-own {
     display: inline-block;
     margin-left: 6px;
     padding: 1px 6px;
     border-radius: 3px;
     font-size: 0.68rem;
     font-weight: 600;
     line-height: 1.2;
     vertical-align: middle;
     color: #1a5276;
     background: #d6eaf8;
     border: 1px solid #85c1e9;
 }

 .library-clan-relic-row-meta {
     margin-top: 4px;
     font-size: 0.8rem;
     line-height: 1.3;
     color: var(--lib-color-dark-text);
     opacity: 0.88;
 }

 .library-clan-relic-row-stats {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 6px 14px;
     margin: 10px 0 0;
     padding: 10px 0 0;
     border-top: 1px dashed var(--lib-color-content-dark);
 }

 .library-clan-relic-row-stat {
     display: flex;
     flex-wrap: wrap;
     align-items: baseline;
     gap: 4px 6px;
     font-size: 0.78rem;
     line-height: 1.25;
 }

 .library-clan-relic-row-stat--wide {
     grid-column: 1 / -1;
 }

 .library-clan-relic-row-stat dt {
     margin: 0;
     font-weight: normal;
     color: var(--lib-color-dark-text);
     opacity: 0.85;
 }

 .library-clan-relic-row-stat dt::after {
     content: ':';
 }

 .library-clan-relic-row-stat dd {
     margin: 0;
     font-weight: bold;
     color: var(--lib-color-dark, #403d39);
     white-space: nowrap;
 }

 .library-clan-members {
     margin-top: 1em;
 }

 .library-clan-page .nick-td img {
     vertical-align: baseline;
 }

 .library-clan-page .crwn {
     vertical-align: text-bottom !important;
 }

 .library-clan-page .drk-red {
     color: darkred;
 }

 .library-clan-page .red {
     color: red;
 }

 .library-clan-page .mtab img,
 .library-clan-page .mtab a {
     vertical-align: baseline;
 }

 .library-clan-page .mtab td {
     vertical-align: top;
     border: none;
     padding: 3px 5px;
 }

 .library-clan-page .mtabo td:nth-child(odd) {
     text-align: right;
 }

 .library-clan-page .mtabo {
     border-collapse: collapse;
 }

 .library-clan-page .mtabo tbody tr:nth-child(2n) {
     background-color: transparent;
 }

 .library-clan-page .users-list {
     width: 100%;
     border-collapse: collapse;
 }

 .library-clan-page .users-list th {
     text-align: left;
     padding: 6px 8px;
     border: 1px solid var(--lib-color-content-dark);
     background: var(--lib-color-content-dark);
 }

 .library-clan-page .users-list td {
     padding: 4px 8px;
     border: 1px solid var(--lib-color-content-dark);
     vertical-align: top;
 }

 .library-clan-page .users-list tbody tr:nth-child(2n) td {
     background: rgba(240, 240, 240, 0.3);
 }

 @media (max-width: 768px) {
     .library-clan-layout {
         grid-template-columns: 1fr;
     }

     .library-clan-aside {
         order: -1;
     }

     #library-clan-list {
         max-height: 100px;
         overflow-y: scroll;
         -webkit-overflow-scrolling: touch;
     }

     .library-clan-relics-summary-grid {
         grid-template-columns: 1fr;
     }

     .library-clan-relic-row-stats {
         grid-template-columns: 1fr;
     }
 }

 .news-scroll-sentinel {
     height: 1px;
     width: 100%;
 }

 .news-scroll-loading {
     text-align: center;
     padding: 16px 0;
     color: var(--lib-color-accent, #2396f3);
     font-size: 14px;
 }

 .library-privileges-types {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
     gap: 16px;
     margin-top: 12px;
 }

 .library-privilege-type {
     background: var(--lib-color-light);
     border: 1px solid var(--lib-color-content-dark);
     display: flex;
     flex-direction: column;
     min-height: 100%;
 }

 .library-privilege-type--gold {
     border-color: #c9a227;
     box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.25);
 }

 .library-privilege-type__head {
     display: flex;
     align-items: center;
     gap: 14px;
     padding: 14px 16px;
     background: var(--lib-color-content-dark);
     border-bottom: 1px solid var(--lib-color-content-dark);
 }

 .library-privilege-type--gold .library-privilege-type__head {
     background: linear-gradient(135deg, rgba(201, 162, 39, 0.18), var(--lib-color-content-dark));
 }

 .library-privilege-type__icon {
     width: 56px;
     height: 56px;
     object-fit: contain;
     flex-shrink: 0;
 }

 .library-privilege-type__head-text h3 {
     margin: 0 0 4px;
     font-size: 16px;
     color: var(--lib-color-dark-text);
 }

 .library-privilege-type__head-text p {
     margin: 0;
     font-size: 13px;
     color: var(--lib-color-dark-text);
     opacity: 0.85;
 }

 .library-privilege-type__benefits {
     list-style: none;
     margin: 0;
     padding: 0;
 }

 .library-privilege-type__benefit {
     display: flex;
     align-items: flex-start;
     gap: 10px;
     padding: 11px 16px;
     border-bottom: 1px solid var(--lib-color-content-dark);
     font-size: 14px;
     line-height: 1.45;
     color: var(--lib-color-dark-text);
     text-align: left;
 }

 .library-privilege-type__benefit:last-child {
     border-bottom: none;
 }

 .library-privilege-type__benefit img {
     width: 24px;
     height: 24px;
     object-fit: contain;
     flex-shrink: 0;
     margin-top: 1px;
 }

 .library-privilege-type__benefit-body {
     flex: 1;
     min-width: 0;
 }

 .library-privilege-type__benefit-title {
     display: block;
 }



 .library-privilege-type__benefit--detailed {
     padding-top: 13px;
     padding-bottom: 13px;
 }

 .library-privilege-type__benefit--detailed img {
     margin-top: 2px;
 }

 @media (max-width: 700px) {
     .library-privileges-types {
         grid-template-columns: 1fr;
     }
 }


 .second-text {
     font-size: smaller;
     color: var(--color-text-grey);
 }


 /* Личные смайлы (library/personal_smiles.php) */

 .ps-page code,
 .ps-modal-head code {
     font-family: Consolas, Menlo, monospace;
     font-size: 13px;
     background: var(--lib-color-anti-accent);
     padding: 1px 4px;
     border-radius: 3px;
 }

 /* Липкая панель: боковые тени закрывают поля .content, но не дают горизонтальной прокрутки */
 .ps-toolbar {
     position: sticky;
     top: 0;
     z-index: 2;
     display: flex;
     flex-wrap: wrap;
     align-items: center;
     gap: 10px;
     margin: 20px 0 12px;
     padding: 10px 0;
     background: var(--lib-color-light);
     border-bottom: 1px solid var(--lib-color-content-dark);
     box-shadow: calc(var(--paddings) * -1) 0 0 var(--lib-color-light), var(--paddings) 0 0 var(--lib-color-light);
 }

 .ps-search {
     flex: 1 1 240px;
     min-width: 0;
     height: 36px;
     padding: 0 12px;
     border: 1px solid var(--lib-color-content-dark);
     border-radius: 4px;
     background: #fff;
     color: var(--lib-color-dark-text);
     font-size: 14px;
 }

 .ps-search:focus {
     outline: none;
     border-color: var(--lib-color-accent);
     box-shadow: 0 0 0 2px var(--lib-color-anti-accent);
 }

 .ps-filters {
     display: flex;
     flex-wrap: wrap;
     gap: 6px;
 }

 .ps-filter,
 .ps-reset {
     height: 36px;
     padding: 0 12px;
     border: 1px solid var(--lib-color-content-dark);
     border-radius: 4px;
     background: #fff;
     color: var(--lib-color-dark-text);
     font-size: 14px;
     cursor: pointer;
     transition: background 0.2s, border-color 0.2s, color 0.2s;
 }

 .ps-filter span {
     margin-left: 4px;
     opacity: 0.6;
 }

 .ps-filter:hover,
 .ps-reset:hover {
     border-color: var(--lib-color-accent);
     color: var(--lib-color-accent);
 }

 .ps-filter.is-active {
     background: var(--lib-color-dark);
     border-color: var(--lib-color-dark);
     color: var(--lib-color-light);
 }

 .ps-filter.is-active span {
     opacity: 0.8;
 }

 .ps-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
     gap: 12px;
 }

 .ps-card {
     display: flex;
     flex-direction: column;
     background: var(--lib-color-light);
     border: 1px solid var(--lib-color-content-dark);
     transition: box-shadow 0.2s, border-color 0.2s;
 }

 .ps-card:hover {
     border-color: var(--lib-color-dark);
     box-shadow: 0 2px 8px rgba(37, 36, 34, 0.12);
 }

 .ps-card.is-mine {
     border-color: var(--lib-color-accent);
 }

 .ps-card[hidden],
 .ps-empty[hidden],
 .ps-card__found[hidden] {
     display: none;
 }

 .ps-card__preview {
     height: 84px;
     display: flex;
     align-items: center;
     justify-content: center;
     background: var(--lib-color-anti-accent);
     border-bottom: 1px solid var(--lib-color-content-dark);
 }

 .ps-card__body {
     flex: 1;
     display: flex;
     flex-direction: column;
     gap: 6px;
     padding: 10px 12px 12px;
 }

 .ps-card__head {
     display: flex;
     flex-wrap: wrap;
     align-items: baseline;
     justify-content: space-between;
     gap: 4px 8px;
 }

 .ps-card .ps-card__name {
     margin: 0;
     font-size: 15px;
     color: var(--lib-color-dark-text);
 }

 .ps-badge {
     padding: 2px 6px;
     border-radius: 3px;
     background: var(--lib-color-accent);
     color: #fff;
     font-size: 12px;
     white-space: nowrap;
 }

 .ps-prices {
     margin: 0;
     padding: 0;
     list-style: none;
 }

 .ps-prices li {
     display: flex;
     justify-content: space-between;
     gap: 8px;
     margin: 0;
     padding: 3px 0;
     border-bottom: 1px dotted var(--lib-color-content-dark);
 }

 .ps-prices li:last-child {
     border-bottom: none;
 }

 .ps-muted {
     opacity: 0.65;
 }

 .ps-card__found {
     padding: 4px 6px;
     background: var(--lib-color-anti-accent);
     font-size: 13px;
 }

 .ps-card__foot {
     margin-top: auto;
     padding-top: 6px;
     border-top: 1px solid var(--lib-color-content-dark);
 }

 .ps-owners {
     padding: 0;
     border: none;
     background: none;
     color: var(--lib-color-accent);
     font-size: 14px;
     cursor: pointer;
     text-decoration: underline dotted;
     text-underline-offset: 3px;
 }

 .ps-owners:hover {
     text-decoration-style: solid;
 }

 .ps-empty {
     display: flex;
     flex-wrap: wrap;
     align-items: center;
     gap: 12px;
     margin-top: 12px;
     padding: 16px;
     border: 1px dashed var(--lib-color-content-dark);
 }

 .ps-modal-head {
     display: flex;
     align-items: center;
     gap: 12px;
     margin-bottom: 12px;
     padding-bottom: 12px;
     border-bottom: 1px solid var(--lib-color-content-dark);
 }

 .ps-owner-list {
     margin: 0;
     padding-left: 2em;
     columns: 2 180px;
     column-gap: 24px;
 }

 .ps-owner-list li {
     margin-bottom: 6px;
     break-inside: avoid;
 }

 .ps-owner-list a {
     color: var(--lib-color-accent);
     font-weight: bold;
 }

 @media (max-width: 480px) {
     .ps-grid {
         grid-template-columns: 1fr;
     }

     .ps-filters {
         width: 100%;
     }

     .ps-filter {
         flex: 1 1 auto;
     }
 }


/* Рыцарский турнир (library/tournament.php). Карточки наград — library-privilege-type */

.tourn-hero {
    padding: 0 0 6px;
    margin-bottom: 16px;
}

.tourn-hero__helms {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
}

.tourn-hero h1 {
    margin: 6px 0 8px;
}

.tourn-hero p {
    margin: 0 0 10px;
    line-height: 1.45;
}

.tourn-toc {
    list-style: none;
    padding: 0;
}

/* На узком экране колонки встают друг под друга */
.tourn-columns > .column {
    min-width: 260px;
}

.tourn-media {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 10px 0;
}

.tourn-media > img {
    flex-shrink: 0;
}

.tourn-media p,
.tourn-media ul {
    margin-top: 0;
}

.tourn-inline-icon {
    vertical-align: middle;
}

.tourn-table {
    margin: 10px 0;
}

.tourn-table td {
    text-align: left;
    line-height: 1.45;
}

.tourn-table .tourn-icons {
    float: left;
    display: flex;
    gap: 4px;
    margin: 0 10px 4px 0;
}

.tourn-caption {
    margin-top: -4px;
}

/* Лавка на узком экране: строка — блок, цена и лимит с подписью */
@media (max-width: 600px) {
    .tourn-shop-table,
    .tourn-shop-table td {
        border: 0;
    }

    .tourn-shop-table thead {
        display: none;
    }

    .tourn-shop-table tr,
    .tourn-shop-table td {
        display: block;
    }

    .tourn-shop-table tr {
        border: 1px solid var(--lib-color-content-dark);
        margin-bottom: 8px;
    }

    .tourn-shop-table td[data-label] {
        padding-top: 0;
    }

    .tourn-shop-table td[data-label]::before {
        content: attr(data-label) ": ";
        font-weight: bold;
    }
}

.tourn-cards {
    margin-bottom: 12px;
}

.tourn-rewards .library-privileges-types {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 0 0 12px 12px;
}

/* Плотнее, чтобы три места помещались рядом */
.tourn-rewards .library-privilege-type__head {
    padding: 10px 12px;
    gap: 10px;
}

.tourn-rewards .library-privilege-type__icon {
    width: 48px;
    height: 48px;
}

.tourn-rewards .library-privilege-type__benefit {
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.35;
}

.tourn-rewards .library-privilege-type[hidden] {
    display: none;
}

.tourn-rewards .tourn-more {
    margin-left: 12px;
}

@media (max-width: 960px) {
    .tourn-rewards .library-privileges-types,
    .tourn-rewards .tourn-more {
        margin-left: 0;
    }
}

/* ===== Осенняя Ярмарка (library/event_haloween.php) ===== */
/* Содержание длиннее «Коротко»: ссылки в две колонки, правой колонке больше ширины */
.hlw-head > .column:first-child {
    flex: 0.8;
}

.hlw-head > .column:last-child {
    flex: 1.2;
    min-width: 34em;
}

.hlw-toc {
    columns: 2 16em;
    column-gap: 1.5em;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: decimal inside;
}

.hlw-toc li {
    break-inside: avoid;
    margin-bottom: 0.5rem;
}

.hlw-npc img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin: -6px 4px -4px 0;
}

/* Шаги: как вырастить тыкву — единственная схема в статье */
.hlw-steps {
    list-style: none !important;
    padding: 0 !important;
    margin: 12px 0 14px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hlw-steps li {
    position: relative;
    margin: 0;
    padding: 0 8px;
    text-align: center;
    line-height: 1.35;
}

.hlw-steps li:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 28px;
    left: calc(50% + 34px);
    right: calc(-50% + 34px);
    border-top: 2px dashed var(--lib-color-content-dark);
}

.hlw-step-pic {
    position: relative;
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    border: 2px solid var(--lib-color-content-dark);
    border-radius: 50%;
    background: var(--lib-color-anti-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.hlw-step-pic img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.hlw-step-pic img.hlw-contain {
    width: 70%;
    height: 70%;
    border-radius: 0;
    object-fit: contain;
}

.hlw-step-pic .hlw-tag {
    font-weight: bold;
    font-size: 11px;
    line-height: 1.15;
    color: var(--lib-color-dark-text);
}

.hlw-step-num {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--lib-color-accent);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    line-height: 20px;
    text-align: center;
}

.hlw-steps b {
    display: block;
    margin-bottom: 3px;
}

/* Путь Ярмарки: дорожка наград. ПК — уровни столбцами, телефон — строками */
.hlw-pass {
    display: flex;
    gap: 6px;
    margin: 12px 0;
}

.hlw-pass-level {
    flex: 0 0 180px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hlw-pass-labels {
    flex: 0 0 110px;
}

.hlw-pass-head {
    height: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    line-height: 1.2;
    background: var(--lib-color-content-dark);
    color: var(--lib-color-dark-text);
}

.hlw-pass-head span {
    font-weight: normal;
    font-size: 11px;
}

.hlw-pass-labels .hlw-pass-head {
    background: none;
}

.hlw-pass-final .hlw-pass-head {
    background: var(--lib-color-dark);
    color: var(--lib-color-light);
}

.hlw-pass-label,
.hlw-pass-card {
    height: 120px;
    box-sizing: border-box;
}

.hlw-pass-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-weight: bold;
    line-height: 1.25;
}

.hlw-pass-label span {
    font-weight: normal;
    font-size: 11px;
    color: #6b6560;
}

.hlw-pass-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 10px 6px 8px;
    text-align: center;
    font-size: 12px;
    line-height: 1.2;
    background: #fff;
    border: 1px solid var(--lib-color-content-dark);
}

.hlw-pass-card--premium {
    background: var(--lib-color-anti-accent);
    border-color: var(--lib-color-accent);
}

.hlw-pass-final .hlw-pass-card {
    border-width: 2px;
    border-color: var(--lib-color-dark);
}

.hlw-pass-icon {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.hlw-pass-icon img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* маленькие картинки (смайл, маска): натуральный размер, по центру */
.hlw-pass-icon img.hlw-pass-real {
    width: auto;
    height: auto;
}

.hlw-pass-icon b {
    position: absolute;
    right: -10px;
    bottom: -4px;
    padding: 1px 4px;
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
    background: var(--lib-color-dark);
    color: var(--lib-color-light);
}

/* Стиль логина «Путь Ярмарки 2025» из handlers/css/fonts.css (.hl25ep_p), без анимации */
.hlw-pass-login {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 60px;
    background: #f0f0f0;
    font-weight: bold;
    font-size: 16px;
}

.hlw-pass-login span {
    background: radial-gradient(circle at top center, #ffb347 0, #ff8c00 30%, #2c1b00 90%);
    background-size: 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 700px) {
    .hlw-pass {
        flex-direction: column;
    }

    .hlw-pass-level,
    .hlw-pass-labels {
        flex: none;
        display: grid;
        grid-template-columns: 58px 1fr 1fr;
    }

    .hlw-pass-head {
        height: auto;
    }

    .hlw-pass-label {
        height: auto;
        text-align: center;
    }

    .hlw-pass-card {
        height: 116px;
    }
}

@media (max-width: 700px) {
    .hlw-steps {
        grid-template-columns: 1fr;
    }

    .hlw-steps li {
        display: grid;
        grid-template-columns: 56px 1fr;
        gap: 12px;
        align-items: center;
        padding: 0 0 14px;
        text-align: left;
    }

    .hlw-step-pic {
        margin: 0;
    }

    .hlw-steps li:not(:last-child)::before {
        top: 60px;
        bottom: 0;
        left: 27px;
        right: auto;
        border-top: 0;
        border-left: 2px dashed var(--lib-color-content-dark);
    }
}
