/*
 * Kulturschatzsuche PWA - "Schätze", "Auszeichnungen" and "Gewinnstufen".
 * Additions only: app.css already carries the prototype's collection, visit
 * row, badge grid and badge sheet styles. The tier card, tier list, progress
 * bar and link rows extrapolate from the same tokens (green-soft cards,
 * Fraunces names, muted 10-11px meta).
 */

.treasures [hidden] {
    display: none !important;
}

.collection-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
    margin: 16px 0;
}

.collection-totals .collection-total {
    margin: 0;
}

a.visit-row {
    color: inherit;
}

.visit-row > div:nth-child(2) {
    min-width: 0;
}

.visit-row strong,
.tier-row h3,
.treasure-link strong {
    overflow-wrap: break-word;
    hyphens: auto;
}

.visit-row.started .visit-icon {
    background: transparent;
    border: 1px dashed var(--field-line);
}

.visit-action {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.7;
    font-weight: 700;
    color: var(--green);
}

.treasures .section-heading small {
    white-space: nowrap;
}

.badge-item {
    color: inherit;
    border-radius: 16px;
}

.badge-item:focus-visible {
    outline-offset: 3px;
}

.treasure-more {
    margin-top: -12px;
}

.treasure-actions {
    display: grid;
    gap: 4px;
    margin-top: 26px;
}

/* Badge sheet: condition, progress and date under the prototype's description. */

.badge-facts {
    display: grid;
    gap: 12px;
    margin: 0 0 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.badge-facts dt {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: var(--muted);
}

.badge-facts dd {
    margin: 3px 0 0;
    font-size: 12px;
    line-height: 1.7;
}

.badge-earned-on {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0 0 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--green);
}

.badge-earned-on .icon {
    width: 15px;
    height: 15px;
}

/* A native <progress>: accessible without ARIA and no inline width. */

.treasure-progress {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 7px;
    margin: 8px 0 0;
    border: 0;
    border-radius: 99px;
    background: var(--line);
    color: var(--green);
    overflow: hidden;
}

.treasure-progress::-webkit-progress-bar {
    background: var(--line);
    border-radius: 99px;
}

.treasure-progress::-webkit-progress-value {
    background: var(--green);
    border-radius: 99px;
}

.treasure-progress::-moz-progress-bar {
    background: var(--green);
    border-radius: 99px;
}

/* Prize tiers */

.tier-next,
.tier-complete {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 15px;
    align-items: center;
    margin: 4px 0 6px;
    padding: 17px 16px;
    border-radius: 20px;
    background: var(--green-soft);
    color: inherit;
    text-decoration: none;
}

a.tier-next {
    grid-template-columns: 70px 1fr 17px;
}

.tier-next > .seal,
.tier-complete > .seal {
    width: 100%;
}

.tier-next-body {
    min-width: 0;
}

.tier-next .overline,
.tier-complete .overline {
    display: block;
    font-size: 9px;
    letter-spacing: 1.3px;
    color: var(--muted);
}

.tier-name,
.tier-complete strong {
    display: block;
    margin-top: 2px;
    font: 500 21px/1.25 Fraunces, serif;
    letter-spacing: -.4px;
    overflow-wrap: break-word;
    hyphens: auto;
}

.tier-description {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.75;
    color: var(--muted);
}

.tier-progress {
    margin-top: 6px;
    font-size: 10px;
    line-height: 1.7;
    color: var(--muted);
}

.tier-hint {
    font-size: 11px;
    line-height: 1.75;
}

.tier-hint strong {
    color: var(--green);
}

.tier-next > .icon {
    width: 17px;
}

.caps {
    text-transform: uppercase;
}

.tier-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tier-row {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 14px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.tier-row:first-child {
    border-top: 1px solid var(--line);
}

.tier-row > .seal {
    width: 100%;
}

.tier-row > div {
    min-width: 0;
}

.tier-row h3 {
    margin: 0;
    font: 500 20px/1.25 Fraunces, serif;
    letter-spacing: -.3px;
}

.tier-row p {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.75;
    color: var(--muted);
}

.tier-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 9px;
    padding: 4px 11px;
    border: 1px solid var(--field-line);
    border-radius: 99px;
    font-size: 10px;
    line-height: 1.6;
    font-weight: 700;
    color: var(--muted);
}

.tier-state.done {
    background: var(--green);
    border-color: var(--green);
    color: var(--action-ink);
}

.tier-state .icon {
    width: 13px;
    height: 13px;
}

.tier-terms {
    margin: 18px 0 20px;
}

/* Link rows (the empty collection's way to achievements, tiers and profile). */

.treasure-links {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
}

.treasure-link {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 66px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
}

.treasure-links li:first-child .treasure-link {
    border-top: 1px solid var(--line);
}

.treasure-link > span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.treasure-link strong {
    display: block;
    font: 500 18px/1.3 Fraunces, serif;
    letter-spacing: -.3px;
}

.treasure-link small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: var(--muted);
}

.treasure-link .visit-icon {
    width: 40px;
    height: 44px;
    border-radius: 18px 18px 9px 9px;
}

.treasure-link .visit-icon .icon {
    width: 20px;
    height: 20px;
}

.treasure-link > .icon {
    width: 17px;
}

.badges-screen > .secondary,
.tiers-screen > .secondary {
    margin-top: 8px;
}

.badges-screen .collection-total,
.tiers-screen .collection-total {
    margin: 18px 0;
}

@media (max-width: 370px) {
    .tier-next,
    .tier-complete {
        grid-template-columns: 62px 1fr;
        gap: 12px;
        padding: 15px 14px;
    }

    a.tier-next {
        grid-template-columns: 56px 1fr 15px;
    }

    .tier-row {
        grid-template-columns: 54px 1fr;
    }
}

.prize-image {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

/* Public leaderboard */
.leaderboard-list {
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

.leaderboard-list li {
    display: grid;
    grid-template-columns: 2.5em minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 4px;
    border-bottom: 1px solid var(--line, rgba(0, 0, 0, .12));
}

.leaderboard-list li.is-self {
    font-weight: 700;
}

.leaderboard-rank {
    text-align: right;
}

.leaderboard-name {
    overflow-wrap: anywhere;
}
