 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: 12px;
     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;
 }

 @media (max-width: 768px) {
     .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: normal;
     color: var(--lib-color-dark-text);
     padding: var(--paddings);
     overflow-y: auto;
 }


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



 .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;
 }


 .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;
 }



 .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;
     }

     .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-relics-summary-grid {
         grid-template-columns: 1fr;
     }

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