/* Library and My Creations styles */
.biome-library {
    display: grid;
    gap: 22px;
}

.texture-library {
    display: grid;
    gap: 22px;
}

[data-library-card][hidden] {
    display: none;
}

.library-search {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(245, 197, 66, 0.28), rgba(0, 168, 198, 0.16)),
        #ffffff;
    box-shadow: var(--panel-shadow);
}

.library-search form {
    display: grid;
    gap: 10px;
}

.library-search label {
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 900;
}

.library-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.library-search input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-weight: 900;
}

.library-search button,
.library-clear-filter {
    min-height: 42px;
    padding: 8px 12px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--green);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.library-clear-filter {
    justify-self: start;
    background: #ffffff;
    color: var(--ink);
}

.library-search button:hover,
.library-search button:focus-visible,
.library-clear-filter:hover,
.library-clear-filter:focus-visible {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--yellow);
}

.library-search p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.library-popular-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.library-popular-tags span {
    color: var(--ink);
    font-weight: 900;
}

.library-popular-tags button,
.library-popular-tags a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 4px 9px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 900;
}

.library-popular-tags button:hover,
.library-popular-tags button:focus-visible,
.library-popular-tags a:hover,
.library-popular-tags a:focus-visible,
.library-popular-tags a.is-active {
    background: var(--yellow);
}

.library-result-summary {
    margin: 0;
    color: var(--muted);
    font-weight: 900;
}

.account-save-panel {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(0, 143, 104, 0.14), rgba(245, 197, 66, 0.18)),
        #ffffff;
}

.account-save-panel form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.account-save-panel button,
.account-save-panel a {
    min-height: 36px;
    padding: 7px 11px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--green);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.account-save-panel small,
.account-save-panel p {
    margin: 0;
    color: var(--muted);
    font-weight: 900;
}

.account-save-panel-inline {
    margin: 10px 0;
}

.my-creations-section {
    display: grid;
    gap: 14px;
}

.creation-tabs {
    display: grid;
    gap: 0;
}

.creation-tab-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.creation-tab-list {
    display: flex;
    align-items: end;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 10px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.creation-tab-list::-webkit-scrollbar {
    display: none;
}

.creation-tab-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    min-height: 54px;
    padding: 12px 18px 16px;
    border: 2px solid var(--ink);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    font-weight: 900;
    box-shadow: 5px -3px 0 rgba(0, 0, 0, 0.08);
    transform: translateY(10px);
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
    white-space: nowrap;
}

.creation-tab-label:hover,
.creation-tab-label:focus-visible {
    transform: translateY(4px);
    box-shadow: 5px -3px 0 rgba(0, 168, 198, 0.24);
}

.creation-tab-label-textures {
    background:
        linear-gradient(90deg, rgba(0, 120, 212, 0.16), rgba(0, 168, 198, 0.12)),
        #ffffff;
}

.creation-tab-label-masks {
    background:
        linear-gradient(90deg, rgba(245, 197, 66, 0.26), rgba(0, 143, 104, 0.14)),
        #ffffff;
}

.creation-tab-label-colours {
    background:
        linear-gradient(90deg, rgba(229, 72, 77, 0.16), rgba(245, 197, 66, 0.22)),
        #ffffff;
}

.creation-tab-label-batches {
    background:
        linear-gradient(90deg, rgba(0, 168, 198, 0.18), rgba(0, 120, 212, 0.22)),
        #ffffff;
}

.creation-tab-panels {
    position: relative;
    display: grid;
    padding: 18px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(238, 246, 244, 0.9)),
        #ffffff;
    box-shadow: var(--chroma-shadow-small);
}

.creation-tab-panel {
    display: none;
    opacity: 0;
    transform: translateY(8px);
}

#creation-tab-textures:checked ~ .creation-tab-list .creation-tab-label-textures,
#creation-tab-masks:checked ~ .creation-tab-list .creation-tab-label-masks,
#creation-tab-colours:checked ~ .creation-tab-list .creation-tab-label-colours,
#creation-tab-batches:checked ~ .creation-tab-list .creation-tab-label-batches {
    z-index: 3;
    background: #ffffff;
    transform: translateY(2px);
    box-shadow:
        5px -3px 0 rgba(245, 197, 66, 0.84),
        10px -6px 0 rgba(0, 168, 198, 0.32);
}

#creation-tab-textures:checked ~ .creation-tab-panels .creation-tab-panel-textures,
#creation-tab-masks:checked ~ .creation-tab-panels .creation-tab-panel-masks,
#creation-tab-colours:checked ~ .creation-tab-panels .creation-tab-panel-colours,
#creation-tab-batches:checked ~ .creation-tab-panels .creation-tab-panel-batches {
    display: grid;
    animation: creation-tab-fade 180ms ease both;
}

@keyframes creation-tab-fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.creation-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.creation-card {
    overflow: hidden;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--panel-shadow);
}

.creation-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-bottom: 2px solid var(--ink);
}

.creation-card > div {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.creation-card h3,
.creation-card p {
    margin: 0;
}

.creation-card dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
}

.creation-card dl div {
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fbfd;
}

.creation-card dt,
.creation-card dd {
    margin: 0;
}

.creation-card dt {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.creation-card dd,
.creation-card small {
    font-weight: 900;
}

.creation-card .texture-library-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--green);
    color: #ffffff;
    font-weight: 900;
}

.bulk-history-filter-form {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(0, 168, 198, 0.1), rgba(245, 197, 66, 0.14)),
        #ffffff;
}

.bulk-history-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.bulk-history-filter-grid label {
    display: grid;
    gap: 6px;
}

.bulk-history-filter-grid span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bulk-history-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.bulk-batch-card > div {
    gap: 12px;
}

.bulk-batch-card dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bulk-batch-card-completed {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(236, 250, 246, 0.94)),
        #ffffff;
}

.bulk-batch-card-failed {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 240, 235, 0.96)),
        #ffffff;
}

.bulk-batch-card-canceled {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 245, 236, 0.96)),
        #ffffff;
}

.library-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--panel-shadow);
}

.library-pagination a,
.library-pagination span,
.library-pagination strong {
    min-height: 38px;
    padding: 8px 12px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    font-weight: 900;
}

.library-pagination a {
    background: var(--blue);
    color: #ffffff;
}

.library-pagination a:hover,
.library-pagination a:focus-visible {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--yellow);
}

.library-pagination span {
    background: #eef1f3;
    color: var(--muted);
}

.library-pagination strong {
    background: #fff3cf;
    color: var(--ink);
}

.biome-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.texture-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 340px));
    gap: 16px;
    justify-content: start;
    align-items: start;
}

.biome-library-grid .saved-biome-card {
    min-height: 190px;
    align-content: start;
    border: 2px solid var(--ink);
    box-shadow: var(--panel-shadow);
}

.biome-library-grid .saved-biome-strip {
    min-height: 34px;
    margin-top: 8px;
}

.biome-library-grid .saved-biome-strip span {
    min-height: 34px;
}

.biome-library-card {
    cursor: default;
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.biome-library-card:hover,
.biome-library-card:focus-within {
    transform: translateY(-2px);
}

.biome-variation-tray {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.biome-variation-tray summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    min-height: 38px;
    padding: 8px 10px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(245, 197, 66, 0.2), rgba(0, 168, 198, 0.14)),
        #ffffff;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 900;
    list-style: none;
}

.biome-variation-tray summary::-webkit-details-marker {
    display: none;
}

.biome-variation-tray summary::after {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: var(--ink);
    color: #ffffff;
    line-height: 1;
}

.biome-variation-tray[open] summary {
    background: var(--blue);
    color: #ffffff;
}

.biome-variation-tray[open] summary::after {
    content: "-";
    background: #ffffff;
    color: var(--ink);
}

.biome-variation-tray summary:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

.biome-variation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 0;
    overflow-y: hidden;
    opacity: 0;
    padding-right: 4px;
    scrollbar-gutter: stable;
    transform: translateY(-8px);
    transition:
        max-height 260ms ease,
        opacity 180ms ease,
        transform 220ms ease;
    pointer-events: none;
}

.biome-variation-tray[open] .biome-variation-grid {
    max-height: 260px;
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.biome-variation-pick {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 8px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #eef8ff;
    color: var(--ink);
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.biome-variation-pick.is-active {
    background: #fff3cf;
}

.biome-variation-pick:hover,
.biome-variation-pick:focus-visible {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 rgba(10, 15, 31, 0.18);
}

.biome-variation-pick span:first-child {
    font-weight: 900;
    overflow-wrap: anywhere;
}

.biome-variation-pick .saved-biome-strip {
    min-height: 18px;
    margin-top: 2px;
}

.biome-variation-pick .saved-biome-strip span {
    min-height: 18px;
}

.biome-library-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--green);
    color: #ffffff;
    font-weight: 900;
    text-decoration: none;
}

.texture-library-card {
    display: grid;
    width: min(100%, 340px);
    min-width: 0;
    overflow: hidden;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background:
        linear-gradient(180deg, #ffffff 0 70%, #fff3cf 70% 100%);
    box-shadow: var(--panel-shadow);
}

.texture-library-preview {
    display: block;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-bottom: 2px solid var(--ink);
    background:
        linear-gradient(45deg, #d8dbe2 25%, transparent 25%),
        linear-gradient(-45deg, #d8dbe2 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d8dbe2 75%),
        linear-gradient(-45deg, transparent 75%, #d8dbe2 75%),
        #ffffff;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0;
    background-size: 24px 24px;
}

.texture-library-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease, opacity 180ms ease;
}

.texture-library-card:hover .texture-library-preview img,
.texture-library-card:focus-within .texture-library-preview img {
    transform: scale(1.025);
}

.texture-library-copy {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.texture-library-copy h2 {
    font-size: 1.35rem;
    line-height: 1.05;
}

.texture-maker-pill {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 5px;
    margin: 0;
    min-height: 32px;
    padding: 5px 10px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(245, 197, 66, 0.34), rgba(0, 168, 198, 0.18)),
        #ffffff;
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 900;
}

.texture-maker-pill strong {
    color: var(--green);
}

.texture-latest-maker {
    justify-self: start;
    max-width: 100%;
    margin: -6px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.texture-library-copy dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px;
    margin: 0;
}

.texture-library-copy dl div {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.texture-library-copy dt,
.texture-library-copy dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.texture-library-copy dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.texture-library-copy dd {
    font-weight: 900;
}

.texture-variation-tray {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.texture-variation-tray summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    min-height: 38px;
    padding: 8px 10px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(245, 197, 66, 0.2), rgba(0, 168, 198, 0.14)),
        #ffffff;
    color: var(--ink);
    cursor: pointer;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    list-style: none;
}

.texture-variation-tray summary::-webkit-details-marker {
    display: none;
}

.texture-variation-tray summary::after {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: var(--ink);
    color: #ffffff;
    line-height: 1;
}

.texture-variation-tray[open] summary {
    background: var(--blue);
    color: #ffffff;
}

.texture-variation-tray[open] summary::after {
    content: "-";
    background: #ffffff;
    color: var(--ink);
}

.texture-variation-tray summary:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

.texture-variation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
    gap: 8px;
    max-height: 0;
    overflow-y: hidden;
    opacity: 0;
    padding-right: 4px;
    scrollbar-gutter: stable;
    transform: translateY(-8px);
    transition:
        max-height 260ms ease,
        opacity 180ms ease,
        transform 220ms ease;
    pointer-events: none;
}

.texture-variation-tray[open] .texture-variation-grid {
    max-height: 224px;
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.texture-variation-pick {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 5px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #eef8ff;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.texture-variation-pick.is-active {
    background: #fff3cf;
}

.texture-variation-pick:hover,
.texture-variation-pick:focus-visible {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 rgba(10, 15, 31, 0.18);
}

.texture-variation-pick img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
}

.texture-variation-pick span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.texture-variation-loading {
    grid-column: 1 / -1;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff9e8;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.library-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.library-tags span,
.library-tags button {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
}

.library-tags span:hover,
.library-tags span:focus-visible,
.library-tags button:hover,
.library-tags button:focus-visible {
    border-color: var(--ink);
    background: #e2f5f2;
    color: var(--ink);
}

.library-vote-widget {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    align-items: center;
}

.library-vote-score,
.library-vote-widget a,
.library-vote-widget button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 5px 8px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
}

.library-vote-score {
    min-width: 48px;
    background: #fff3cf;
}

.library-vote-widget button {
    gap: 5px;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.library-vote-widget button:hover,
.library-vote-widget button:focus-visible {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--yellow);
}

.library-vote-widget button.is-active {
    background: var(--green);
    color: #ffffff;
}

.library-vote-widget button[value="-1"].is-active {
    background: var(--coral);
}

.library-vote-widget a {
    grid-column: span 2;
    background: #e2f5f2;
}

.library-vote-status {
    grid-column: 1 / -1;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 900;
}

.tag-editor-panel {
    display: grid;
    gap: 8px;
}

.tag-edit-details {
    display: grid;
    gap: 8px;
}

.tag-edit-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(245, 197, 66, 0.24), rgba(0, 168, 198, 0.16)),
        #ffffff;
    color: var(--ink);
    cursor: pointer;
    font-weight: 900;
    list-style: none;
}

.tag-edit-details summary::-webkit-details-marker {
    display: none;
}

.tag-edit-details summary::after {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: var(--ink);
    color: #ffffff;
    line-height: 1;
}

.tag-edit-details[open] summary {
    background: var(--green);
    color: #ffffff;
}

.tag-edit-details[open] summary::after {
    content: "-";
    background: #ffffff;
    color: var(--ink);
}

.tag-edit-details summary:hover,
.tag-edit-details summary:focus-visible {
    box-shadow: 4px 4px 0 var(--yellow);
    transform: translate(-1px, -1px);
}

.tag-edit-form {
    display: grid;
    gap: 8px;
    margin: 8px 0 0;
    padding: 10px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(245, 197, 66, 0.2), rgba(0, 168, 198, 0.14)),
        #ffffff;
}

.tag-edit-form label {
    color: var(--ink);
    font-weight: 900;
}

.tag-edit-form textarea {
    width: 100%;
    min-height: 70px;
    min-width: 0;
    resize: vertical;
    padding: 8px 10px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-weight: 800;
}

.tag-edit-form p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.35;
}

.tag-edit-form button {
    justify-self: start;
    min-height: 38px;
    padding: 8px 12px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--green);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.tag-edit-form button:hover,
.tag-edit-form button:focus-visible {
    background: var(--blue);
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--yellow);
}

.tag-edit-status {
    color: var(--green);
    font-weight: 900;
}

.texture-library-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.texture-library-actions a,
.texture-library-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--blue);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.texture-library-actions a:last-child,
.texture-library-actions button {
    background: var(--green);
}

.texture-library-actions a:first-of-type {
    background: var(--coral);
}

.texture-library-actions .texture-library-download {
    grid-column: 1 / -1;
}

.admin-inline-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.admin-inline-form {
    margin: 0;
}

.texture-library-actions .admin-inline-form {
    grid-column: span 1;
}

.texture-library-actions .admin-inline-form-danger {
    grid-column: 1 / -1;
}

.admin-inline-form button {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #fff3cf;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}


@media (max-width: 640px) {
    .library-search-row,
    .texture-library-copy dl,
    .texture-library-actions,
    .admin-inline-actions {
        grid-template-columns: 1fr;
    }
}
