.gw-el-achievements,
.gw-el-achievements * {
    box-sizing: border-box;
}

.gw-el-achievements {
    --gw-el-paper: #f5f0e6;
    --gw-el-paper-dark: #ece2d3;
    --gw-el-ink: #3f3a33;
    --gw-el-muted: #776d61;
    --gw-el-line: rgba(104, 83, 54, 0.18);
    --gw-el-gold: #b78b3f;
    --gw-el-gold-soft: #ead9a8;
    --gw-el-sage: #6d845f;
    --gw-el-sage-soft: #dbe5d3;
    --gw-el-shadow: 0 10px 30px rgba(72, 49, 24, 0.08);
    --gw-el-heading: #4a4034;
    --gw-el-kicker: #8a7760;
    --gw-el-body: #776d61;
    --gw-el-meta: #7d6c54;
    --gw-el-status-earned: #61754f;
    --gw-el-status-locked: #8b8176;
    --gw-el-panel-radius: 22px;
    --gw-el-panel-padding: 22px;
    --gw-el-card-radius: 18px;
    --gw-el-card-padding: 16px;
    --gw-el-icon-radius: 16px;
    --gw-el-badge-icon-bg: linear-gradient(180deg, #f2dfaf, #d1b06d);
    --gw-el-badge-icon-color: #6b5223;
    --gw-el-ach-icon-bg: linear-gradient(180deg, #e9f1e2, #b8ccaa);
    --gw-el-ach-icon-color: #526d47;
    --gw-el-single-icon-bg: linear-gradient(180deg, #f2dfaf, #d1b06d);
    --gw-el-single-icon-color: #6b5223;
    --gw-el-badge-pill-bg: rgba(255, 252, 245, 0.82);
    --gw-el-badge-pill-border: rgba(183, 139, 63, 0.24);
    --gw-el-badge-pill-color: #6b5223;
    --gw-el-ach-pill-bg: rgba(219, 229, 211, 0.72);
    --gw-el-ach-pill-border: rgba(109, 132, 95, 0.22);
    --gw-el-ach-pill-color: #526d47;
    --gw-el-count-bg: rgba(91, 119, 80, 0.14);
    --gw-el-count-color: #526d47;
    --gw-el-trust-high-bg: radial-gradient(circle at top, #eef6dd, #b7cf92);
    --gw-el-trust-high-color: #41562d;
    --gw-el-trust-medium-bg: radial-gradient(circle at top, #fff5dc, #ecd091);
    --gw-el-trust-medium-color: #76531a;
    --gw-el-trust-low-bg: radial-gradient(circle at top, #fde6df, #e6b2a3);
    --gw-el-trust-low-color: #7b3f32;
    --gw-el-trust-bar: rgba(109, 132, 95, 0.16);
    --gw-el-trust-fill: linear-gradient(90deg, #92ad7f, #5b7750);
    --gw-el-component-bg: rgba(255, 255, 255, 0.55);
    --gw-el-component-border: rgba(104, 83, 54, 0.08);
    --gw-el-component-label: #574b3e;
    --gw-el-component-value: #8b7d6c;
    --gw-el-component-points: #6b5a3f;
    --gw-el-empty-bg: rgba(255, 255, 255, 0.46);
    --gw-el-empty-border: rgba(104, 83, 54, 0.18);
    color: var(--gw-el-ink);
    line-height: 1.45;
}

.gw-el-achievements h3,
.gw-el-achievements h4,
.gw-el-achievements p {
    margin-top: 0;
}

.gw-el-achievements-panel,
.gw-el-achievement-card,
.gw-el-single-achievement {
    border: 1px solid var(--gw-el-line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 239, 226, 0.96)),
        var(--gw-el-paper);
    box-shadow: var(--gw-el-shadow);
}

.gw-el-achievements-panel {
    padding: var(--gw-el-panel-padding);
    border-radius: var(--gw-el-panel-radius);
}

.gw-el-profile-heading,
.gw-el-achievements-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(104, 83, 54, 0.12);
}

.gw-el-profile-kicker,
.gw-el-achievement-tier,
.gw-el-achievement-status {
    display: block;
    color: var(--gw-el-kicker);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gw-el-profile-title,
.gw-el-achievements-title,
.gw-el-single-achievement-title,
.gw-el-achievement-title {
    margin-bottom: 0;
    color: var(--gw-el-heading);
    font-family: Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gw-el-profile-title,
.gw-el-achievements-title {
    font-size: 24px;
    line-height: 1.05;
}

.gw-el-profile-description,
.gw-el-achievements-description,
.gw-el-single-achievement-description,
.gw-el-achievement-description {
    color: var(--gw-el-body);
    font-size: 13px;
    line-height: 1.5;
}

.gw-el-profile-description,
.gw-el-achievements-description {
    margin: 8px 0 0;
}

.gw-el-trust-layout {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

.gw-el-trust-circle {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 8px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(104, 83, 54, 0.08);
    font-weight: 700;
}

.gw-el-trust-high {
    background: var(--gw-el-trust-high-bg);
    color: var(--gw-el-trust-high-color);
}

.gw-el-trust-medium {
    background: var(--gw-el-trust-medium-bg);
    color: var(--gw-el-trust-medium-color);
}

.gw-el-trust-low {
    background: var(--gw-el-trust-low-bg);
    color: var(--gw-el-trust-low-color);
}

.gw-el-trust-number {
    font-size: 42px;
    line-height: 1;
}

.gw-el-trust-scale {
    margin-top: 3px;
    color: currentColor;
    font-size: 12px;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.gw-el-trust-copy {
    min-width: 0;
}

.gw-el-trust-copy-title {
    margin-bottom: 6px;
    color: var(--gw-el-heading);
    font-family: Georgia, serif;
    font-size: 24px;
    line-height: 1.05;
}

.gw-el-trust-copy-description {
    margin: 0;
    color: var(--gw-el-body);
    font-size: 14px;
}

.gw-el-trust-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.gw-el-trust-component {
    padding: 12px 14px;
    border: 1px solid var(--gw-el-component-border);
    border-radius: 16px;
    background: var(--gw-el-component-bg);
}

.gw-el-trust-component-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.gw-el-trust-component-label {
    color: var(--gw-el-component-label);
    font-weight: 700;
}

.gw-el-trust-component-value {
    color: var(--gw-el-component-value);
    text-align: right;
}

.gw-el-trust-component-bar {
    display: block;
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--gw-el-trust-bar);
}

.gw-el-trust-component-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--gw-el-trust-fill);
}

.gw-el-trust-component-points {
    display: inline-block;
    margin-top: 8px;
    color: var(--gw-el-component-points);
    font-size: 12px;
    font-weight: 700;
}

.gw-el-badges-list,
.gw-el-achievements-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gw-el-badges-list--cards,
.gw-el-achievements-list--cards,
.gw-el-achievements-block-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.gw-el-achievements-block-grid.gw-el-columns-1 {
    grid-template-columns: 1fr;
}

.gw-el-achievements-block-grid.gw-el-columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gw-el-achievements-block-grid.gw-el-columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gw-el-badge-pill,
.gw-el-achievement-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--gw-el-badge-pill-border);
    border-radius: 999px;
    background: var(--gw-el-badge-pill-bg);
    color: var(--gw-el-badge-pill-color);
    font-size: 12px;
    font-weight: 700;
}

.gw-el-achievement-pill {
    border-color: var(--gw-el-ach-pill-border);
    background: var(--gw-el-ach-pill-bg);
    color: var(--gw-el-ach-pill-color);
}

.gw-el-badge-pill-description,
.gw-el-achievement-pill-tier {
    color: currentColor;
    font-size: 0.83em;
    font-weight: 600;
    opacity: 0.72;
}

.gw-el-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--gw-el-count-bg);
    color: var(--gw-el-count-color);
    font-size: 11px;
}

.gw-el-badge-card,
.gw-el-achievement-card {
    position: relative;
    min-width: 0;
    padding: var(--gw-el-card-padding);
    border-radius: var(--gw-el-card-radius);
}

.gw-el-badge-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gw-el-achievement-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.gw-el-badge-icon,
.gw-el-achievement-icon,
.gw-el-single-achievement-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--gw-el-icon-radius);
    background: var(--gw-el-badge-icon-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    color: var(--gw-el-badge-icon-color);
    font-size: 22px;
    font-weight: 700;
}

.gw-el-achievement-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--gw-el-ach-icon-bg);
    color: var(--gw-el-ach-icon-color);
}

.gw-el-single-achievement-icon {
    background: var(--gw-el-single-icon-bg);
    color: var(--gw-el-single-icon-color);
}

.gw-el-achievement-title {
    font-size: 19px;
    line-height: 1.1;
}

.gw-el-achievement-description,
.gw-el-single-achievement-description {
    margin: 6px 0 0;
}

.gw-el-achievement-date,
.gw-el-single-achievement-meta {
    display: block;
    margin-top: 8px;
    color: var(--gw-el-meta);
    font-size: 12px;
    font-weight: 700;
}

.gw-el-empty {
    padding: 22px;
    border: 1px dashed var(--gw-el-empty-border);
    border-radius: 18px;
    background: var(--gw-el-empty-bg);
    color: var(--gw-el-muted);
    text-align: center;
}

.gw-el-single-achievement {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-radius: 20px;
}

.gw-el-single-achievement.is-locked {
    opacity: 0.72;
    filter: grayscale(0.18);
}

.gw-el-single-achievement.is-earned {
    border-color: rgba(109, 132, 95, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(233, 242, 225, 0.96)),
        var(--gw-el-paper);
}

.gw-el-single-achievement.is-locked .gw-el-single-achievement-icon {
    background: linear-gradient(180deg, #eee9df, #d6cec0);
    color: #8b8176;
}

.gw-el-single-achievement-title {
    font-size: 21px;
    line-height: 1.1;
}

.gw-el-single-achievement-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    color: var(--gw-el-status-earned);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gw-el-single-achievement.is-locked .gw-el-single-achievement-status {
    color: var(--gw-el-status-locked);
}

.gw-el-align-center {
    text-align: center;
}

.gw-el-align-center .gw-el-profile-heading,
.gw-el-align-center .gw-el-achievements-heading {
    justify-content: center;
}

.gw-el-align-center .gw-el-trust-layout,
.gw-el-align-center .gw-el-achievement-card,
.gw-el-align-center .gw-el-single-achievement {
    text-align: center;
}

.gw-el-align-center .gw-el-trust-layout,
.gw-el-align-center .gw-el-achievement-card,
.gw-el-align-center .gw-el-single-achievement,
.gw-el-align-center .gw-el-badges-list--cards,
.gw-el-align-center .gw-el-achievements-list--cards,
.gw-el-align-center .gw-el-achievements-block-grid,
.gw-el-align-center .gw-el-trust-breakdown {
    justify-items: center;
}

.gw-el-align-center .gw-el-achievement-card,
.gw-el-align-center .gw-el-single-achievement {
    flex-direction: column;
    align-items: center;
}

.gw-el-align-center .gw-el-badges-list,
.gw-el-align-center .gw-el-achievements-list {
    justify-content: center;
}

/* Size-controlled icon box: guarantees custom images never render at natural size. */
.gw-el-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.gw-el-icon img.gw-achievements-icon-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gw-el-badge-icon > .gw-el-icon,
.gw-el-achievement-icon > .gw-el-icon,
.gw-el-single-achievement-icon > .gw-el-icon {
    width: 100%;
    height: 100%;
}

.gw-el-badge-pill > .gw-el-icon,
.gw-el-achievement-pill > .gw-el-icon {
    width: 1.25em;
    height: 1.25em;
    font-size: 1em;
}

/* "Both" display mode sections. */
.gw-el-section + .gw-el-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(104, 83, 54, 0.12);
}

.gw-el-section-title {
    margin: 0 0 12px;
    color: var(--gw-el-heading);
    font-family: Georgia, serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Locked card state for single (not yet earned) items. */
.gw-el-achievement-card.is-locked,
.gw-el-badge-card.is-locked,
.gw-el-achievement-pill.is-locked,
.gw-el-badge-pill.is-locked {
    opacity: 0.72;
    filter: grayscale(0.18);
}

.gw-el-achievement-card.is-locked .gw-el-achievement-icon,
.gw-el-badge-card.is-locked .gw-el-badge-icon {
    background: linear-gradient(180deg, #eee9df, #d6cec0);
    color: #8b8176;
}

.gw-el-achievement-card.is-earned,
.gw-el-badge-card.is-earned {
    border-color: rgba(109, 132, 95, 0.22);
}

.gw-el-badges-list--cards.gw-el-columns-1,
.gw-el-achievements-list--cards.gw-el-columns-1 {
    grid-template-columns: 1fr;
}

.gw-el-badges-list--cards.gw-el-columns-2,
.gw-el-achievements-list--cards.gw-el-columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gw-el-badges-list--cards.gw-el-columns-3,
.gw-el-achievements-list--cards.gw-el-columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 700px) {
    .gw-el-trust-layout {
        grid-template-columns: 1fr;
    }

    .gw-el-trust-breakdown,
    .gw-el-badges-list--cards,
    .gw-el-achievements-list--cards,
    .gw-el-achievements-block-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .gw-el-achievements-panel,
    .gw-el-single-achievement {
        padding: 16px;
    }

    .gw-el-profile-heading,
    .gw-el-achievements-heading {
        flex-direction: column;
    }
}
