.tag-directory { max-width: 1120px; margin: 0 auto; }
.tag-heading { max-width: 760px; padding: 12px 0 26px; }
.tag-heading h1, .tag-results h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -1.3px; line-height: 1.15; margin: 14px 0; overflow-wrap: anywhere; }
.tag-heading p, .tag-results p { color: #aaa6a0; font-size: 14px; line-height: 1.8; }
.tag-tools { margin-bottom: 24px; }
.tag-search { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 560px; min-height: 50px; padding: 0 15px; background: #181613; border: 1px solid #55412b; border-radius: 13px; }
.tag-search:focus-within { border-color: #ffae41; box-shadow: 0 0 18px #ff99001c; }
.tag-search > .icon { color: #caa97b; flex: 0 0 19px; }
.tag-search input { min-width: 0; width: 100%; border: 0; background: transparent; outline: none; color: #f4eee5; height: 48px; font: inherit; font-size: 16px; }
.tag-clear { color: #ffcd89; background: #32271a; border: 0; border-radius: 8px; width: 30px; height: 30px; flex: 0 0 30px; cursor: pointer; font-size: 22px; }
.tag-alphabet { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; padding: 12px 1px 10px; margin-top: 10px; scrollbar-width: thin; scrollbar-color: #9b6a2e #17130f; overscroll-behavior-x: contain; }
.tag-alphabet .pill { flex: 0 0 auto; min-height: 40px; padding: 8px 12px; cursor: pointer; font: inherit; font-size: 12px; }
.tag-alphabet .pill:disabled { opacity: .35; cursor: default; box-shadow: none; transform: none; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.tag-list .tag-link { max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 13px; padding: 11px 15px; border-radius: 11px; }
.tag-directory .pill:focus-visible { outline: 2px solid #ffcb7f; outline-offset: 3px; }
.tag-directory .pill:not(:disabled):active { transform: scale(.96); }
.tag-empty { padding: 28px 0; color: #d6c4aa; }
.tag-empty-help { color: #aaa6a0; }
.tag-more, .tag-pagination { display: flex; justify-content: center; gap: 12px; margin-top: 26px; }
.tag-more:has(button[hidden]), .tag-pagination:empty { display: none; }
.tag-directory [hidden] { display: none !important; }
.tag-results { padding-bottom: 18px; }
.tag-results .tag-back { display: inline-flex; gap: 8px; align-items: center; color: #ffc47c; font-size: 12px; }
@media (hover: hover) and (pointer: fine) {
    .tag-directory .pill:not(:disabled):hover { color: #ffd08b; border-color: #ffa62c; box-shadow: 0 0 18px #ff990026; transform: translateY(-1px); }
    .tag-directory .pill.selected:hover { color: #201200; }
}
@media (max-width: 680px) {
    .tag-heading { padding-top: 0; }
    .tag-heading p, .tag-results p { font-size: 12px; }
    .tag-list { gap: 8px; }
    .tag-list .tag-link { font-size: 12px; padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .tag-directory .pill:not(:disabled):hover, .tag-directory .pill:not(:disabled):active { transform: none; transition: none; }
}
