:root {
    color-scheme: light;
    --bg: #f7f7f4;
    --panel: #ffffff;
    --text: #20231f;
    --muted: #697067;
    --line: #d9ded5;
    --accent: #276749;
    --accent-dark: #1f513a;
    --danger: #a33a2f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--accent-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 18px;
}

.public-page,
.home-page,
.catalog-page,
.browse-page {
    width: min(1760px, calc(100vw - 36px));
    max-width: none;
}

.site-shell {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.site-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 45px;
    width: min(1760px, calc(100vw - 36px));
    max-width: none;
    margin: 0 auto;
    padding: 0 18px;
    background: #ffffff;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    min-width: 130px;
    min-height: 36px;
    color: var(--text);
    font-weight: 800;
    font-size: 20px;
}

.site-logo img {
    display: block;
    max-width: 190px;
    max-height: 34px;
    object-fit: contain;
}

.site-login {
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.site-language-switch {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    border: 1px solid var(--line);
}

.site-language-switch a {
    display: grid;
    place-items: center;
    min-width: 34px;
    min-height: 28px;
    padding: 0 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.site-language-switch a + a {
    border-left: 1px solid var(--line);
}

.site-language-switch a:hover,
.site-language-switch a.active {
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
}

.site-login-link,
.site-login-user {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.site-login-icon {
    display: none;
}

.site-login-icon::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 35%, var(--accent-dark) 0 22%, transparent 23%),
        radial-gradient(ellipse at 50% 82%, var(--accent-dark) 0 38%, transparent 39%);
}

.site-search-toggle,
.site-menu-toggle {
    display: none;
}

.site-search-toggle,
.site-menu-toggle,
.site-search-close {
    border: 0;
    cursor: pointer;
}

.site-search-toggle {
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eef5ed;
    color: var(--accent-dark);
    box-shadow: 0 4px 12px rgba(31, 81, 58, 0.1);
}

.site-search-toggle-icon {
    position: relative;
    width: 18px;
    height: 18px;
    border: 3px solid currentColor;
    border-radius: 50%;
}

.site-search-toggle-icon::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -5px;
    width: 8px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: left center;
}

.site-menu-toggle {
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #eef5ed;
    color: var(--accent-dark);
    box-shadow: 0 4px 12px rgba(31, 81, 58, 0.08);
}

.site-menu-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    margin: 1.8px 0;
    border-radius: 999px;
    background: currentColor;
}

.site-menu-backdrop[hidden] {
    display: none;
}

.site-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 118;
    border: 0;
    background: rgba(19, 23, 20, 0.18);
}

.site-search-modal[hidden] {
    display: none;
}

.site-search-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: start center;
    padding: 74px 16px 16px;
}

.site-search-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(19, 23, 20, 0.44);
}

.site-search-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    width: min(520px, 100%);
    border: 1px solid #dce3db;
    border-radius: 14px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(20, 28, 23, 0.22);
}

.site-search-close {
    display: grid;
    place-items: center;
    min-width: 38px;
    min-height: 38px;
    border-radius: 10px;
    background: #eef1eb;
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-menu {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    width: min(1760px, calc(100vw - 36px));
    max-width: none;
    margin: 0 auto;
    padding: 6px 18px;
    border-top: 1px solid #eef1eb;
}

.site-menu-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    border-radius: 6px;
    padding: 0 12px;
    color: var(--text);
    font-weight: 700;
}

.site-menu-link.active {
    background: #eef5ed;
    color: var(--accent-dark);
}

.site-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    max-width: 520px;
}

.site-search input {
    min-width: 0;
}

.site-user-menu {
    position: relative;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.site-admin-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border-radius: 999px;
    padding: 0 12px;
    background: var(--accent);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.site-admin-link:hover {
    background: var(--accent-dark);
    color: #ffffff;
    text-decoration: none;
}

.site-user-button,
.site-user-placeholder {
    display: inline-grid;
    place-items: center;
    width: 38px;
    min-height: 38px;
    border-radius: 50%;
    padding: 0;
    background: #eef5ed;
    color: var(--accent-dark);
}

.site-user-glyph {
    position: relative;
    display: block;
    width: 18px;
    height: 18px;
}

.site-user-glyph::before,
.site-user-glyph::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: currentColor;
}

.site-user-glyph::before {
    top: 1px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.site-user-glyph::after {
    bottom: 1px;
    width: 16px;
    height: 8px;
    border-radius: 9px 9px 4px 4px;
}

.site-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 20;
    display: grid;
    min-width: 170px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    background: var(--panel);
    box-shadow: 0 10px 30px rgba(32, 35, 31, 0.12);
}

.site-user-dropdown[hidden] {
    display: none;
}

.site-user-dropdown a {
    border-radius: 6px;
    padding: 8px 10px;
    color: var(--text);
}

.site-user-dropdown a:hover {
    background: #eef5ed;
    text-decoration: none;
}

.site-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    width: min(1760px, calc(100vw - 36px));
    max-width: none;
    margin: 0 auto;
    padding: 6px 18px;
    border-top: 1px solid #eef1eb;
    color: var(--muted);
    font-size: 14px;
}

.site-breadcrumbs strong {
    color: var(--text);
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal:target {
    display: flex;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 31, 26, 0.48);
}

.auth-dialog {
    position: relative;
    z-index: 1;
    width: min(860px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    overflow: auto;
    border: 1px solid #dfe5da;
    border-radius: 14px;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(21, 30, 24, 0.24);
}

.auth-message-dialog {
    width: min(520px, 100%);
}

.auth-dialog-compact {
    width: min(480px, 100%);
}

.auth-close {
    position: absolute;
    top: 14px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--muted);
    font-size: 26px;
    line-height: 1;
}

.auth-close:hover {
    background: #eef5ed;
    text-decoration: none;
}

.auth-dialog-head {
    margin: 0 44px 20px 0;
}

.auth-dialog-head h2 {
    margin: 0 0 6px;
    font-family: Georgia, "Times New Roman", serif;
    color: #173f2e;
}

.auth-dialog-head p {
    margin: 0;
    color: var(--muted);
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.auth-form {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    background: #fbfcfa;
}

.auth-form h3 {
    margin: 0;
}

.auth-form-simple {
    display: grid;
    gap: 14px;
}

.auth-check {
    display: flex !important;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
}

.auth-check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--green);
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
}

.auth-inline-message {
    margin-bottom: 14px;
}

.profile-page {
    display: grid;
    gap: 18px;
}

.profile-form {
    display: grid;
    gap: 14px;
}

.profile-image-preview {
    display: block;
    width: 112px;
    height: 112px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #f4f6f1;
}

.profile-location-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.profile-location-search button {
    min-height: 42px;
}

.profile-city-selected,
.profile-city-results {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfa;
}

.profile-city-selected {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 40px;
    padding: 8px 10px;
    color: var(--muted);
    font-size: 14px;
}

.profile-city-selected strong {
    color: var(--text);
}

.profile-city-selected button {
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    margin-left: auto;
    padding: 0;
    border-radius: 50%;
}

.profile-city-results {
    display: grid;
    overflow: hidden;
}

.profile-city-results button {
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-weight: 600;
}

.profile-city-results button:last-child {
    border-bottom: 0;
}

.profile-city-results button:hover {
    background: #eef5ed;
}

.profile-city-selected[hidden],
.profile-city-results[hidden] {
    display: none !important;
}

.role-box {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.role-box legend {
    padding: 0 6px;
    font-weight: 800;
}

.narrow {
    max-width: 620px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

h1,
h2,
p {
    margin-top: 0;
}

.topbar p,
.muted {
    color: var(--muted);
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    padding: 0 14px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.button:hover {
    background: var(--accent-dark);
    text-decoration: none;
}

.secondary {
    background: #e7ece5;
    color: var(--text);
}

.danger {
    background: var(--danger);
    color: #ffffff;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--panel);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.filter-panel .wide {
    grid-column: span 2;
}

.advanced-filters {
    grid-column: 1 / -1;
}

.advanced-filters summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--accent-dark);
}

.advanced-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.filter-actions {
    display: flex;
    align-items: end;
    gap: 8px;
}

.series-picker {
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
    gap: 8px;
}

.copy-panel {
    display: grid;
    gap: 12px;
    border: 1px solid #c9d5c5;
    border-radius: 8px;
    padding: 12px;
    background: #f2f7f0;
}

.copy-panel[hidden] {
    display: none;
}

.copy-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.copy-panel-head p {
    margin: 3px 0 0;
}

.copy-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
}

.copy-options .check {
    min-height: 30px;
    font-weight: 400;
}

.image-upload-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px);
    gap: 16px;
    align-items: start;
}

.image-preview {
    display: grid;
    place-items: center;
    min-height: 180px;
    border: 1px dashed #bfc9bb;
    border-radius: 8px;
    background: #f2f5f0;
    color: var(--muted);
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    background: #eef1eb;
}

.new-series-fields[hidden] {
    display: none;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    font: inherit;
    background: #ffffff;
}

.search input {
    flex: 1;
}

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

.latest-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.card img,
.placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #eef1eb;
    border-radius: 6px;
}

.placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
}

.card h2 {
    margin: 10px 0 4px;
    font-size: 18px;
}

.card p {
    margin-bottom: 4px;
}

.catalog-hero {
    padding: 10px 0 4px;
}

.catalog-hero h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.05;
}

.browse-compact-hero {
    padding: 2px 0 0;
}

.browse-compact-hero h1 {
    color: #202820;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 2.3vw, 34px);
    font-weight: 650;
    line-height: 1.16;
}

.browse-compact-hero p {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.browse-compact-hero strong {
    color: var(--muted);
    font-weight: 800;
}

.browse-page .browse-compact-hero + .home-section {
    margin-top: 20px;
}

.home-section {
    margin-top: 34px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}

.section-head h2 {
    margin: 0;
    font-size: 24px;
}

.home-section .section-head {
    display: grid;
    gap: 8px;
    margin-bottom: 26px;
    padding-bottom: 18px;
}

.home-section .section-head h2 {
    color: #173f2e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 3vw, 44px);
    font-weight: 700;
    line-height: 1.08;
}

.period-home-section {
    margin-top: 16px;
}

.period-home-section .section-head {
    margin-bottom: 18px;
    padding-bottom: 12px;
}

.period-home-section .section-head h2 {
    font-size: clamp(24px, 2.35vw, 35px);
}

.home-section .section-head p {
    margin: 0;
    color: #6f7972;
    font-size: 15px;
    line-height: 1.5;
}

.section-head span {
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.catalog-card {
    display: grid;
    gap: 4px;
}

.catalog-card a {
    color: inherit;
}

.catalog-card h2 {
    line-height: 1.25;
}

.catalog-card p {
    color: var(--muted);
}

.catalog-page {
    max-width: none;
}

.catalog-titlebar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.catalog-titlebar h1 {
    margin-bottom: 4px;
}

.catalog-sort label {
    display: grid;
    gap: 5px;
    min-width: 180px;
    font-weight: 700;
}

.active-filter-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.active-filter-list strong {
    margin-right: 2px;
    color: var(--text);
}

.active-filter-chip,
.active-filter-clear {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 0 10px;
    background: #eef5ed;
    color: var(--accent-dark);
    font-size: 14px;
    font-weight: 700;
}

.active-filter-clear {
    background: #f1f3ef;
    color: var(--muted);
}

.active-filter-chip:hover,
.active-filter-clear:hover {
    text-decoration: none;
    background: #dfeadd;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.catalog-sidebar {
    position: sticky;
    top: 12px;
}

.mobile-filter-toggle,
.mobile-filter-close,
.catalog-filter-backdrop,
.mobile-facet-values {
    display: none;
}

.facet-category-panel {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--panel);
}

.browse-mode-switch .button {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    padding: 7px 9px;
    font-size: 13px;
    line-height: 1.2;
}

.facet-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.facet-category-panel h2 {
    margin: 0;
    font-size: 18px;
}

.facet-category-list {
    display: grid;
    gap: 7px;
}

.facet-category-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0 10px;
    background: #fbfcfa;
    color: var(--accent-dark);
    font-weight: 700;
}

.facet-category-button:hover {
    text-decoration: none;
    border-color: #bfd3bd;
    background: #eef5ed;
}

.facet-category-button.is-open {
    border-color: var(--accent);
    background: #e9f3e6;
}

.facet-category-button.is-disabled {
    color: #8c968a;
    background: #f2f3f0;
    cursor: default;
}

.browse-subnav {
    display: grid;
    gap: 5px;
    margin: -2px 0 6px 10px;
    padding-left: 10px;
    border-left: 2px solid #dfe8dc;
}

.browse-subnav-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 28px;
    border-radius: 6px;
    padding: 4px 8px;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 700;
}

.browse-subnav-button:hover {
    background: #eef5ed;
    text-decoration: none;
}

.browse-subnav-button.active {
    background: var(--accent);
    color: #ffffff;
}

.browse-subnav-button span {
    color: var(--muted);
    font-size: 12px;
}

.browse-subnav-button.active span {
    color: rgba(255, 255, 255, 0.82);
}

.facet-value-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 14px;
    background: var(--panel);
}

.facet-value-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.facet-value-panel h2 {
    margin: 0;
    font-size: 18px;
}

.facet-value-panel header a {
    color: var(--muted);
    font-size: 14px;
}

.facet-value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 6px;
}

.facet-value-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 34px;
    border: 1px solid #e3e8df;
    border-radius: 7px;
    padding: 0 9px;
    color: var(--accent-dark);
    background: #fbfcfa;
    font-size: 14px;
}

.facet-value-chip:hover {
    text-decoration: none;
    background: #eef5ed;
    border-color: #bfd3bd;
}

.facet-value-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.facet-value-chip strong {
    color: var(--text);
}

.catalog-results {
    min-width: 0;
}

.catalog-controls {
    display: grid;
    grid-template-columns: minmax(118px, 150px) auto 92px auto auto;
    align-items: end;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px;
    margin-bottom: 10px;
    background: #fbfcfa;
}

.catalog-controls label {
    display: grid;
    min-width: 0;
    gap: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.catalog-controls > label:first-of-type {
    order: 1;
}

.catalog-controls > label:nth-of-type(2) {
    order: 4;
}

.catalog-controls > .catalog-view-toggle {
    order: 2;
}

.catalog-controls > .catalog-variant-switch {
    order: 3;
}

.catalog-controls > .catalog-count {
    order: 5;
}

.catalog-controls > .catalog-pagination {
    order: 6;
}

.catalog-controls select {
    width: 100%;
    min-height: 30px;
    height: 30px;
    padding: 3px 7px;
    font-size: 13px;
}

.catalog-view-toggle {
    display: inline-flex;
    align-self: end;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f1f3ef;
}

.catalog-view-toggle a,
.catalog-view-toggle span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.catalog-view-toggle a:hover {
    background: #dfeadd;
    text-decoration: none;
}

.catalog-view-toggle .is-active {
    background: var(--accent);
    color: #ffffff;
    cursor: default;
}

.catalog-variant-switch {
    display: inline-flex !important;
    align-items: center;
    gap: 6px !important;
    align-self: end;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f7f8f5;
    color: var(--accent-dark);
    font-size: 13px !important;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.catalog-variant-switch input {
    width: auto;
    margin: 0;
    accent-color: var(--accent);
}

.catalog-count {
    align-self: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin-right: 0;
    white-space: nowrap;
}

.catalog-pagination {
    display: grid;
    grid-template-columns: 30px auto 30px;
    align-items: center;
    justify-content: end;
    gap: 3px;
}

.catalog-pagination a,
.catalog-pagination span,
.catalog-pagination strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    height: 28px;
    border-radius: 999px;
    padding: 0 7px;
    background: #f1f3ef;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.catalog-pagination a {
    background: #eef5ed;
    color: var(--accent-dark);
}

.catalog-pagination a:hover {
    text-decoration: none;
    background: #dfeadd;
}

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

.catalog-result-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--panel);
}

.catalog-result-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.catalog-result-image {
    display: block;
    width: 92px;
    height: auto;
    border-radius: 6px;
    background: #f3f5f1;
    line-height: 0;
}

.catalog-result-image img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.catalog-list-column-form {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.catalog-list-scroll-top {
    overflow-x: auto;
    overflow-y: hidden;
    height: 14px;
    margin-bottom: 4px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfcfa;
}

.catalog-list-scroll-top > div {
    height: 1px;
}

.catalog-list-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.catalog-column-dropdown {
    position: relative;
    min-width: min(280px, 100%);
}

.catalog-column-dropdown summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0 10px;
    background: #fbfcfa;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    font-size: 0;
}

.catalog-column-dropdown summary::before {
    content: "Megjelen\0151 mez\0151k";
    font-size: 13px;
}

.catalog-column-dropdown > div {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 12;
    display: grid;
    gap: 6px;
    width: 280px;
    max-height: 360px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 10px 0;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(32, 35, 31, 0.16);
}

.catalog-column-dropdown label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.catalog-column-dropdown input {
    width: auto;
    margin: 0;
}

.catalog-column-dropdown button {
    position: sticky;
    bottom: 0;
    min-height: 32px;
    margin: 4px -10px 0;
    border-radius: 0 0 8px 8px;
    font-size: 0;
}

.catalog-column-dropdown button::before {
    content: "Friss\00EDt\00E9s";
    font-size: 13px;
}

.catalog-list-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 13px;
}

.catalog-list-table th,
.catalog-list-table td {
    border-bottom: 1px solid #e8ece4;
    padding: 6px 10px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.catalog-list-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f4f6f1;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.catalog-list-table tr:last-child td {
    border-bottom: 0;
}

.catalog-list-table tr:hover td {
    background: #fbfcfa;
}

.catalog-list-table tr.is-variant td {
    background: #fbfdf8;
    color: #38443f;
}

.catalog-list-table tr.is-variant:hover td {
    background: #f1f7ee;
}

.catalog-list-variant-note {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.catalog-list-image {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 50px;
    border-radius: 6px;
    background: #f3f5f1;
    cursor: zoom-in;
}

.catalog-list-image img {
    display: block;
    max-width: 100%;
    max-height: 50px;
    object-fit: contain;
    border-radius: 5px;
}

.catalog-result-body {
    min-width: 0;
}

.catalog-result-card.is-variant {
    border-color: #cfdccd;
    background: #fbfdf8;
}

.catalog-result-card.is-variant .catalog-result-body h2::before {
    content: "Változat";
    display: inline-flex;
    margin-right: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #e7f0e4;
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
}

.catalog-result-body h2 {
    margin: 0 0 4px;
    font-size: 17px;
    line-height: 1.25;
}

.catalog-result-body p {
    margin-bottom: 8px;
}

.catalog-result-body dl {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 3px 8px;
    margin: 0;
    font-size: 14px;
}

.catalog-result-body dt {
    color: var(--muted);
}

.catalog-card-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.catalog-card-flags span {
    border-radius: 999px;
    padding: 2px 7px;
    background: #eef5ed;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
}

.catalog-card-flags a {
    border-radius: 999px;
    padding: 2px 7px;
    background: #eef5ed;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
}

.catalog-card-flags a:hover {
    text-decoration: none;
    background: #dfeadd;
}

.catalog-user-lists {
    position: relative;
    display: grid;
    gap: 5px;
    width: 92px;
    margin-top: 10px;
}

.catalog-user-list-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.catalog-user-list-empty {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
}

.catalog-user-list-status {
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.catalog-user-list-status.is-collection {
    background: #e7f2e8;
    color: #235f3b;
}

.catalog-user-list-status.is-wishlist {
    background: #fff4d9;
    color: #8a5c13;
}

.catalog-user-list-toggle {
    width: 100%;
    min-height: 26px;
    border: 1px solid #cbdacb;
    border-radius: 6px;
    padding: 4px 6px;
    background: #f4f8f2;
    color: #1f6542;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.catalog-user-list-toggle:hover,
.catalog-user-list-toggle[aria-expanded="true"] {
    background: #e0ecdf;
}

.catalog-user-list-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    z-index: 15;
    display: grid;
    gap: 7px;
    min-width: 190px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(25, 38, 27, 0.16);
}

.catalog-user-list-menu[hidden] {
    display: none;
}

.catalog-user-list-menu strong {
    color: var(--accent-dark);
    font-size: 12px;
}

.catalog-user-list-menu button {
    width: 100%;
    border: 0;
    border-radius: 5px;
    padding: 7px 8px;
    background: #f3f7f2;
    color: var(--text);
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.catalog-user-list-menu button:hover {
    background: #e4eee3;
}

.public-user-lists {
    position: relative;
    display: grid;
    gap: 5px;
    min-width: 0;
}

.public-user-list-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.public-user-list-empty {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
}

.public-user-list-status {
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.public-user-list-status.is-collection {
    background: #e7f2e8;
    color: #235f3b;
}

.public-user-list-status.is-wishlist {
    background: #fff4d9;
    color: #8a5c13;
}

.public-user-list-status.is-trade {
    background: #e4edf3;
    color: #315f78;
}

.public-user-list-collection-counts {
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.public-user-list-toggle {
    width: 100%;
    min-height: 26px;
    border: 1px solid #cbdacb;
    border-radius: 6px;
    padding: 4px 6px;
    background: #f4f8f2;
    color: #1f6542;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.public-user-list-toggle:hover,
.public-user-list-toggle[aria-expanded="true"] {
    background: #e0ecdf;
}

.public-user-list-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    z-index: 15;
    display: grid;
    gap: 7px;
    min-width: 190px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(25, 38, 27, 0.16);
}

.public-user-list-menu[hidden] {
    display: none;
}

.public-user-list-menu strong {
    color: var(--accent-dark);
    font-size: 12px;
}

.public-user-list-menu button {
    width: 100%;
    border: 0;
    border-radius: 5px;
    padding: 7px 8px;
    background: #f3f7f2;
    color: var(--text);
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.public-user-list-menu button:hover {
    background: #e4eee3;
}

.user-list-item-dialog {
    width: min(420px, calc(100vw - 28px));
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0;
    color: var(--text);
    box-shadow: 0 24px 70px rgba(20, 30, 22, 0.28);
}

.user-list-item-dialog::backdrop {
    background: rgba(25, 34, 27, 0.4);
}

.user-list-item-dialog form {
    position: relative;
    padding: 20px;
}

.user-list-item-dialog h2 {
    margin: 0 32px 4px 0;
    font-size: 20px;
}

.user-list-item-dialog p {
    margin: 0 0 18px;
    font-size: 13px;
}

.user-list-dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 22px;
    cursor: pointer;
}

.user-list-quantity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.user-list-quantity-grid label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.user-list-quantity-option > span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-list-quantity-option > span input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #28734e;
}

.user-list-quantity-option > input {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px;
    font: inherit;
}

.user-list-wishlist-options {
    display: grid;
    gap: 9px;
}

.user-list-wishlist-options[hidden],
[data-user-list-dialog-collection][hidden],
[data-public-user-list-dialog-collection][hidden] {
    display: none;
}

.user-list-wishlist-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}

.user-list-wishlist-options input {
    width: 16px;
    height: 16px;
    accent-color: #28734e;
}

.user-list-item-dialog footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 20px -20px -20px;
    border-top: 1px solid var(--line);
    padding: 12px 20px;
}

.user-lists-heading {
    margin-bottom: 22px;
}

.user-lists-heading h1 {
    margin-bottom: 5px;
}

.user-lists-heading p {
    margin: 0;
    color: var(--muted);
}

.user-lists-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.user-list-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 2px 11px;
    align-items: center;
    min-height: 92px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 15px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 6px 18px rgba(26, 38, 27, 0.05);
}

.user-list-card:hover {
    border-color: #b7cdb9;
    text-decoration: none;
}

.user-list-card-mark {
    display: grid;
    grid-row: span 2;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e7f2e8;
    color: #23613e;
    font-size: 19px;
    font-weight: 800;
}

.user-list-card.is-wishlist .user-list-card-mark {
    background: #fff2d6;
    color: #965f09;
}

.user-list-card strong {
    font-size: 16px;
}

.user-list-card span:last-child {
    color: var(--muted);
    font-size: 13px;
}

.catalog-admin-edit-link {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #eef5ed;
    color: var(--accent-dark);
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
}

.catalog-admin-edit-link:hover {
    background: #dfeadd;
    text-decoration: none;
}

.catalog-admin-edit-cell {
    width: 1%;
    text-align: center;
    white-space: nowrap;
}

.empty-state {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    background: var(--panel);
}

.latest-grid .catalog-card {
    padding: 10px;
}

.latest-grid .catalog-card h2 {
    font-size: 16px;
}

.latest-grid .catalog-card p {
    font-size: 14px;
}

.series-year-block {
    margin-top: 22px;
}

.series-year-block h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.decade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.period-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 20px;
}

.decade-card {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--panel);
    color: inherit;
}

.year-card {
    display: grid;
    gap: 8px;
    min-height: 148px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--panel);
    color: inherit;
}

.decade-card:hover,
.year-card:hover {
    border-color: #aebcac;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(32, 35, 31, 0.08);
}

.year-card.empty {
    background: #f1f3ef;
    color: var(--muted);
}

.year-card.empty:hover {
    border-color: var(--line);
    box-shadow: none;
}

.decade-title {
    margin-top: 10px;
    color: var(--text);
    font-size: 25px;
    font-weight: 800;
    line-height: 1.1;
}

.year-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
}

.period-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(92px, 30%);
    grid-template-rows: minmax(104px, auto) 14px;
    gap: 0 18px;
    border: 1px solid #dde3d8;
    border-radius: 13px;
    padding: 18px 22px 14px;
    overflow: hidden;
    background: #ffffff;
    color: inherit;
    box-shadow: 0 8px 22px rgba(32, 35, 31, 0.05);
}

.period-card:hover {
    border-color: #c1ceb9;
    text-decoration: none;
    box-shadow: 0 13px 30px rgba(32, 35, 31, 0.075);
    transform: translateY(-1px);
}

.period-card.empty {
    background: #f7f8f5;
    color: #8a9189;
    box-shadow: none;
}

.period-card.empty:hover {
    border-color: #dde3d8;
    box-shadow: none;
    transform: none;
}

.period-card.empty::after {
    display: none;
}

.period-card.empty .period-preview {
    opacity: 0.55;
}

.period-card::after {
    content: "›";
    content: "\203A";
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: end;
    color: rgba(31, 81, 58, 0.62);
    font-size: 22px;
    font-weight: 300;
    line-height: 0.8;
}

.period-card-copy {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    align-content: start;
    gap: 13px;
    min-width: 0;
    margin-left: -12px;
    padding: 1px 0 0;
}

.period-title {
    color: #303630;
    max-width: 22ch;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.36;
    text-wrap: balance;
}

.period-title::after {
    content: "";
    display: block;
    width: 30px;
    height: 1px;
    margin-top: 14px;
    background: #8da684;
}

.period-card-foot {
    display: grid;
    gap: 6px;
}

.period-range {
    color: #3f5b4c;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.35;
}

.decade-meta {
    color: #858e86;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.decade-preview {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 6px;
    background: #eef1eb;
}

.year-preview {
    display: grid;
    place-items: center;
    align-self: end;
    justify-self: center;
    width: 86px;
    height: 64px;
    overflow: hidden;
    border-radius: 6px;
    background: transparent;
}

.period-preview {
    display: grid;
    place-items: center;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    margin-right: -17px;
    width: auto;
    max-width: 145px;
    min-width: 0;
    height: auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 8px;
    padding: 4px;
    background: rgba(238, 241, 235, 0.78);
    box-shadow: 0 8px 16px rgba(32, 35, 31, 0.1);
}

.decade-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.decade-card > .placeholder,
.decade-card > .decade-preview,
.decade-card > .decade-preview > img {
    max-width: 100%;
}

.decade-card > .decade-preview > img {
    aspect-ratio: 4 / 3;
}

.year-preview img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: transparent;
    border-radius: 6px;
}

.period-preview img {
    display: block;
    width: auto;
    height: auto;
    max-width: 137px;
    max-height: 132px;
    object-fit: contain;
    border-radius: 7px;
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.series-card {
    position: relative;
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--panel);
}

.series-card a {
    color: inherit;
}

.series-card img,
.series-card .placeholder {
    justify-self: center;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 132px;
    object-fit: contain;
    border-radius: 6px;
    padding: 4px;
    background: rgba(238, 241, 235, 0.78);
    box-shadow: 0 8px 16px rgba(32, 35, 31, 0.1);
}

.series-card h4 {
    margin: 8px 0 0;
    font-size: 17px;
    line-height: 1.25;
}

.series-card p {
    margin: 0;
    color: var(--muted);
}

.frontend-edit-button {
    display: inline-grid;
    place-items: center;
    border: 1px solid #c8d5c3;
    border-radius: 999px;
    background: #eef5ed;
    color: var(--accent-dark);
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(31, 81, 58, 0.12);
}

.frontend-edit-button:hover {
    border-color: #9fb496;
    background: #dfead9;
    text-decoration: none;
}

.frontend-edit-button.card {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
    font-size: 15px;
}

.frontend-edit-button.large {
    width: 44px;
    height: 44px;
    font-size: 22px;
}

.series-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.series-title-row h1 {
    margin: 0;
}

.series-page-navigation {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin: 0 0 8px;
}

.series-page-navigation .button {
    min-width: 0;
    max-width: 50%;
    overflow: hidden;
    padding: 6px 9px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.series-page-navigation .disabled {
    opacity: 0.48;
    cursor: default;
    pointer-events: none;
}

.edit-series-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin: 8px 0 14px;
}

.edit-series-navigation .button {
    min-width: 0;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edit-series-navigation .disabled {
    opacity: 0.48;
    cursor: default;
    pointer-events: none;
}

.frontend-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.frontend-modal:target {
    display: flex;
}

.frontend-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 31, 26, 0.48);
}

.frontend-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow: hidden;
    border: 1px solid #dfe5da;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(21, 30, 24, 0.24);
}

.series-edit-dialog {
    width: min(1320px, 100%);
}

.series-wizard-dialog {
    width: min(1180px, 100%);
}

.stamp-image-dialog {
    width: min(1120px, calc(100vw - 36px));
}

.stamp-detect-dialog {
    width: min(1220px, calc(100vw - 36px));
}

.frontend-dialog-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--line);
}

.frontend-dialog-head h2 {
    margin: 0 0 2px;
    font-size: 22px;
}

.frontend-dialog-head p {
    margin: 0;
    color: var(--muted);
}

.frontend-modal-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--muted);
    font-size: 26px;
    line-height: 1;
}

.frontend-modal-close:hover {
    background: #eef5ed;
    text-decoration: none;
}

.frontend-dialog-body {
    display: grid;
    gap: 12px;
    overflow: auto;
    padding: 16px 20px;
}

.frontend-dialog-body label {
    display: grid;
    gap: 6px;
    font-weight: 800;
}

.frontend-dialog-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: end;
    border-top: 1px solid var(--line);
    padding: 12px 20px;
    background: #ffffff;
}

.series-wizard-body {
    gap: 14px;
}

.series-wizard-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.series-wizard-mode label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: auto;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f7f9f5;
    color: var(--green-dark);
    font-weight: 800;
}

.series-wizard-grid,
.series-wizard-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.series-wizard-fields .wide,
.series-wizard-base > label {
    grid-column: 1 / -1;
}

.series-wizard-progress,
.series-wizard-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
}

.series-wizard-step-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
}

.series-wizard-main {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.series-wizard-media {
    display: grid;
    gap: 10px;
}

.series-wizard-image {
    align-content: start;
}

.series-wizard-image img {
    width: 100%;
    max-height: 230px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f4f6f2;
    padding: 8px;
}

.series-wizard-actions {
    gap: 8px;
}

.series-wizard-apply-panel {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(24, 31, 26, 0.34);
}

.series-wizard-apply-panel[hidden] {
    display: none !important;
}

.series-wizard-apply-box {
    width: min(520px, 100%);
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(20, 33, 25, 0.18);
}

.series-wizard-apply-box h3 {
    margin: 0 0 6px;
    color: var(--green-dark);
    font-size: 20px;
}

.series-wizard-apply-box p {
    margin: 0 0 14px;
    color: var(--muted);
}

.series-wizard-apply-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.series-wizard-apply-fields label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 800;
}

.series-wizard-apply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.frontend-image-replace-button {
    width: 100%;
    margin-top: 8px;
    justify-content: center;
    font-size: 13px;
}

.image-source-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.image-source-choice[hidden] {
    display: none !important;
}

.image-source-choice button {
    width: auto;
    min-height: 38px;
    margin-top: 0;
    padding: 0 14px;
    border-radius: 9px;
}

.detect-extra-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    border: 1px solid #d8e0d4;
    border-radius: 10px;
    padding: 10px;
    background: #fbfcfa;
}

.detect-extra-fields[hidden] {
    display: none !important;
}

.detect-extra-fields label:nth-child(2) {
    grid-column: 1 / -1;
}

.image-editor-native-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.image-editor {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #d8e0d4;
    border-radius: 12px;
    background: #f7f9f5;
}

.image-editor[hidden] {
    display: none;
}

.image-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.image-editor-head strong {
    color: #202820;
}

.image-editor-head span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.image-editor canvas {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #cdd8c7;
    border-radius: 10px;
    background: #eef1ec;
    touch-action: none;
}

.image-editor-help {
    margin: 0;
    color: #59645a;
    font-size: 14px;
    font-weight: 600;
}

.image-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.image-editor-actions button {
    width: auto;
    min-height: 34px;
    margin-top: 0;
    padding: 0 12px;
    border-radius: 8px;
}

.image-editor-actions button[disabled] {
    opacity: 0.45;
    cursor: default;
}

.image-editor-result {
    padding: 9px 10px;
    border-radius: 8px;
    background: #e8f3e5;
    color: #1f5e3f;
    font-weight: 800;
}

.auto-detect-status {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #cfe1c9;
    border-radius: 10px;
    background: #eef7eb;
    color: #22583b;
    font-weight: 800;
}

.auto-detect-status.is-error {
    border-color: #efc8bd;
    background: #fff0eb;
    color: #9a2f1f;
}

.auto-detect-workspace {
    overflow: auto;
    border: 1px solid #d8e0d4;
    border-radius: 12px;
    background: #f3f5f1;
}

.auto-detect-workspace canvas {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: crosshair;
}

.auto-detect-candidates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auto-detect-candidates button {
    width: auto;
    min-height: 34px;
    margin-top: 0;
    padding: 0 12px;
    border-radius: 8px;
}

.auto-detect-candidates button.active {
    background: var(--green);
    color: #ffffff;
}

.auto-detect-candidates .original-image-upload-button {
    border-color: #a94f3e;
    color: #ffffff;
    background: #b85f49;
    box-shadow: 0 3px 8px rgba(116, 48, 35, .2);
}

.auto-detect-candidates .original-image-upload-button:hover,
.auto-detect-candidates .original-image-upload-button:focus-visible {
    border-color: #7f382d;
    color: #ffffff;
    background: #924737;
}

.auto-detect-candidates .alternate-detector-button { border-color:#b1843f; color:#102f26; background:#e1c27f; box-shadow:0 3px 8px rgba(91,65,24,.16); }
.auto-detect-candidates .alternate-detector-button:hover,
.auto-detect-candidates .alternate-detector-button:focus-visible { border-color:#765621; color:#fff; background:#765621; }

.frontend-modal.is-guide-stage .stamp-detect-dialog { width:min(1100px,66.666vw); grid-template-rows:auto auto; max-height:calc(100svh - 36px); }
.frontend-modal.is-guide-stage .frontend-dialog-body { overflow:hidden; padding:14px 18px 18px; }
.frontend-modal.is-guide-stage .frontend-dialog-body > :not(.stamp-upload-guide):not(.image-editor-native-input) { display:none !important; }
.frontend-modal.is-guide-stage .frontend-dialog-actions { display:none; }
.frontend-modal.is-submitting .frontend-dialog { display:none; }
.stamp-submit-progress { position:relative; z-index:2; width:min(360px,calc(100vw - 36px)); padding:28px 24px; display:grid; justify-items:center; gap:8px; border:2px solid #d1b06f; color:#fff; background:#102f26; box-shadow:0 22px 70px rgba(0,0,0,.35); text-align:center; }
.stamp-submit-progress svg { width:92px; height:92px; overflow:visible; }
.stamp-submit-progress-paper { fill:#f7f1df; stroke:#d1b06f; stroke-width:3; stroke-dasharray:5 3; }
.stamp-submit-progress-mark { fill:none; stroke:#b85f49; stroke-width:7; stroke-linecap:round; stroke-linejoin:round; animation:stamp-submit-pulse .8s ease-in-out infinite alternate; }
.stamp-submit-progress-orbit { fill:none; stroke:#d1b06f; stroke-width:4; stroke-linecap:round; stroke-dasharray:62 202; transform-origin:48px 48px; animation:stamp-submit-spin 1s linear infinite; }
.stamp-submit-progress strong { font:600 1.1rem/1.15 Georgia,serif; }
.stamp-submit-progress span { color:rgba(255,255,255,.7); font-size:.65rem; }
@keyframes stamp-submit-spin { to { transform:rotate(360deg); } }
@keyframes stamp-submit-pulse { from { opacity:.45; transform:scale(.92); transform-origin:center; } to { opacity:1; transform:scale(1); transform-origin:center; } }
.stamp-upload-guide { width:100%; padding:18px 24px 20px; display:grid; grid-template-columns:1fr; justify-items:stretch; gap:11px; border:3px solid #b45542; background:#fff3d8; box-shadow:inset 0 0 0 5px rgba(180,85,66,.08); text-align:left; }
.stamp-upload-guide-heading { display:flex; align-items:center; justify-content:flex-start; gap:12px; color:#742f25; }
.stamp-upload-guide-heading span { width:32px; height:32px; display:grid; place-items:center; color:#fff; background:#b45542; font:800 1.2rem/1 Georgia,serif; }
.stamp-upload-guide-heading strong { font:700 clamp(1.18rem,1.8vw,1.5rem)/1 Georgia,serif; }
.stamp-upload-guide-copy { max-width:none; color:#2b3933; font-size:.82rem; font-weight:620; line-height:1.38; text-align:left; }
.stamp-upload-guide img { width:auto; max-width:100%; max-height:185px; margin:0 auto; padding:6px; object-fit:contain; border:2px solid #173f32; background:#fff; box-shadow:0 6px 16px rgba(18,47,38,.13); }
.stamp-upload-guide button { width:min(420px,100%); min-height:44px; margin:1px auto 0; padding:8px 18px; border:2px solid #102f26; border-radius:0; color:#fff; background:#102f26; font-size:.72rem; font-weight:850; letter-spacing:.035em; text-transform:none; box-shadow:4px 4px 0 #d1b06f; }
.stamp-upload-guide button:hover,.stamp-upload-guide button:focus-visible { color:#102f26; background:#d1b06f; box-shadow:5px 5px 0 #b45542; }
.admin-upload-guide-form { max-width:780px; display:grid; gap:10px; }
.admin-upload-guide-form textarea { width:100%; }
.admin-upload-guide-preview { width:min(440px,100%); max-height:260px; object-fit:contain; object-position:left center; background:#dfded6; }
.admin-check-label { display:flex !important; align-items:center; gap:7px !important; }

@media (max-width:640px) {
    .frontend-modal.is-guide-stage { padding:10px; }
    .frontend-modal.is-guide-stage .stamp-detect-dialog { width:100%; max-height:calc(100svh - 20px); }
    .frontend-modal.is-guide-stage .frontend-dialog-body { overflow:auto; padding:9px; }
    .image-source-choice.stamp-upload-guide { grid-template-columns:minmax(0,1fr); padding:15px 12px 17px; gap:10px; }
    .stamp-upload-guide > * { min-width:0; grid-column:1; }
    .stamp-upload-guide-heading { width:100%; }
    .stamp-upload-guide-heading strong { min-width:0; font-size:1.08rem; }
    .stamp-upload-guide-copy { font-size:.76rem; line-height:1.35; }
    .stamp-upload-guide img { display:none; }
}

.auto-detect-preview {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #d8e0d4;
    border-radius: 12px;
    background: #fbfcfa;
}

.auto-detect-preview[hidden] {
    display: none !important;
}

.auto-detect-preview h3 {
    margin: 0;
    font-size: 18px;
}

.auto-detect-rotate-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.auto-detect-rotate-tools[hidden] {
    display: none;
}

.auto-rotate-button {
    display: inline-grid;
    grid-template-rows: 19px 12px;
    place-items: center;
    width: 38px;
    min-width: 38px;
    min-height: 36px;
    margin: 0;
    border: 1px solid #cdd9c9;
    border-radius: 8px;
    padding: 2px 4px;
    background: #f5f8f3;
    color: #1d4f38;
    line-height: 1;
}

.auto-rotate-button:hover {
    border-color: #aebfab;
    background: #eaf2e8;
}

.auto-rotate-icon {
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
}

.auto-rotate-degree {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.auto-detect-preview img {
    display: block;
    max-width: min(100%, 620px);
    max-height: 62vh;
    object-fit: contain;
    border: 1px solid #d8e0d4;
    border-radius: 10px;
    background: #eef1ec;
}

.section-head.compact {
    margin: 0;
    padding: 0;
    border: 0;
}

.section-head.compact h3 {
    margin: 0;
}

.compact-upload-panel {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    background: #f8faf7;
}

.frontend-bulk-list {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
}

.frontend-bulk-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    background: #ffffff;
}

.frontend-bulk-row img {
    width: 74px;
    height: 56px;
    object-fit: contain;
    border-radius: 6px;
    background: #eef1eb;
}

.frontend-bulk-row label {
    min-width: 0;
    font-size: 12px;
    color: var(--muted);
}

.frontend-stamp-editor {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    background: #ffffff;
}

.frontend-stamp-edit-list {
    display: grid;
    gap: 10px;
}

.frontend-stamp-edit-row {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    border: 1px solid #dfe5da;
    border-radius: 10px;
    padding: 12px;
    background: #f8faf7;
}

.frontend-stamp-edit-image {
    display: grid;
    place-items: center;
    min-height: 150px;
    border: 1px solid #e1e7de;
    border-radius: 8px;
    background: #ffffff;
}

.frontend-stamp-edit-image img {
    width: 188px;
    height: 138px;
    object-fit: contain;
}

.frontend-stamp-edit-fields {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) 180px 220px;
    gap: 10px 14px;
    align-items: start;
}

.frontend-stamp-edit-fields label {
    font-size: 13px;
}

.frontend-stamp-edit-fields .wide {
    grid-column: 1;
    grid-row: 1;
}

.frontend-catalog-fields {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    gap: 6px;
}

.frontend-stamp-edit-fields > label:nth-of-type(2) {
    grid-column: 3;
    grid-row: 1;
}

.frontend-stamp-edit-fields > label:nth-of-type(3) {
    grid-column: 3;
    grid-row: 2;
}

.frontend-catalog-fields label {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    font-size: 12px;
    color: var(--muted);
}

.frontend-topic-field {
    grid-column: 1 / -1;
    display: grid;
    gap: 6px;
}

.frontend-topic-field .field-label {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.frontend-topic-field .tag-picker {
    gap: 6px;
}

.frontend-topic-field .tag-list {
    min-height: 0;
    gap: 5px;
}

.frontend-topic-field .tag-input {
    max-width: none;
    min-height: 38px;
}

.frontend-topic-field .tag-suggestions {
    width: min(520px, 100%);
}

.frontend-new-stamp-button {
    justify-self: start;
}

.frontend-new-stamp-panel {
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.series-stamp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.series-stamp-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--panel);
}

.series-stamp-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
}

.series-stamp-card h3 a {
    color: inherit;
}

.series-stamp-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 10px;
    align-items: start;
}

.series-stamp-card dl {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 5px 8px;
    font-size: 14px;
}

.series-stamp-card-image img {
    width: 112px;
    height: 112px;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
}

.series-stamp-card-media {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
}

.series-card-user-lists {
    width: 112px;
    margin-top: 8px;
}

.series-card-user-lists .public-user-list-status.is-collection,
.series-card-user-lists .public-user-list-collection-counts {
    display: none;
}

.series-card-collection-counts {
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.series-price-section {
    margin-top: 28px;
}

.series-price-section h2 {
    margin-bottom: 12px;
}

.table-scroll {
    overflow-x: auto;
}

.series-price-table {
    min-width: 760px;
    font-size: 14px;
}

.series-price-table th {
    white-space: nowrap;
    background: #eef5ed;
    color: var(--accent-dark);
}

.series-price-table td {
    vertical-align: middle;
}

.series-price-table .price-cell {
    text-align: right;
}

.series-price-table .price-group {
    text-align: center;
}

.series-subrow td {
    background: #f7faf6;
    color: var(--muted);
}

.series-total-row td {
    font-weight: 700;
    background: #f0f4ef;
}

.series-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 450px);
    gap: 24px;
    align-items: start;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 24px;
}

.series-detail img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 8px;
    background: #eef1eb;
}

.detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 28px;
}

dl {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 12px;
}

dt {
    color: var(--muted);
}

dd {
    margin: 0;
}

.images img {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    background: #eef1eb;
    border-radius: 8px;
}

.images .image-open {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent !important;
    color: inherit;
    cursor: zoom-in;
    font-weight: inherit;
    line-height: 0;
}

.images .image-open img {
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.images .image-open:hover img,
.images .image-open:focus-visible img {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(32, 35, 31, 0.18);
}

.images .image-open:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.images > figure > figcaption {
    margin-top: 6px;
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    line-height: 1.3;
    text-align: center;
}

.stamp-image-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.inline-upload-form {
    margin: 0;
}

.mobile-stamp-image {
    display: none;
}

.mobile-stamp-image img {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    background: #eef1eb;
    border-radius: 8px;
}

.mobile-stamp-image .image-open {
    display: block;
    line-height: 0;
}

.stamp-user-lists {
    width: min(100%, 240px);
    margin: 8px auto 0;
    justify-items: center;
    text-align: center;
}

.stamp-user-lists .public-user-list-statuses {
    justify-content: center;
}

.stamp-user-lists .public-user-list-status.is-collection {
    display: none;
}

.stamp-user-lists .public-user-list-toggle {
    width: auto;
    min-width: 180px;
}

.mobile-stamp-user-lists {
    display: none;
}

.series-nav {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--panel);
}

.series-nav-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.series-nav-head h2 {
    margin: 0;
    font-size: 18px;
}

.series-nav-head span {
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.series-nav-controls {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 10px;
    align-items: stretch;
}

.series-arrow {
    display: grid;
    place-items: center;
    min-height: 58px;
    border-radius: 8px;
    background: var(--accent);
    color: #ffffff;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
}

.series-arrow:hover {
    background: var(--accent-dark);
    text-decoration: none;
}

.series-arrow.disabled {
    background: #e1e6de;
    color: #98a094;
}

.series-current {
    display: grid;
    align-content: center;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: #f7f9f5;
}

.series-current strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.series-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 76px;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.series-item {
    display: grid;
    gap: 5px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px;
    background: #ffffff;
    color: var(--text);
    font-size: 12px;
    text-align: center;
}

.series-item:hover {
    border-color: #aebcac;
    text-decoration: none;
}

.series-item.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(39, 103, 73, 0.16);
}

.series-item img,
.series-placeholder {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 6px;
    background: #eef1eb;
}

.series-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 11px;
}

.series-item span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-info {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--panel);
}

.side-info-head {
    margin-bottom: 12px;
}

.side-info-head span {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.side-info-head h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
}

.side-info-body {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.side-info-body > div:first-child:last-child {
    grid-column: 1 / -1;
}

.side-info-body img {
    width: 92px;
    height: 92px;
    object-fit: contain;
    border-radius: 8px;
    background: #eef1eb;
}

.side-info-body p {
    margin-bottom: 10px;
    color: var(--muted);
}

.stamp-extra-images {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    justify-items: center;
}

.stamp-extra-image {
    position: relative;
    width: fit-content;
    max-width: 100%;
}

.stamp-extra-image .image-open {
    display: block;
    line-height: 0;
}

.stamp-extra-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 210px;
    object-fit: contain;
    border-radius: 8px;
}

.extra-image-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    margin: 0;
}

.extra-image-delete button {
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
}

.inline-delete-form {
    margin-top: 8px;
}

.series-feature-strip {
    display: grid;
    gap: 12px;
    width: min(450px, 100%);
    min-width: 0;
    max-width: 100%;
    justify-self: end;
}

.series-feature-card {
    margin: 0;
    min-width: 0;
    max-width: 100%;
}

.series-feature-card figcaption {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

.series-feature-image,
.series-feature-video,
.series-feature-media-link {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 10px;
    overflow: hidden;
}

.series-feature-image img {
    width: 100%;
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    background: transparent;
}

.series-detail .series-feature-image img,
.series-detail .series-feature-video,
.series-detail .series-feature-media-link {
    background: transparent;
}

.series-feature-video {
    aspect-ratio: 4 / 3;
}

.series-feature-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.series-feature-edit-list {
    display: grid;
    gap: 12px;
}

.series-feature-edit-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    background: #fbfcfa;
}

.series-feature-edit-preview {
    display: grid;
    place-items: center;
    min-height: 92px;
    border-radius: 8px;
    background: #eef1eb;
    color: var(--muted);
    font-weight: 700;
}

.series-feature-edit-preview img {
    width: 100%;
    max-height: 92px;
    object-fit: contain;
}

.series-feature-edit-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.series-feature-edit-fields .wide {
    grid-column: 1 / -1;
}

.series-feature-new {
    margin-top: 14px;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rich-editor {
    display: grid;
    gap: 8px;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px;
    background: #f8faf7;
}

.rich-editor-button,
.rich-editor-select {
    min-height: 30px;
    border: 1px solid #d8dfd4;
    border-radius: 6px;
    padding: 4px 8px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.rich-editor-button:hover,
.rich-editor-select:hover {
    border-color: #b9ccb7;
    background: #eef5ed;
}

.rich-editor-surface {
    min-height: 180px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    font-weight: 400;
    line-height: 1.55;
    outline: none;
}

.rich-editor-surface p,
.rich-editor-surface li,
.rich-editor-surface div {
    font-weight: 400;
}

.rich-editor-surface strong,
.rich-editor-surface b {
    font-weight: 700;
}

.rich-editor-surface:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(39, 111, 78, 0.12);
}

.rich-text-content {
    color: var(--text);
    font-weight: 400;
    line-height: 1.65;
}

.rich-text-content p,
.rich-text-content li,
.rich-text-content div {
    font-weight: 400;
}

.rich-text-content strong,
.rich-text-content b {
    font-weight: 700;
}

.rich-text-content > *:first-child {
    margin-top: 0;
}

.rich-text-content > *:last-child {
    margin-bottom: 0;
}

.series-description-box {
    position: relative;
    max-height: 350px;
    overflow: hidden;
    border: 1px solid #d7e0d3;
    border-radius: 10px;
    padding: 0;
    background: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.55;
    scrollbar-color: #7fa08b #edf3eb;
    scrollbar-width: thin;
}

.series-description-box.is-scrollable {
    background:
        linear-gradient(#ffffff 30%, rgba(255, 255, 255, 0)) top,
        linear-gradient(rgba(255, 255, 255, 0), #ffffff 70%) bottom,
        #ffffff;
    background-attachment: local, local, scroll;
    background-repeat: no-repeat;
    background-size: 100% 24px, 100% 36px, 100% 100%;
    box-shadow: inset 0 -18px 22px -24px rgba(20, 58, 39, 0.5);
}

.series-description-scroll-body {
    max-height: 350px;
    overflow-y: auto;
    padding: 0 16px 10px;
}

.series-description-box.is-scrollable .series-description-scroll-body {
    max-height: 308px;
}

.series-description-scroll-body::-webkit-scrollbar {
    width: 10px;
}

.series-description-scroll-body::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #edf3eb;
}

.series-description-scroll-body::-webkit-scrollbar-thumb {
    border: 2px solid #edf3eb;
    border-radius: 999px;
    background: #7fa08b;
}

.series-description-scroll-hint {
    position: static;
    margin: 0;
    border-top: 1px solid rgba(39, 111, 78, 0.14);
    padding: 8px 10px;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    pointer-events: none;
}

.series-description-box:not(.is-scrollable) .series-description-scroll-hint {
    display: none;
}

.series-feature-strip .series-page-navigation .button {
    min-height: 28px;
    border-radius: 5px;
    padding: 3px 7px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
}

.series-description-box,
.series-description-box p,
.series-description-box li,
.series-description-box div,
.series-description-box h2,
.series-description-box h3,
.series-description-box h4 {
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
}

.series-description-box h2,
.series-description-box h3,
.series-description-box h4 {
    margin: 8px 0 4px;
    font-weight: 700;
}

.series-description-box > :first-child,
.series-description-box > :first-child > :first-child {
    margin-top: 0;
    padding-top: 0;
}

.profile-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
    gap: 24px;
    align-items: start;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 24px;
}

.profile-detail img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 8px;
    background: #eef1eb;
}

.watermark-positions {
    margin-top: 22px;
}

.watermark-positions h2 {
    margin-bottom: 12px;
    font-size: 22px;
}

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

.watermark-position-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--panel);
}

.watermark-position-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 6px;
    background: #eef1eb;
}

.watermark-position-card strong {
    display: block;
    margin-bottom: 4px;
}

.watermark-position-card p {
    margin: 0;
    color: var(--muted);
}

.variant-admin {
    margin-top: 22px;
}

.edit-stamp-form,
.variant-admin {
    display: grid;
    gap: 12px;
}

.edit-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    overflow: clip;
}

.edit-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 800;
    color: var(--ink);
    list-style: none;
}

.edit-panel > summary::-webkit-details-marker {
    display: none;
}

.edit-panel > summary::after {
    content: "+";
    color: var(--accent-dark);
    font-size: 18px;
    line-height: 1;
}

.edit-panel[open] > summary {
    border-bottom: 1px solid var(--line);
    background: #fbfcfa;
}

.edit-panel[open] > summary::after {
    content: "−";
}

.edit-panel > summary small {
    margin-left: auto;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.compact-fieldset {
    border: 0;
    margin: 0;
    padding: 14px;
}

.edit-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px 12px;
}

.edit-stamp-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 14px;
    align-items: start;
    margin-bottom: 12px;
}

.edit-stamp-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.6fr);
    gap: 10px 12px;
}

.edit-stamp-image-box {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfa;
}

.edit-stamp-image-box .admin-thumb {
    max-width: 150px;
    max-height: 150px;
    justify-self: center;
}

.variant-form {
    margin-bottom: 18px;
}

.option-line {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 10px 0 14px;
}

.option-line input {
    width: auto;
}

.variant-table {
    margin-top: 14px;
}

.variant-actions,
.variant-image-form {
    display: grid;
    gap: 8px;
}

.variant-image-form input[type="file"] {
    max-width: 260px;
}

.compact-input {
    width: 76px;
    min-width: 0;
    padding: 7px 8px;
}

.stamp-variants {
    margin: 22px 0;
}

.stamp-variants h2 {
    margin-bottom: 12px;
    font-size: 22px;
}

.stamp-variant-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.stamp-variant-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--panel);
}

.stamp-variant-image {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.stamp-variant-image:hover {
    border-color: #aebcac;
    text-decoration: none;
}

.stamp-variant-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.stamp-variant-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    line-height: 1.25;
}

.variant-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.variant-kind {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.stamp-variant-card p {
    margin-bottom: 4px;
    color: var(--muted);
}

.variant-price {
    font-weight: 700;
    color: var(--green);
}

.lead {
    color: var(--muted);
    font-size: 18px;
}

.market-values {
    margin: 18px 0;
}

.market-values h2 {
    font-size: 20px;
}

.market-values table {
    max-width: 720px;
}

.price-section {
    margin: 22px 0;
}

.price-section > h2 {
    margin: 18px 0 10px;
    font-size: 22px;
}

.price-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.price-card > h3 {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
}

.price-card-image {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    min-height: 96px;
    overflow: hidden;
    cursor: zoom-in;
    text-decoration: none;
}

.price-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

.price-card-image.is-variant-link {
    cursor: pointer;
}

.variant-image-upload {
    width: 112px;
    margin-top: 8px;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
}

.price-card-body table {
    width: 100%;
    max-width: 520px;
    align-self: center;
}

.price-card-body {
    display: grid;
    min-height: 112px;
}

.price-card-copy p {
    margin-bottom: 8px;
    color: var(--muted);
}

.price-card-body th {
    width: 42%;
    color: var(--muted);
    font-weight: 600;
}

.price-card-body th,
.price-card-body td {
    padding: 5px 0;
    text-align: left;
}

.market-value-list {
    display: grid;
    gap: 10px;
}

.market-value-row {
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(100px, 160px) minmax(0, 1fr);
    gap: 10px;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #f7f9f5;
}

.market-value-row strong {
    align-self: center;
}

.market-value-row.new {
    background: #ffffff;
}

.stacked-form {
    display: grid;
    gap: 12px;
}

.bulk-price-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.bulk-price-table {
    min-width: 780px;
    border: 0;
}

.bulk-price-table th,
.bulk-price-table td {
    vertical-align: middle;
}

.bulk-price-table tfoot th {
    background: #f2f7f0;
}

.bulk-price-input {
    max-width: 110px;
    text-align: right;
}

.bulk-stamp-cell {
    display: grid;
    grid-template-columns: 58px minmax(180px, 1fr);
    gap: 10px;
    align-items: center;
}

.bulk-stamp-cell strong {
    display: inline-block;
    max-width: 280px;
}

.bulk-create-form {
    margin-top: 16px;
}

.bulk-create-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.bulk-create-table {
    min-width: 980px;
    border: 0;
}

.bulk-create-table th,
.bulk-create-table td {
    vertical-align: middle;
}

.bulk-create-table th:first-child,
.bulk-create-table td:first-child {
    width: 92px;
}

.bulk-create-table th:nth-child(2),
.bulk-create-table td:nth-child(2) {
    min-width: 260px;
}

.bulk-create-table th:nth-child(3),
.bulk-create-table td:nth-child(3) {
    width: 130px;
}

.bulk-create-table th:nth-child(4),
.bulk-create-table td:nth-child(4) {
    width: 170px;
}

.bulk-create-table th:nth-child(5),
.bulk-create-table td:nth-child(5) {
    min-width: 280px;
}

.bulk-create-thumb {
    width: 74px;
    height: 74px;
    object-fit: contain;
    border-radius: 6px;
    background: #eef1eb;
}

.bulk-create-subinput {
    margin-top: 8px;
}

.bulk-topic-picker {
    min-width: 260px;
}

.bulk-topic-picker .tag-input {
    max-width: none;
}

.bulk-topic-picker .tag-suggestions {
    width: min(360px, 100%);
}

.bulk-image-panel {
    margin: 18px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--panel);
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(20, 30, 24, 0.42);
}

.admin-modal {
    position: fixed;
    inset: 6vh max(18px, calc((100vw - 980px) / 2)) auto;
    z-index: 91;
    max-height: 88vh;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 24px 70px rgba(20, 30, 24, 0.24);
}

.admin-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.admin-modal-head h2 {
    margin: 0;
    font-size: 22px;
}

.compact {
    min-height: 34px;
    padding: 0 12px;
}

.bulk-image-wrap {
    overflow: auto;
}

.bulk-image-table {
    min-width: 620px;
    border: 0;
}

.bulk-image-table th,
.bulk-image-table td {
    vertical-align: middle;
}

.bulk-image-table th:first-child,
.bulk-image-table td:first-child {
    width: 120px;
}

.bulk-image-thumb {
    display: block;
    width: 92px;
    height: 92px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.bulk-image-file {
    margin-top: 6px;
    font-size: 13px;
}

.form-actions {
    margin-top: 14px;
}

.cleanup-filter {
    margin-bottom: 14px;
}

.cleanup-filter-row {
    display: grid;
    grid-template-columns: 160px 160px auto;
    align-items: end;
    gap: 10px;
}

.cleanup-table-wrap {
    max-height: 62vh;
    overflow: auto;
    border: 1px solid #cfd8ca;
    border-radius: 6px;
    background: #ffffff;
}

.cleanup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cleanup-table th,
.cleanup-table td {
    border: 1px solid #d8dfd4;
    padding: 4px 7px;
    line-height: 1.2;
    vertical-align: middle;
}

.cleanup-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef5ed;
    color: #253329;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}

.cleanup-table th:first-child,
.cleanup-table td:first-child {
    width: 34px;
    text-align: center;
}

.cleanup-table th:nth-child(2),
.cleanup-table td:nth-child(2) {
    width: 90px;
    font-weight: 800;
}

.cleanup-table th:nth-child(3),
.cleanup-table td:nth-child(3) {
    width: 110px;
}

.cleanup-table tr:nth-child(even) td {
    background: #fbfcfa;
}

.cleanup-table tr:hover td {
    background: #eef5ed;
}

.cleanup-table input[type="checkbox"] {
    width: 15px;
    height: 15px;
}

.cleanup-actions {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: auto minmax(320px, 1fr) auto;
    align-items: end;
    gap: 10px;
    margin-top: 10px;
    border: 1px solid #cfd8ca;
    border-radius: 6px;
    padding: 8px;
    background: #f7faf5;
}

.cleanup-actions > span {
    color: var(--muted);
    font-weight: 800;
}

.gap-check-filter-row {
    grid-template-columns: 105px 105px 125px minmax(220px, 1fr) auto;
}

.gap-check-filter label:has(select[name="issue_nature"]) {
    display: none;
}

.gap-check-toggle {
    align-self: end;
    display: inline-flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    white-space: nowrap;
}

.gap-check-toggle input {
    width: 16px;
    height: 16px;
}

.gap-check-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.gap-check-summary span,
.gap-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    background: #eef2ec;
    color: #49564c;
    padding: 5px 9px;
    font-size: 13px;
    font-weight: 800;
}

.gap-status.missing-both {
    background: #fde8e4;
    color: #9c2f24;
}

.gap-status.found-db {
    background: #e5f5e9;
    color: #21633b;
}

.gap-status.found-csv {
    background: #fff4d6;
    color: #805800;
}

.gap-status.duplicate-catalog {
    background: #fde8e4;
    color: #9c2f24;
}

.gap-status.wrong-series {
    background: #fde8e4;
    color: #9c2f24;
}

.gap-status.missing {
    background: #fde8e4;
    color: #9c2f24;
}

.gap-status.missing-mbk,
.gap-status.missing-michel {
    background: #fff2d8;
    color: #8a5a00;
}

.gap-check-table-wrap {
    max-height: 68vh;
}

.gap-check-table {
    min-width: 1280px;
    font-size: 12px;
}

.gap-check-table th:first-child,
.gap-check-table td:first-child {
    width: 210px;
}

.gap-check-table td:nth-child(2),
.gap-check-table td:nth-child(3),
.gap-check-table td:nth-child(4) {
    font-weight: 800;
    white-space: nowrap;
}

.gap-check-table td:nth-child(9),
.gap-check-table td:nth-child(10) {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.gap-merge-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin: 12px 0;
    border: 1px solid #efc8bd;
    border-radius: 8px;
    padding: 10px;
    background: #fff7f4;
}

.gap-merge-panel label {
    display: grid;
    gap: 5px;
    margin: 0;
    font-weight: 800;
}

.gap-image-panel {
    margin: 12px 0;
    border: 1px solid #bcd8c5;
    border-radius: 10px;
    padding: 12px;
    background: #f1f8f2;
}

.gap-image-panel h2 {
    margin: 0;
    font-size: 20px;
}

.gap-image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.gap-stamp-title-form {
    margin: 12px 0 18px;
}

.gap-stamp-list-wrap {
    max-height: 58vh;
}

.gap-stamp-list-table {
    min-width: 760px;
    font-size: 13px;
}

.gap-stamp-list-table th:first-child,
.gap-stamp-list-table td:first-child {
    width: 76px;
}

.gap-stamp-list-table th:nth-child(2),
.gap-stamp-list-table td:nth-child(2),
.gap-stamp-list-table th:nth-child(3),
.gap-stamp-list-table td:nth-child(3) {
    width: 140px;
    white-space: nowrap;
}

.gap-stamp-list-table input {
    width: 100%;
    min-width: 280px;
}

.gap-translation-status {
    margin: 8px 0 0;
    min-height: 18px;
}

.gap-row-actions {
    margin-top: 8px;
}

.csv-add-dialog {
    max-width: 860px;
}

.csv-add-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

.csv-add-grid label {
    display: grid;
    gap: 5px;
}

.csv-add-grid .wide {
    grid-column: 1 / -1;
}

.duplicate-dialog {
    width: min(1180px, calc(100vw - 32px));
}

.duplicate-dialog .frontend-dialog-body {
    max-height: calc(100vh - 190px);
    overflow: auto;
}

.duplicate-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.duplicate-compare-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 10px 12px;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}

.duplicate-compare-card.is-base-candidate {
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(38, 111, 76, 0.12);
}

.duplicate-thumb-box {
    grid-row: span 4;
    width: 96px;
    min-height: 96px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f3f5f1;
    overflow: hidden;
}

.duplicate-thumb-box img {
    max-width: 100%;
    max-height: 132px;
    object-fit: contain;
    display: block;
}

.duplicate-choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
}

.duplicate-choice-row label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.duplicate-delete-button {
    min-height: 26px;
    padding: 3px 8px;
    font-size: 12px;
    line-height: 1;
}

.duplicate-compare-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
}

.duplicate-compare-card p {
    margin: 0;
}

.duplicate-facts {
    grid-column: 2;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 4px 8px;
    margin: 0;
    font-size: 12px;
}

.duplicate-facts dt {
    color: var(--muted);
}

.duplicate-facts dd {
    margin: 0;
    min-width: 0;
}

.duplicate-compare-value.is-different {
    color: #9c2f24;
    background: #fde8e4;
    border-radius: 6px;
    padding: 1px 5px;
    font-weight: 800;
}

.duplicate-variant-fields {
    display: grid;
    grid-template-columns: 220px minmax(220px, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.duplicate-variant-fields label {
    display: grid;
    gap: 5px;
    margin: 0;
    font-weight: 800;
}

.duplicate-variant-fields label:last-child {
    grid-column: 1 / -1;
}

.duplicate-modal-actions {
    position: sticky;
    bottom: -1px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 12px;
    margin-top: 12px;
    background: #fff;
    border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
    .duplicate-compare-card {
        grid-template-columns: 78px 1fr;
    }

    .duplicate-thumb-box {
        width: 78px;
    }

    .duplicate-variant-fields {
        grid-template-columns: 1fr;
    }
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    background: var(--panel);
}

.admin-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border-radius: 7px;
    padding: 0 10px;
    color: var(--accent-dark);
    font-weight: 700;
}

.admin-nav a:hover,
.admin-nav a.active {
    text-decoration: none;
    background: #e7f0e4;
}

.series-maintenance-nav {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--panel);
}

.series-maintenance-nav strong {
    text-align: center;
    font-size: 18px;
}

.series-maintenance-nav .button:first-child {
    justify-self: start;
}

.series-maintenance-nav .button:last-child {
    justify-self: end;
}

.button.disabled,
button.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.admin-collapsible {
    margin: 14px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.admin-collapsible > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 13px 15px;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
}

.admin-collapsible > summary span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.admin-collapsible[open] > summary {
    border-bottom: 1px solid var(--line);
}

.admin-collapsible > form,
.admin-collapsible > section,
.admin-collapsible > script + form {
    margin: 14px;
}

.series-maintenance-form {
    margin-bottom: 18px;
}

.series-pick-panel {
    margin-bottom: 22px;
}

.series-admin-list {
    display: grid;
    gap: 10px;
}

.series-admin-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--panel);
}

.series-admin-row.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(39, 103, 73, 0.14);
}

.series-admin-row h3 {
    margin: 0 0 2px;
    font-size: 18px;
}

.series-admin-row p {
    margin: 0;
}

.series-admin-thumb {
    display: grid;
    place-items: center;
    width: 72px;
    height: 58px;
    border-radius: 6px;
    overflow: hidden;
    background: #eef1eb;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.series-admin-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.series-stamps-form {
    margin-bottom: 18px;
}

.series-stamps-wrap {
    overflow-x: auto;
}

.series-stamps-table {
    min-width: 1420px;
}

.series-stamps-table th:first-child,
.series-stamps-table td:first-child {
    width: 92px;
}

.series-stamps-table th:nth-child(2),
.series-stamps-table td:nth-child(2) {
    width: 260px;
}

.series-stamps-table th:nth-child(3),
.series-stamps-table td:nth-child(3) {
    width: 150px;
}

.series-stamps-table th:nth-child(4),
.series-stamps-table td:nth-child(4),
.series-stamps-table th:nth-child(5),
.series-stamps-table td:nth-child(5),
.series-stamps-table th:nth-child(6),
.series-stamps-table td:nth-child(6) {
    width: 150px;
}

.series-stamps-table th:nth-child(7),
.series-stamps-table td:nth-child(7) {
    min-width: 430px;
}

.series-stamps-table th:nth-child(8),
.series-stamps-table td:nth-child(8) {
    width: 100px;
}

.series-stamps-table td input,
.series-stamps-table td textarea {
    margin-bottom: 6px;
}

.series-stamps-table .tag-input {
    max-width: none;
}

.wide-thumb {
    width: 260px;
    max-height: 180px;
}

.admin-thumb {
    width: 180px;
    max-height: 180px;
    object-fit: contain;
    background: #eef1eb;
    border-radius: 8px;
}

.info-box {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.info-box h2 {
    font-size: 20px;
}

.info-thumb {
    float: left;
    width: 120px;
    max-height: 150px;
    margin: 0 14px 8px 0;
    object-fit: contain;
    background: #eef1eb;
    border-radius: 6px;
}

.table-thumb {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: #eef1eb;
    border-radius: 6px;
}

.admin-filter-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.admin-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-stamp-table td {
    vertical-align: middle;
}

.admin-check-row td {
    padding-top: 0;
    border-top: 0;
    background: #fff8f8;
    font-size: 0.92rem;
}

.admin-warning {
    display: inline-block;
    margin: 4px 6px 0 0;
    padding: 4px 8px;
    border-radius: 6px;
    color: #9f1d1d;
    background: #ffe7e7;
    font-weight: 700;
}

.admin-warning-notice {
    color: #8a4b00;
    background: #fff0d5;
}

.admin-ok {
    color: #1f6f46;
    font-weight: 700;
}

.master-layout {
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 12px;
}

.watermark-position-admin {
    display: grid;
    gap: 16px;
}

.watermark-position-admin h2,
.watermark-position-admin h3 {
    margin-bottom: 0;
}

.position-table {
    margin-top: 4px;
}

.inline-form {
    display: inline;
}

.tag-picker {
    position: relative;
    display: grid;
    gap: 8px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 34px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    border: 1px solid #c9d5c5;
    border-radius: 999px;
    padding: 5px 7px 5px 11px;
    background: #eef5ed;
    color: #1d4f38;
    font-weight: 400;
    line-height: 1;
}

.tag-chip button {
    display: inline-grid;
    place-items: center;
    width: 18px;
    min-height: 18px;
    border-radius: 50%;
    padding: 0;
    background: transparent;
    color: #38634c;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.tag-chip button:hover,
.tag-chip button:focus-visible {
    background: #d7e5d4;
    color: #173f2c;
}

.tag-input {
    max-width: 420px;
}

.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    display: grid;
    width: min(420px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(32, 35, 31, 0.12);
}

.tag-suggestions:empty {
    display: none;
}

.tag-suggestion {
    justify-content: flex-start;
    width: 100%;
    border-radius: 0;
    background: #ffffff;
    color: var(--text);
    font-weight: 400;
}

.tag-suggestion:hover,
.tag-suggestion:focus-visible {
    background: #eef1eb;
}

.tag-suggestion.new {
    color: var(--accent-dark);
    font-weight: 700;
}

.lightbox {
    width: min(96vw, 1100px);
    max-width: none;
    max-height: 94vh;
    border: 0;
    border-radius: 10px;
    padding: 18px;
    background: #111411;
    color: #ffffff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.72);
}

.lightbox figure {
    margin: 0;
}

.lightbox img {
    display: block;
    width: 100%;
    max-height: calc(94vh - 92px);
    object-fit: contain;
    background: #1c201c;
    border-radius: 8px;
}

.lightbox figcaption {
    min-height: 24px;
    margin-top: 10px;
    color: #dfe6dc;
    text-align: center;
}

.lightbox-description {
    max-width: min(760px, 86vw);
    margin: 10px auto 0;
    color: #dfe6dc;
    text-align: center;
    white-space: pre-line;
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    min-height: 42px;
    border-radius: 50%;
    padding: 0;
    background: rgba(255, 255, 255, 0.92);
    color: #111411;
    font-size: 28px;
    line-height: 1;
}

.form {
    display: grid;
    gap: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

fieldset {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

legend {
    padding: 0 6px;
    font-weight: 700;
}

.form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.field {
    display: grid;
    gap: 6px;
}

.field-label {
    font-weight: 700;
}

.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.check {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px !important;
}

.check input {
    width: auto;
}

.error {
    border: 1px solid #e1aaa4;
    background: #fff0ee;
    color: var(--danger);
    border-radius: 6px;
    padding: 10px;
}

.success {
    border: 1px solid #b7d5b6;
    background: #eef7ed;
    color: var(--accent-dark);
    border-radius: 6px;
    padding: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--line);
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
}

@media (max-width: 1120px) {
    .period-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-shell {
        position: sticky;
        top: 0;
        z-index: 30;
    }

    .site-topline {
        min-height: 45px;
        gap: 8px;
        box-shadow: 0 4px 14px rgba(32, 35, 31, 0.06);
    }

    .site-logo {
        min-width: 0;
        margin-right: auto;
    }

    .site-logo img {
        max-width: 168px;
    }

    .site-search-toggle,
    .site-menu-toggle {
        display: grid;
        flex: 0 0 auto;
    }

    .site-login {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex: 0 0 auto;
    }

    .site-language-switch {
        margin-left: 0;
    }

    .site-language-switch a.active {
        display: none;
    }

    .site-language-switch a {
        min-width: 30px;
        min-height: 30px;
        padding: 0 5px;
        font-size: 9px;
    }

    .site-language-switch a + a {
        border-left: 0;
    }

    .site-login-text {
        display: none;
    }

    .site-login-link,
    .site-login-user {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: #eef5ed;
        color: var(--accent-dark);
        box-shadow: 0 4px 12px rgba(31, 81, 58, 0.1);
    }

    .site-login-icon {
        display: block;
    }

    .site-menu {
        display: none;
        position: fixed;
        top: 54px;
        right: 12px;
        z-index: 119;
        grid-template-columns: 1fr;
        gap: 4px;
        width: min(230px, calc(100vw - 24px));
        min-height: 0;
        padding: 8px;
        border: 1px solid #dce3db;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 18px 45px rgba(20, 28, 23, 0.22);
    }

    .site-menu.is-open {
        display: grid;
    }

    .site-menu-link {
        width: 100%;
        min-height: 34px;
        justify-content: flex-start;
        border-radius: 9px;
        padding: 0 10px;
        color: var(--text);
        font-size: 14px;
        font-weight: 750;
        line-height: 1.2;
    }

    .site-menu-link.active {
        background: #eef5ed;
        color: var(--accent-dark);
    }

    .site-search {
        display: none;
    }

    .site-menu > .site-user-menu {
        display: none;
    }

    .site-search-dialog {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .site-search-dialog input {
        grid-column: 1 / -1;
    }

    .site-search-close {
        min-width: 42px;
    }

    .auth-grid {
        grid-template-columns: 1fr;
    }

    .auth-dialog {
        padding: 18px;
    }

    .frontend-modal {
        padding: 10px;
    }

    .frontend-dialog {
        max-height: calc(100vh - 20px);
    }

    .frontend-dialog-head,
    .frontend-dialog-body,
    .frontend-dialog-actions {
        padding-left: 14px;
        padding-right: 14px;
    }

    .series-wizard-grid,
    .series-wizard-fields,
    .series-wizard-main {
        grid-template-columns: 1fr;
    }

    .series-wizard-image img {
        max-height: 190px;
    }

    .image-source-choice {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .image-source-choice[hidden] {
        display: none !important;
    }

    .image-source-choice button {
        width: 100%;
    }

    .image-editor {
        margin-left: -4px;
        margin-right: -4px;
        padding: 8px;
    }

    .frontend-bulk-row {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .frontend-bulk-row img {
        width: 58px;
        height: 46px;
    }

    .frontend-stamp-edit-row {
        grid-template-columns: 1fr;
    }

    .frontend-stamp-edit-fields {
        grid-template-columns: 1fr;
    }

    .site-logo img {
        max-width: 150px;
    }

    .site-user-placeholder {
        display: none;
    }

    .catalog-titlebar,
    .catalog-layout {
        display: block;
    }

    .catalog-sort {
        margin-top: 12px;
    }

    .mobile-filter-toggle {
        position: sticky;
        top: 0;
        z-index: 18;
        display: flex;
        justify-content: center;
        width: 100%;
        margin: 0 0 12px;
        min-height: 42px;
        border-radius: 8px;
        box-shadow: 0 6px 18px rgba(31, 81, 58, 0.14);
    }

    .browse-mobile-toggle {
        position: fixed;
        right: 16px;
        bottom: 18px;
        top: auto;
        z-index: 34;
        display: grid;
        place-items: center;
        width: 52px;
        min-width: 52px;
        height: 52px;
        min-height: 52px;
        margin: 0;
        padding: 0;
        overflow: hidden;
        border-radius: 12px;
        background-color: #2c9344;
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        color: #ffffff;
        font-size: 28px;
        line-height: 1;
        box-shadow: 0 12px 28px rgba(31, 81, 58, 0.28);
    }

    .browse-mobile-toggle span[aria-hidden="true"] {
        transform: translateY(-1px);
    }

    .browse-mobile-icon {
        display: block;
        width: 100%;
        height: 100%;
    }

    .catalog-filter-open .browse-mobile-toggle {
        display: none;
    }

    .mobile-filter-close {
        display: inline-flex;
        min-height: 32px;
        padding: 0 10px;
        border-radius: 7px;
        background: #eef3ec;
        color: var(--accent-dark);
    }

    .catalog-filter-backdrop {
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(17, 26, 21, 0.38);
    }

    .catalog-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        display: grid;
        gap: 8px;
        max-height: min(86vh, 720px);
        padding: 6px;
        border: 1px solid #d8e1d5;
        border-bottom: 0;
        border-radius: 10px 10px 0 0;
        background: #ffffff;
        box-shadow: 0 -14px 32px rgba(17, 26, 21, 0.2);
        overflow-y: auto;
        transform: translateY(105%);
        transition: transform 180ms ease;
    }

    .catalog-filter-open .catalog-sidebar,
    .catalog-has-open-facet:not(.catalog-filter-dismissed) .catalog-sidebar {
        transform: translateY(0);
    }

    .catalog-filter-open .catalog-filter-backdrop,
    .catalog-has-open-facet:not(.catalog-filter-dismissed) .catalog-filter-backdrop {
        display: block;
    }

    .facet-category-panel {
        margin: 0;
        gap: 8px;
        border: 0;
        border-radius: 6px;
        padding: 6px;
        background: #ffffff;
    }

    .browse-mode-switch .button {
        min-height: 32px;
        padding: 5px 8px;
        border-radius: 6px;
        font-size: 13px;
        line-height: 1.15;
    }

    .facet-category-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .facet-category-button {
        min-height: 40px;
        padding: 0 9px;
        font-size: 14px;
    }

    .mobile-facet-values {
        display: block;
    }

    .mobile-facet-values .facet-value-panel {
        margin-bottom: 0;
    }

    .desktop-facet-values {
        display: none;
    }

    .facet-value-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-right: 2px;
    }

    .facet-value-chip {
        min-height: 38px;
    }

    .mobile-filter-close {
        width: auto;
    }

    .catalog-controls {
        align-items: center;
        gap: 6px;
        margin-bottom: 10px;
        padding: 7px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fbfcfa;
    }

    .catalog-controls label {
        flex: 1 1 96px;
        min-width: 0;
        gap: 2px;
        font-size: 12px;
    }

    .catalog-controls select {
        min-height: 32px;
        padding: 4px 7px;
        font-size: 13px;
    }

    .catalog-count {
        flex: 0 0 auto;
        margin-right: 0;
        font-size: 12px;
    }

    .catalog-pagination {
        flex: 1 0 100%;
        justify-content: space-between;
        gap: 4px;
    }

    .catalog-pagination a,
    .catalog-pagination span,
    .catalog-pagination strong {
        min-height: 28px;
        padding: 0 8px;
        font-size: 12px;
    }

    .catalog-result-grid {
        grid-template-columns: 1fr;
    }

    .user-list-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 38px;
        align-items: start;
        min-height: 112px;
        gap: 2px;
        padding: 12px;
    }

    .user-list-card strong,
    .user-list-card span:last-child {
        grid-column: 1;
        min-width: 0;
        overflow-wrap: anywhere;
        text-align: left;
    }

    .user-list-card strong {
        grid-row: 1;
        line-height: 1.3;
    }

    .user-list-card span:last-child {
        grid-row: 2;
    }

    .user-list-card-mark {
        grid-row: 3;
        grid-column: 1;
        justify-self: start;
        align-self: end;
        margin-top: 4px;
    }

    .topbar,
    .search,
    .detail,
    .split,
    .series-picker,
    .image-upload-row,
    .master-layout,
    .profile-detail,
    .series-detail,
    .side-info-body,
    .market-value-row {
        display: block;
    }

    .section-head {
        display: block;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .stamp-variant-list {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    }

    .series-stamp-grid {
        grid-template-columns: 1fr;
    }

    .series-feature-strip {
        width: 100%;
        margin-top: 16px;
    }

    .series-feature-image img {
        max-height: 240px;
    }

    .mobile-stamp-image {
        display: block;
        margin: 0 0 18px;
    }

    .images > figure {
        display: none;
    }

    .images > .stamp-image-actions {
        display: none;
    }

    .images > .stamp-user-lists-desktop {
        display: none;
    }

    .mobile-stamp-user-lists {
        display: grid;
    }

    .price-card {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .price-card-image {
        width: 88px;
        height: 88px;
        min-height: 88px;
    }

    .latest-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .filter-panel .wide {
        grid-column: auto;
    }

    .copy-panel-head {
        display: block;
    }

    .copy-options {
        grid-template-columns: 1fr;
    }

    .button,
    button,
    .search input {
        width: 100%;
        margin-top: 8px;
    }

    .mobile-filter-close,
    .catalog-controls button {
        width: auto;
        margin-top: 0;
    }

    .catalog-controls label,
    .catalog-controls select,
    .catalog-pagination a,
    .catalog-pagination span,
    .catalog-pagination strong {
        margin-top: 0;
    }

    .catalog-controls-compact {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end !important;
        gap: 5px !important;
        padding: 6px !important;
        margin: 0 0 8px !important;
    }

    .catalog-controls-compact > label:first-of-type {
        grid-column: 1;
        grid-row: 1;
    }

    .catalog-controls-compact > label:nth-of-type(2) {
        grid-column: 1;
        grid-row: 2;
    }

    .catalog-controls-compact label {
        display: grid !important;
        min-width: 0 !important;
        gap: 1px !important;
        font-size: 11px !important;
        line-height: 1.1 !important;
    }

    .catalog-controls-compact label span {
        color: var(--muted);
        font-weight: 700;
    }

    .catalog-controls-compact select {
        width: 100% !important;
        min-height: 28px !important;
        height: 28px !important;
        padding: 2px 5px !important;
        font-size: 12px !important;
    }

    .catalog-controls-compact .catalog-count {
        grid-column: 2;
        grid-row: 3;
        align-self: center;
        font-size: 11px !important;
        line-height: 1.1;
        justify-self: end;
    }

    .catalog-controls-compact .catalog-view-toggle {
        grid-column: 2;
        grid-row: 1;
    }

    .catalog-controls-compact .catalog-variant-switch {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        min-height: 28px;
        padding: 0 7px;
        font-size: 12px !important;
    }

    .catalog-controls-compact .catalog-view-toggle a,
    .catalog-controls-compact .catalog-view-toggle span {
        min-height: 28px;
        padding: 0 7px;
        font-size: 12px;
    }

    .catalog-controls-compact .catalog-pagination {
        grid-column: 1 / -1;
        grid-row: 4;
        display: grid !important;
        grid-template-columns: 30px auto 30px;
        align-items: center;
        justify-content: stretch !important;
        gap: 3px !important;
    }

    .catalog-controls-compact .catalog-pagination a,
    .catalog-controls-compact .catalog-pagination span,
    .catalog-controls-compact .catalog-pagination strong {
        justify-content: center;
        min-height: 28px !important;
        height: 28px !important;
        padding: 0 7px !important;
        font-size: 12px !important;
        line-height: 1 !important;
        white-space: nowrap;
    }

    .catalog-list-column-form {
        justify-content: stretch;
    }

    .catalog-column-dropdown {
        width: 100%;
        min-width: 0;
    }

    .catalog-column-dropdown > div {
        left: 0;
        right: 0;
        width: auto;
    }

    .side-info-body img {
        margin-bottom: 10px;
    }

    .period-grid {
        grid-template-columns: 1fr;
    }

    .period-card {
        grid-template-columns: minmax(0, 1fr) minmax(102px, 32%);
        grid-template-rows: minmax(108px, auto) 14px;
        min-height: 0;
        gap: 0 10px;
        padding: 16px 18px 13px;
    }

    .period-card-copy {
        gap: 11px;
        margin-left: -8px;
    }

    .period-title {
        max-width: 20ch;
        font-size: 18px;
    }

    .period-preview {
        width: auto;
        max-width: 112px;
        height: auto;
        min-height: 0;
        margin-right: -11px;
        padding: 3px;
    }

    .period-preview img {
        max-width: 106px;
        max-height: 102px;
    }
}

@media (max-width: 420px) {
    .facet-category-list,
    .facet-value-grid {
        grid-template-columns: 1fr;
    }

    .period-card {
        grid-template-columns: minmax(0, 1fr) 104px;
        grid-template-rows: minmax(106px, auto) 13px;
        gap: 0 8px;
        padding: 15px 15px 12px;
    }

    .period-card-copy {
        gap: 10px;
        margin-left: -6px;
    }

    .period-preview {
        grid-column: 2;
        grid-row: 1;
        width: auto;
        min-height: 0;
        height: auto;
        max-height: none;
        margin-right: -8px;
        padding: 3px;
    }

    .period-preview img {
        max-width: 98px;
        max-height: 94px;
    }

    .period-card::after {
        grid-column: 2;
        grid-row: 2;
    }
}

.tag-list .tag-chip {
    display: inline-flex !important;
    align-items: center;
    width: auto !important;
    min-height: 30px !important;
    margin: 0 !important;
    border: 1px solid #c9d5c5 !important;
    border-radius: 999px !important;
    padding: 5px 7px 5px 11px !important;
    background: #eef5ed !important;
    color: #1d4f38 !important;
    font-weight: 400 !important;
    line-height: 1 !important;
}

.tag-list .tag-chip button {
    display: inline-grid !important;
    place-items: center;
    width: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    padding: 0 !important;
    background: transparent !important;
    color: #38634c !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.image-quality-status {
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: #f8faf7;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.image-quality-status.ok {
    border-color: #bcd8c5;
    background: #edf7ef;
    color: #245c35;
}

.image-quality-status.warning {
    border-color: #ead597;
    background: #fff8df;
    color: #725900;
}

.image-quality-status.error {
    border-color: #e4aaa5;
    background: #fff0ee;
    color: #8c2f28;
}

.image-quality-status.pending {
    border-color: #cbd5e1;
    background: #f3f6fa;
    color: #475569;
}

.image-quality-status div + div {
    margin-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 6px;
}

button.disabled,
button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.admin-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-home-card {
    padding: 1rem;
    border: 1px solid var(--border, #d7ddd5);
    background: #fff;
}

.admin-home-card h2 {
    margin-top: 0;
}

.admin-home-link-row {
    display: grid;
    grid-template-columns: 1fr 1.6fr 110px auto;
    align-items: end;
    gap: .8rem;
    padding: .75rem 0;
    border-bottom: 1px solid #e5e9e3;
}

@media (max-width: 800px) {
    .admin-home-grid,
    .admin-home-link-row {
        grid-template-columns: 1fr;
    }
}

.admin-partner-page { max-width: 1280px; }
.partner-panel { margin: 0 0 18px; padding: 20px; border: 1px solid var(--line); background: #fff; }
.partner-panel .section-head { margin: -20px -20px 18px; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); background: #f1f2ed; }
.partner-panel .section-head p { margin: 0 0 3px; color: #b64f3b; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.partner-panel .section-head h2 { margin: 0; font-family: Georgia,serif; }
.partner-auction-form { display: grid; grid-template-columns: 1fr 1.6fr 1fr 1fr auto; gap: 12px; align-items: end; }
.partner-auction-tabs { margin-bottom: 18px; display: flex; gap: 8px; overflow-x: auto; }
.partner-auction-tabs a { min-width: 210px; padding: 10px 13px; display: grid; border: 1px solid var(--line); background: #fff; }
.partner-auction-tabs a.active { border-color: #276749; box-shadow: inset 0 -3px #276749; }
.partner-auction-tabs small,.partner-lot-table small,.partner-category-list small { display: block; color: var(--muted); }
.partner-status { padding: 4px 8px; border-radius: 20px; background: #dfece3; font-size: 12px; font-weight: 800; }
.partner-category-tree { margin-bottom: 14px; border: 1px solid var(--line); background: #f7f8f4; }
.partner-category-node { position: relative; min-height: 58px; margin-left: calc(var(--category-depth) * 30px); padding: 9px 12px; display: grid; grid-template-columns: 18px 20px minmax(0,1fr); gap: 7px; align-items: start; border-bottom: 1px solid var(--line); background: #fff; cursor: pointer; }
.partner-category-node:last-child { border-bottom: 0; }
.partner-category-node[style*="depth:0"] { background: #eef1ea; }
.partner-category-node::before { content: ''; position: absolute; left: -16px; top: -1px; bottom: -1px; border-left: 1px solid #b9c2b9; opacity: calc(min(1,var(--category-depth))); }
.partner-tree-branch { color: #78867d; font-size: 17px; line-height: 20px; }
.partner-category-copy { min-width: 0; display: grid; gap: 2px; }
.partner-category-level { color: #a9503e; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.partner-category-copy strong { font-size: 14px; }
.partner-map-form { margin-top: 18px; padding-top: 16px; display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--line); }
.partner-map-limit { width: 130px; display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.partner-map-limit input { width: 100%; }
.partner-mapping-progress { margin-top: 14px; padding: 14px; border: 1px solid #b8c9bd; background: #f0f6f1; }
.partner-progress-head { margin-bottom: 9px; display: flex; justify-content: space-between; gap: 15px; }
.partner-mapping-progress progress { width: 100%; height: 12px; accent-color: #276749; }
.partner-progress-actions { margin-top: 10px; display: flex; align-items: center; gap: 12px; }
.partner-progress-actions .danger { background: #9f3028; }
.partner-progress-actions small { color: var(--muted); }
.partner-progress-log { max-height: 230px; margin-top: 10px; overflow: auto; border-top: 1px solid #d2ded4; }
.partner-progress-log p { margin: 0; padding: 7px 2px; border-bottom: 1px solid #dde6df; font-size: 12px; }
.partner-price-form { margin: 0 0 16px; padding: 13px; display: flex; align-items: end; gap: 12px; border: 1px solid #d5c49d; background: #faf5e8; }
.partner-price-form label { width: 180px; display: grid; gap: 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.partner-price-form span { color: var(--muted); font-size: 12px; }
.partner-price-progress { margin: 0 0 16px; padding: 13px; border: 1px solid #b8c9bd; background: #f0f6f1; }
.partner-price-progress progress { width: 100%; margin: 8px 0; accent-color: #276749; }
.partner-price-progress p { margin: 0; padding: 6px 0; border-top: 1px solid #d2ded4; font-size: 12px; }
.vatera-feed-form { display: grid; grid-template-columns: 1fr 2fr auto; gap: 12px; align-items: end; }
.vatera-scan-form { padding: 13px; display: flex; align-items: end; gap: 12px; border: 1px solid #b7c9c3; background: #eef5f2; }
.vatera-scan-form label { width: 150px; display: grid; gap: 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.vatera-scan-form span { color: var(--muted); font-size: 12px; }
.vatera-type { padding: 4px 7px; display: inline-block; border-radius: 3px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.vatera-type.is-auction { color: #fff; background: #276749; }
.vatera-type.is-fixed { color: #4c3510; background: #e8c86e; }
.vatera-type.is-unknown { background: #ddd; }
.vatera-category-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 14px 0; }
.vatera-category-option { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 9px; align-items: start; padding: 11px 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.vatera-category-option:has(input:checked) { border-color: #75936b; background: #f1f6ee; }
.vatera-category-option input { margin-top: 3px; }
.vatera-category-option span,.vatera-category-option small { display: block; }
.vatera-category-option small { margin-top: 3px; color: var(--muted); }
.vatera-seller-filter { margin: 0 0 14px; padding: 11px; display: flex; gap: 10px; align-items: end; border: 1px solid var(--line); background: #f6f7f3; }
.vatera-seller-filter label { min-width: 260px; display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.vatera-seller-filter select { width: 100%; }
.vatera-seller-filter > a { padding: 9px 2px; font-size: 12px; font-weight: 700; }
.vatera-automatic-status { padding: 9px 11px; border-left: 3px solid #75936b; color: var(--muted); background: #f1f6ee; font-size: 12px; }
.admin-display-settings-form { max-width: 980px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.admin-display-settings-form .admin-compact-card { margin: 0; }
.admin-display-settings-form .admin-compact-card label { display: grid; gap: 6px; font-weight: 700; }
.admin-display-settings-form .admin-head-actions { grid-column: 1/-1; }
@media(max-width:760px){.admin-display-settings-form{grid-template-columns:1fr}}
@media(max-width:700px){.vatera-feed-form{grid-template-columns:1fr}.vatera-scan-form{align-items:stretch;flex-direction:column}}
@media(max-width:700px){.vatera-category-grid{grid-template-columns:1fr}.vatera-seller-filter{align-items:stretch;flex-direction:column}.vatera-seller-filter label{min-width:0}}
.partner-lot-table-wrap { overflow-x: auto; }
.partner-lot-table { width: 100%; border-collapse: collapse; }
.partner-lot-table th,.partner-lot-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.partner-lot-table img { width: 84px; height: 72px; object-fit: contain; background: #f3f3ef; }
@media (max-width: 1000px) { .partner-auction-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .partner-auction-form { grid-template-columns: 1fr; } .partner-category-node { margin-left: calc(var(--category-depth) * 15px); } .partner-map-form { align-items: stretch; flex-direction: column; } }
