.py-search {
    --search-gold: #f6cf3c;
    --search-ink: #17130b;
    max-width: 1180px;
    margin: 0 auto;
    color: #eadba7;
}

.py-search-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 5vw, 58px);
    border: 1px solid #695421;
    background:
        radial-gradient(circle at 86% 15%, rgba(246, 207, 60, .2), transparent 28%),
        linear-gradient(135deg, #272010, #15120b 62%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}

.py-search-hero > p:first-child {
    margin: 0;
    color: #bda85e;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .16em;
}

.py-search-hero h1 {
    max-width: 760px;
    margin: 12px 0 8px;
    color: #fff0ae;
    font-size: clamp(34px, 6vw, 66px);
    line-height: .98;
    letter-spacing: -.045em;
}

.py-search-hero h1 span {
    color: var(--search-gold);
}

.py-search-hero > p:not(:first-child) {
    max-width: 760px;
    margin: 0;
    color: #ae9c69;
    font-size: 14px;
    line-height: 1.65;
}

.py-search-form {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    max-width: 860px;
    margin-top: 24px;
    border: 2px solid #806724;
    border-radius: 10px;
    background: #0f0d09;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
}

.py-search-form input {
    min-width: 0;
    padding: 17px 52px 17px 18px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff0ae;
    font: inherit;
    font-size: 15px;
}

.py-search-form input::placeholder {
    color: #75663f;
}

.py-search-form button {
    margin: 4px;
    padding: 0 24px;
    border: 0;
    border-radius: 7px;
    background: var(--search-gold);
    color: var(--search-ink);
    font-weight: 900;
    cursor: pointer;
}

.py-search-form kbd {
    position: absolute;
    right: 112px;
    top: 50%;
    padding: 3px 6px;
    border: 1px solid #5d4b22;
    border-radius: 4px;
    background: #211b0e;
    color: #8e7b49;
    font-size: 9px;
    transform: translateY(-50%);
}

.py-search-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.py-search-examples a {
    padding: 6px 9px;
    border: 1px solid #51411d;
    border-radius: 999px;
    color: #b9a463;
    font-size: 9px;
    text-decoration: none;
}

.py-search-examples a:hover {
    border-color: #927525;
    color: #ffe77b;
}

.py-search-load {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 180px;
    color: #baa762;
}

.py-search-load > span {
    width: 18px;
    height: 18px;
    border: 2px solid #5d4b22;
    border-top-color: var(--search-gold);
    border-radius: 999px;
    animation: py-search-spin .8s linear infinite;
}

.py-search-load.is-error {
    color: #df8770;
}

.py-search-load.is-error > div small {
    display: block;
    margin-top: 4px;
}

.py-search-load.is-error button {
    margin-top: 10px;
}

@keyframes py-search-spin { to { transform: rotate(360deg); } }

.py-search-workbench {
    margin-top: 16px;
}

.py-search-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #4d3e1c;
    background: #1b160d;
}

.py-search-summary-row p {
    margin: 0;
    color: #9d8b55;
    font-size: 11px;
}

.py-search-summary-row strong,
.py-search-summary-row b {
    color: #f0d66d;
}

.py-search-summary-row button {
    border: 0;
    background: transparent;
    color: #d4b943;
    font-size: 9px;
    font-weight: 900;
    cursor: pointer;
}

.py-search-filters {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}

.py-search-filters button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #4b3d1b;
    background: #1c170d;
    color: #9d8b55;
    cursor: pointer;
}

.py-search-filters button.is-active {
    border-color: #9e7e25;
    background: rgba(246, 207, 60, .12);
    color: #ffe77b;
}

.py-search-filters span {
    overflow: hidden;
    font-size: 8px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.py-search-filters strong {
    color: #d4b943;
    font-size: 8px;
}

.py-search-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.py-search-result {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 112px;
    padding: 17px;
    overflow: hidden;
    border: 1px solid #4d3e1c;
    background: linear-gradient(135deg, #221b0e, #17130c);
    color: inherit;
    text-decoration: none;
    transition: border-color .16s ease, transform .16s ease;
}

.py-search-result:hover {
    border-color: #957624;
    transform: translateY(-2px);
}

.py-search-result-type {
    position: absolute;
    left: 10px;
    top: 7px;
    color: #7d6a3b;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.py-search-result-image,
.py-search-result-symbol {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-top: 8px;
    border: 1px solid #5b4920;
    border-radius: 8px;
    background: #100e09;
}

.py-search-result-image img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    image-rendering: pixelated;
}

.py-search-result-symbol {
    color: #e3c64d;
    font-size: 8px;
    font-weight: 900;
}

.py-search-result-copy,
.py-search-result-copy strong,
.py-search-result-copy small,
.py-search-result-copy p {
    display: block;
    min-width: 0;
}

.py-search-result-copy strong {
    color: #f0dfa5;
    font-size: 15px;
}

.py-search-result-copy small {
    margin-top: 4px;
    overflow: hidden;
    color: #b49c50;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.py-search-result-copy p {
    display: -webkit-box;
    margin: 6px 0 0;
    overflow: hidden;
    color: #887747;
    font-size: 9px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.py-search-result > b {
    color: #d9bd43;
    font-size: 8px;
    white-space: nowrap;
}

.py-search-empty {
    grid-column: 1 / -1;
    padding: 42px 20px;
    border: 1px dashed #59471f;
    background: #19150d;
    text-align: center;
}

.py-search-empty strong {
    color: #ead997;
}

.py-search-empty p {
    color: #8e7b49;
}

.py-search-empty div {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.py-search-empty a {
    color: #e5c94e;
}

.py-search-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 14px;
}

.py-search-pagination button {
    min-width: 34px;
    padding: 8px;
    border: 1px solid #4d3e1c;
    background: #1b160d;
    color: #ab985c;
    cursor: pointer;
}

.py-search-pagination button.is-active {
    border-color: #a18125;
    background: var(--search-gold);
    color: #18140b;
}

.py-search-pagination button:disabled {
    opacity: .42;
    cursor: default;
}

@media (max-width: 900px) {
    .py-search-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .py-search-results { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .py-search-hero { padding: 25px 17px; }
    .py-search-form { grid-template-columns: 1fr; }
    .py-search-form input { padding-right: 18px; }
    .py-search-form button { min-height: 42px; }
    .py-search-form kbd { display: none; }
    .py-search-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .py-search-summary-row { align-items: flex-start; }
    .py-search-result { grid-template-columns: 46px minmax(0, 1fr); padding: 16px 12px; }
    .py-search-result-image,
    .py-search-result-symbol { width: 42px; height: 42px; }
    .py-search-result-image img { width: 38px; height: 38px; }
    .py-search-result > b { display: none; }
}
