.banknote-search-page,
.banknote-profile-page {
    --banknote-accent: #285f49;
}
:root[data-theme='dark'] :is(.banknote-search-page, .banknote-profile-page) {
    --banknote-accent: #a4d9bf;
}
.banknote-discovery-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: center;
    gap: 48px;
    padding-block: 16px 32px;
}
.banknote-search-page .banknote-discovery-hero h1 {
    font-size: clamp(36px, 3.5vw, 54px);
    line-height: 1.15;
    letter-spacing: -1.8px;
    margin: 16px 0 20px;
}
.banknote-discovery-hero h1 span {
    color: var(--banknote-accent);
}
.banknote-lead {
    max-width: 650px;
    color: var(--muted);
    line-height: 1.9;
    font-size: 13px;
}
.banknote-discovery-art {
    text-align: center;
    color: var(--banknote-accent);
    background: radial-gradient(ellipse, var(--surface-soft), transparent 70%);
}
.banknote-discovery-art svg {
    width: 100%;
    stroke: currentColor;
    stroke-width: 0.8;
}
.banknote-discovery-art ellipse {
    opacity: 0.35;
}
.banknote-discovery-art rect {
    fill: var(--surface-soft);
}
.banknote-discovery-art .discovery-front-note rect {
    fill: var(--surface);
}
.banknote-discovery-art > span {
    font-size: 7px;
    letter-spacing: 2px;
}
.banknote-search-page .banknote-discovery-form {
    padding: 28px;
    gap: 22px 18px;
    background: var(--surface);
    margin-bottom: 36px;
}
.banknote-filter-heading,
.banknote-search-periods,
.banknote-search-page .filter-actions,
.banknote-filter-hint {
    grid-column: 1 / -1;
}
.banknote-filter-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.banknote-filter-heading h2 {
    font-size: 19px;
    margin: 0;
}
.banknote-filter-heading > span,
.banknote-filter-hint {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
}
.banknote-filter-hint {
    margin: -8px 0 0;
}
.banknote-search-periods {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.banknote-search-periods > span {
    font-size: 11px;
    color: var(--muted);
    margin-right: 6px;
}
.banknote-search-periods button {
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--input);
    color: var(--ink);
    font-size: 11px;
    min-height: 36px;
}
.banknote-search-periods button[aria-pressed='true'] {
    border-color: var(--banknote-accent);
    color: var(--banknote-accent);
    background: var(--surface-soft);
}
.banknote-search-page .filter-actions {
    align-items: center;
    gap: 20px;
}
.banknote-results-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}
.banknote-results-heading h2 {
    font-size: 25px;
    margin: 8px 0 0;
}
.banknote-results-heading > p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
    margin: 0;
}
.banknote-search-empty {
    display: grid;
    justify-items: center;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: linear-gradient(145deg, var(--surface-soft), var(--paper));
    padding: 36px 24px;
}
.banknote-search-empty > svg {
    width: 68px;
    stroke: var(--banknote-accent);
    stroke-width: 1.2;
    margin-bottom: 10px;
}
.banknote-search-empty h3 {
    font-size: 22px;
    margin: 8px 0;
}
.banknote-search-empty p {
    max-width: 520px;
    font-size: 12px;
    line-height: 1.9;
    color: var(--muted);
}
.banknote-empty-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
}
.banknote-search-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}
.banknote-guide-number {
    color: var(--banknote-accent);
    font-size: 10px;
    letter-spacing: 1.5px;
}
.banknote-search-guide h3 {
    font-size: 14px;
    margin: 12px 0 8px;
}
.banknote-search-guide p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.8;
    max-width: 370px;
}
.banknote-profile-page .profile-hero {
    padding: 30px;
    margin: 10px 0 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(120deg, var(--surface-soft), var(--surface));
}
.banknote-profile-identity {
    flex: 1;
    min-width: 0;
}
.banknote-profile-page .profile-hero h1 {
    font-size: clamp(28px, 3vw, 40px);
    margin: 10px 0;
}
.banknote-profile-page #profile-caption {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.8;
    margin: 8px 0 12px;
}
.banknote-profile-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    flex-shrink: 0;
}
.banknote-profile-badge {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--banknote-accent);
    padding: 5px 9px;
    font-size: 10px;
}
.banknote-profile-page .profile-statistics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: var(--surface);
    margin: 0 0 24px;
}
.banknote-profile-page .stat-tile {
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 22px 24px;
}
.banknote-profile-page .stat-tile + .stat-tile {
    border-left: 1px solid var(--line);
}
.banknote-profile-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}
.banknote-profile-dashboard[data-public='true'] {
    grid-template-columns: 1fr;
}
.banknote-profile-treasury,
.banknote-profile-facts,
.banknote-profile-countries {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    min-width: 0;
}
.banknote-profile-treasury {
    background: var(--surface-soft);
}
.banknote-profile-treasury #profile-collection-box {
    padding: 0;
    min-height: 185px;
    background: transparent;
    overflow: visible;
    gap: 24px;
}
.banknote-profile-treasury .box-copy h3 {
    font-size: 22px;
    max-width: 260px;
}
.banknote-profile-treasury > p {
    margin: 12px 0 0;
    font-size: 10px;
    line-height: 1.8;
    color: var(--muted);
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.banknote-profile-facts h2,
.banknote-profile-countries h2 {
    font-size: 22px;
    margin: 10px 0 20px;
}
.banknote-profile-facts dl {
    margin: 0;
}
.banknote-profile-facts dl > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.banknote-profile-facts dt {
    font-size: 12px;
    color: var(--muted);
}
.banknote-profile-facts dd {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
}
.banknote-profile-geography {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(250px, 1fr);
    gap: 24px;
    align-items: stretch;
}
.banknote-profile-geography .public-map-panel {
    background: var(--surface);
    margin-bottom: 0;
    min-width: 0;
}
.banknote-profile-sidebar {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 18px;
    min-width: 0;
}
.banknote-profile-completeness {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    padding: 24px;
    min-width: 0;
}
.banknote-profile-completeness h2 {
    margin: 10px 0 18px;
    font-size: 21px;
}
.profile-region-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: baseline;
    gap: 5px 10px;
    margin: 10px 0;
    font-size: 12px;
}
.profile-region-progress strong { color: var(--green); font-size: 13px; }
.profile-region-progress small { color: var(--muted); font-size: 10px; }
.profile-region-track {
    grid-column: 1 / -1;
    height: 5px;
    border-radius: 8px;
    background: var(--surface-soft);
    overflow: hidden;
}
.profile-region-track i {
    display: block;
    height: 100%;
    background: var(--green);
    border-radius: inherit;
}
.banknote-profile-page #public-world-map {
    background: var(--map-water);
}
.banknote-profile-page .public-map-country {
    stroke: var(--map-border);
}
.banknote-profile-page .public-map-country:not([role='button']) {
    fill: var(--map-land);
}
.banknote-country-highlight {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    align-items: center;
    gap: 10px;
    text-align: left;
    padding: 14px 0;
    font-size: 12px;
    color: var(--ink);
    background: transparent;
    border-top: 1px solid var(--line);
}
.banknote-country-highlight > span {
    overflow-wrap: anywhere;
}
.banknote-country-highlight:hover,
.banknote-country-highlight:focus-visible {
    color: var(--banknote-accent);
}
.banknote-country-highlight > i {
    grid-column: 1 / -1;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--banknote-accent) var(--country-share), var(--surface-soft) var(--country-share));
}
.banknote-profile-page #country-filter {
    margin-top: 16px;
}
.banknote-profile-editor {
    width: 680px;
    background: var(--surface);
    color: var(--ink);
    padding: 28px;
}
.banknote-profile-editor .profile-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
}
.banknote-profile-editor .field-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    min-width: 0;
}
.banknote-profile-editor input:not([type='checkbox']) {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--input);
    color: var(--ink);
}
.banknote-profile-editor .email-change-panel,
.banknote-profile-editor #profile-save-message {
    grid-column: 1 / -1;
}
.banknote-profile-editor .avatar-controls {
    margin-top: 22px;
    border-top: 1px solid var(--line);
}
.banknote-profile-editor .profile-form > .small {
    font-size: 12px;
    line-height: 1.8;
}
.banknote-profile-editor input::file-selector-button {
    background: var(--surface-soft);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px 10px;
    margin-right: 10px;
    cursor: pointer;
    font: inherit;
}
@media (max-width: 1100px) {
    .banknote-profile-dashboard,
    .banknote-profile-geography {
        grid-template-columns: minmax(0, 1fr);
    }
    .banknote-profile-page .profile-hero {
        flex-wrap: wrap;
    }
}
@media (max-width: 700px) {
    .banknote-discovery-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
    .banknote-discovery-art {
        display: none;
    }
    .banknote-filter-heading,
    .banknote-results-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .banknote-search-guide {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .banknote-search-page .banknote-discovery-form {
        padding: 20px;
    }
    .banknote-profile-page .profile-hero {
        padding: 22px;
        gap: 18px;
    }
    .banknote-profile-actions {
        width: 100%;
        align-items: flex-start;
    }
    .banknote-profile-page .stat-tile {
        padding: 16px;
    }
    .banknote-profile-treasury #profile-collection-box {
        gap: 0;
        flex-wrap: wrap;
    }
    .banknote-profile-editor .profile-form {
        grid-template-columns: 1fr;
    }
}
@media (prefers-reduced-motion: reduce) {
    :is(.banknote-search-page, .banknote-profile-page) {
        scroll-behavior: auto;
    }
}
