.crown_glyph {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.12em;
    fill: currentColor;
}

.menu_action.crowns_banner {
    animation-delay: 0.44s;
}
.menu_action.crowns_banner .menu_desc {
    display: block;
}
.menu_action.crowns_banner .menu_badge {
    position: static;
    flex: 0 0 auto;
    margin-left: auto;
}
.menu_action.crowns_banner .menu_icon {
    color: var(--uti);
    font-size: 21px;
    filter: drop-shadow(0 0 6px rgba(246, 200, 96, 0.45));
}
.menu_badge {
    position: absolute;
    top: -8px;
    right: -5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--ink);
    background: linear-gradient(180deg, #ffe9b0, #f0b35e);
    border-radius: 999px;
    padding: 3px 9px;
    box-shadow:
        0 2px 0 #9c6b2e,
        0 0 12px rgba(246, 200, 96, 0.45);
    animation: menu_badge_bob 1.6s ease-in-out infinite;
}
@keyframes menu_badge_bob {
    50% {
        transform: translateY(-2px);
    }
}

#crowns_screen {
    padding: 16px 14px 12px;
    justify-content: flex-start;
}
.crowns_head {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.crowns_head .screen_sub {
    margin-bottom: 8px;
}
.crowns_head_row {
    width: 100%;
    max-width: 372px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.crowns_head_row .trials_balances {
    margin-top: 0;
}
.crowns_collect_all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--ink);
    background: linear-gradient(180deg, #ffe9b0, #f0b35e);
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    box-shadow: 0 2px 0 #9c6b2e;
    animation: crown_pin_bob 1.4s ease-in-out infinite;
}
.crowns_collect_all:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 #9c6b2e;
}
.crowns_collect_all:disabled {
    animation: none;
    opacity: 0.35;
    cursor: default;
    transform: none;
    box-shadow: 0 2px 0 #9c6b2e;
}
.crowns_deck {
    width: 100%;
    max-width: 372px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 4px 2px 8px;
}
.crowns_deck::-webkit-scrollbar {
    display: none;
}
.crowns_foot {
    flex: 0 0 auto;
    padding-top: 10px;
}
.crowns_section_head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 10px 0 7px;
    text-align: left;
}
.crowns_section_head:first-child {
    margin-top: 0;
}
.crowns_section_head h3 {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.9px;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--uti) 58%, #fff);
}
.crowns_section_head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--uti) 38%, transparent), transparent);
}
.crowns_grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
    padding: 12px 4px 6px;
}

.crown_card {
    position: relative;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px 12px;
    min-height: 124px;
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
    transition:
        transform 0.14s cubic-bezier(0.3, 1.4, 0.4, 1),
        border-color 0.14s,
        background 0.14s;
}
.crown_card:hover,
.crown_card:focus-visible {
    transform: translateY(-2px);
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}
.crown_card.tiered::before,
.crown_card.tiered::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: -4px;
    height: 12px;
    z-index: -1;
    border-radius: 0 0 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    background: rgba(30, 26, 52, 0.95);
}
.crown_card.tiered::after {
    left: 12px;
    right: 12px;
    bottom: -8px;
    opacity: 0.7;
}
.crown_card_glyph {
    font-size: 34px;
    line-height: 1;
    color: var(--uti);
    filter: drop-shadow(0 0 8px rgba(246, 200, 96, 0.45));
}
.crown_card_name {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1.2;
}
.crown_card_sub {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    opacity: 0.5;
}
.crown_card.collected {
    border-color: rgba(246, 200, 96, 0.5);
    background: linear-gradient(180deg, rgba(246, 200, 96, 0.14), rgba(246, 200, 96, 0.04));
}
.crown_card.pending {
    border-color: rgba(255, 233, 176, 0.85);
    box-shadow: 0 0 18px rgba(246, 200, 96, 0.3);
}
.crown_card.locked .crown_card_glyph {
    color: rgba(243, 233, 210, 0.28);
    filter: none;
}
.crown_card.locked .crown_card_name {
    opacity: 0.55;
}
.crown_tier_row {
    display: inline-flex;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
}
.crown_tier_pip {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1;
    padding: 3px 4px;
    min-width: 16px;
    text-align: center;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(243, 233, 210, 0.42);
    background: rgba(255, 255, 255, 0.03);
}
.crown_tier_pip.collected {
    color: var(--ink);
    background: var(--uti);
    border-color: var(--uti);
}
.crown_tier_pip.pending {
    color: var(--ink);
    background: linear-gradient(180deg, #ffe9b0, #f0b35e);
    border-color: #ffe9b0;
    box-shadow: 0 0 8px rgba(246, 200, 96, 0.6);
}
.crown_collect_pin {
    position: absolute;
    top: -8px;
    right: -4px;
    font: inherit;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--ink);
    background: linear-gradient(180deg, #ffe9b0, #f0b35e);
    border: none;
    border-radius: 999px;
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow:
        0 2px 0 #9c6b2e,
        0 0 12px rgba(246, 200, 96, 0.5);
    animation: crown_pin_bob 1.4s ease-in-out infinite;
}
.crown_collect_pin:active {
    transform: translateY(2px);
}
@keyframes crown_pin_bob {
    50% {
        transform: translateY(-1px);
        box-shadow:
            0 4px 0 #9c6b2e,
            0 0 10px rgba(246, 200, 96, 0.5);
    }
}
.crown_collected_mark {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #9fe8b0;
    white-space: nowrap;
}
.crown_locked_mark {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    opacity: 0.4;
    white-space: nowrap;
}

.crown_sheet_layer {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.crown_sheet_backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 6, 18, 0.55);
    animation: fade_in 0.2s ease;
}
.crown_sheet {
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: 88%;
    overflow-y: auto;
    margin: 0 10px 10px;
    border-radius: 18px;
    padding: 18px 16px 14px;
    background: rgba(26, 21, 48, 0.98);
    border: 1px solid rgba(246, 200, 96, 0.3);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    text-align: left;
    animation: crown_sheet_in 0.28s cubic-bezier(0.2, 1.1, 0.3, 1) both;
}
@keyframes crown_sheet_in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
.crown_sheet .trials_balances {
    justify-content: center;
    margin: 0 0 10px;
}
.crown_sheet_head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.crown_sheet_glyph {
    font-size: 34px;
    line-height: 1;
    color: var(--uti);
    filter: drop-shadow(0 0 10px rgba(246, 200, 96, 0.5));
}
.crown_sheet_glyph.locked {
    color: rgba(243, 233, 210, 0.28);
    filter: none;
}
.crown_sheet_name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.3px;
}
.crown_sheet_kind {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    opacity: 0.5;
    margin-top: 3px;
}
.crown_sheet_blurb {
    font-size: 12.5px;
    line-height: 1.45;
    opacity: 0.82;
}
.crown_ladder {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.crown_ladder_step {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.03);
}
.crown_ladder_step .numeral {
    font-weight: 800;
    letter-spacing: 0.4px;
    opacity: 0.5;
}
.crown_ladder_step .target {
    font-weight: 700;
    text-align: left;
}
.crown_ladder_step.collected {
    background: rgba(246, 200, 96, 0.1);
}
.crown_ladder_step.collected .numeral {
    opacity: 1;
    color: var(--uti);
}
.crown_ladder_step.pending {
    background: rgba(246, 200, 96, 0.18);
    border: 1px solid rgba(255, 233, 176, 0.5);
}
.crown_ladder_step.pending .numeral {
    opacity: 1;
    color: #ffe9b0;
}
.crown_ladder_step.locked {
    opacity: 0.55;
}
.crown_ladder_step .crown_collected_mark,
.crown_ladder_step .crown_locked_mark,
.crown_ladder_step .crown_pending_mark {
    justify-self: end;
}
.crown_pending_mark {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #ffe9b0;
    white-space: nowrap;
}
.crown_sheet_rows {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    --c: var(--uti);
}
.crown_sheet_rows .srow .sv .tw {
    color: #ffe9b0;
}
.crown_sheet_rows .srow .sv .db {
    color: #d9a3ff;
}
.crown_sheet_actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
}
.crown_sheet_actions .btn {
    padding: 10px 26px;
    font-size: 14px;
    animation: none;
}
.crown_sheet_actions .btn.ghost {
    color: var(--parchment);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
}
#crown_flash {
    position: absolute;
    inset: 0;
    z-index: 29;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), rgba(255, 240, 200, 0.55), transparent 55%);
}
#crown_flash.on {
    animation: trial_flash 0.5s ease-out both;
}

.crown_pocket_wrap {
    width: 100%;
    max-width: 300px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: pop_in 0.35s 0.12s both;
}
.crown_pocket {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    font: inherit;
    color: var(--parchment);
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid rgba(246, 200, 96, 0.4);
    background: rgba(246, 200, 96, 0.08);
    transition:
        background 0.14s,
        border-color 0.14s;
}
.crown_pocket:hover,
.crown_pocket.open {
    background: rgba(246, 200, 96, 0.13);
    border-color: rgba(246, 200, 96, 0.65);
}
.crown_pocket_glyph {
    font-size: 22px;
    line-height: 1;
    color: var(--uti);
    filter: drop-shadow(0 0 8px rgba(246, 200, 96, 0.5));
}
.crown_pocket_text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.crown_pocket_text b {
    font-size: 13px;
}
.crown_pocket_text small {
    font-size: 10.5px;
    opacity: 0.6;
}
.crown_pocket_mark {
    color: #ffe9b0;
    font-size: 17px;
    line-height: 1;
    transition: transform 0.18s ease;
}
.crown_pocket.open .crown_pocket_mark {
    transform: rotate(180deg);
}
.crown_pocket_list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.26s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.crown_pocket_list.open {
    max-height: 320px;
}
.crown_pocket_row {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.035);
    font-size: 12px;
    text-align: left;
}
.crown_pocket_row .crown_glyph {
    color: var(--uti);
    font-size: 15px;
}
.crown_pocket_row b {
    font-weight: 800;
}
.crown_pocket_row .reward {
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.crown_pocket_row .reward .tw {
    color: #ffe9b0;
}
.crown_pocket_row .reward .db {
    color: #d9a3ff;
    margin-left: 6px;
}

#crown_notice {
    position: absolute;
    left: 50%;
    bottom: 13%;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px 6px 10px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #ffe9b0;
    pointer-events: none;
    white-space: nowrap;
    border: 1px solid rgba(255, 217, 138, 0.38);
    border-radius: 999px;
    background: rgba(26, 16, 36, 0.86);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transform: translateX(-50%);
    z-index: 8;
}
#crown_notice .crown_glyph {
    font-size: 15px;
    color: var(--uti);
    filter: drop-shadow(0 0 5px rgba(246, 200, 96, 0.6));
}
#crown_notice .crown_notice_kicker {
    font-size: 9px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: 0.55;
    margin-right: 1px;
}
#crown_notice.showing {
    animation: crown_notice_in 0.45s cubic-bezier(0.2, 1.2, 0.3, 1) both;
}
#crown_notice.leaving {
    animation: crown_notice_out 0.4s ease both;
}
@keyframes crown_notice_in {
    from {
        opacity: 0;
        transform: translate(-50%, 10px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}
@keyframes crown_notice_out {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, 8px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .menu_badge,
    .crowns_collect_all,
    .crown_collect_pin,
    .crown_sheet,
    .crown_sheet_backdrop,
    .crown_pocket_wrap {
        animation: none;
    }
}
