/* R2 Smart — Candy Cookie block 5 + Rocky visual patch v2
   All selectors are prefixed to avoid changing other Wiki pages. */

.r2ccv2-clickable {
    position: relative;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.r2ccv2-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(0,0,0,.30);
}
.r2ccv2-clickable:focus-visible {
    outline: 2px solid rgba(255,197,88,.95);
    outline-offset: 3px;
}
.r2ccv2-open-craft {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 9px 13px;
    border: 1px solid rgba(255,195,89,.36);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(113,72,31,.38), rgba(42,27,17,.50));
    color: #f7d79a;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    cursor: pointer;
    box-shadow: inset 0 1px rgba(255,255,255,.04);
}
.r2ccv2-open-craft:hover {
    border-color: rgba(255,202,102,.75);
    background: linear-gradient(180deg, rgba(137,85,34,.50), rgba(54,32,18,.66));
    color: #ffe5ae;
}

/* Deliberately uses a plum / berry accent so the Ertes event craft is
   visually distinct from the normal gold/brown Wiki cards. */
.r2ccv2-ertes {
    grid-column: 1 / -1;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 320px);
    gap: 24px;
    align-items: center;
    margin: 18px 0 24px;
    padding: 24px;
    border: 1px solid rgba(242,158,255,.34);
    border-radius: 18px;
    background:
        radial-gradient(circle at 88% 15%, rgba(255,191,87,.18), transparent 32%),
        radial-gradient(circle at 12% 12%, rgba(236,108,181,.18), transparent 33%),
        linear-gradient(135deg, rgba(88,28,71,.96), rgba(47,22,67,.96) 52%, rgba(91,48,31,.95));
    box-shadow:
        0 18px 45px rgba(0,0,0,.34),
        inset 0 1px rgba(255,255,255,.055);
}
.r2ccv2-ertes::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 0 44%, rgba(255,255,255,.035) 50%, transparent 57%);
}
.r2ccv2-ertes-copy,
.r2ccv2-ertes-preview {
    position: relative;
    z-index: 1;
}
.r2ccv2-eyebrow {
    margin-bottom: 7px;
    color: #f7c6ee;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.r2ccv2-ertes h3 {
    margin: 0 0 9px;
    color: #fff3d7;
    font-size: clamp(21px, 2.3vw, 30px);
    line-height: 1.15;
}
.r2ccv2-ertes-main {
    margin: 0;
    color: rgba(255,245,238,.90);
    font-size: 15px;
    line-height: 1.65;
}
.r2ccv2-recipe-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
    margin-top: 18px;
}
.r2ccv2-recipe {
    padding: 11px 12px;
    border: 1px solid rgba(255,255,255,.105);
    border-radius: 11px;
    background: rgba(10,8,16,.24);
    color: rgba(255,245,238,.82);
    font-size: 12px;
    line-height: 1.45;
}
.r2ccv2-recipe strong {
    display: block;
    margin-bottom: 3px;
    color: #ffd893;
    font-size: 12px;
}
.r2ccv2-cocoa {
    grid-column: 1 / -1;
}
.r2ccv2-ertes-preview {
    border: 1px solid rgba(255,217,158,.25);
    border-radius: 13px;
    overflow: hidden;
    background: rgba(9,8,13,.48);
    box-shadow: 0 12px 28px rgba(0,0,0,.28);
    cursor: zoom-in;
}
.r2ccv2-ertes-preview img {
    display: block;
    width: 100%;
    height: auto;
}
.r2ccv2-ertes-preview figcaption {
    padding: 9px 11px;
    color: rgba(255,238,215,.70);
    font-size: 11px;
    text-align: center;
}

/* Competition image: a living visual break between the title/status and the data. */
.r2ccv2-rocky-visual {
    position: relative;
    overflow: hidden;
    margin: 18px 0 22px;
    border: 1px solid rgba(217,165,83,.30);
    border-radius: 18px;
    background: #17120f;
    box-shadow: 0 18px 42px rgba(0,0,0,.30);
    cursor: zoom-in;
}
.r2ccv2-rocky-visual img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    object-position: center 48%;
}
.r2ccv2-rocky-visual::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    pointer-events: none;
    background: linear-gradient(transparent, rgba(12,9,8,.84));
}
.r2ccv2-rocky-caption {
    position: absolute;
    z-index: 1;
    left: 18px;
    right: 18px;
    bottom: 15px;
    color: rgba(255,242,216,.94);
    text-shadow: 0 2px 10px rgba(0,0,0,.8);
}
.r2ccv2-rocky-caption b {
    display: block;
    margin-bottom: 2px;
    color: #ffd996;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.r2ccv2-rocky-caption span {
    font-size: 13px;
}

.r2ccv2-permanent-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 3px 7px;
    border: 1px solid rgba(255,199,88,.34);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(119,79,26,.32), rgba(59,38,16,.36));
    color: #f6cf82;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.3;
    white-space: nowrap;
    vertical-align: middle;
}
.r2ccv2-permanent-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 10px 0 16px;
    padding: 10px 12px;
    border-left: 3px solid rgba(242,183,70,.75);
    border-radius: 0 10px 10px 0;
    background: rgba(103,68,25,.15);
    color: rgba(244,224,190,.80);
    font-size: 12px;
}
.r2ccv2-permanent-legend strong {
    color: #f3d18c;
}
.r2ccv2-level-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border: 1px solid rgba(245,192,81,.25);
    border-radius: 999px;
    color: #ffe0a4;
    background: rgba(59,39,18,.34);
    font-weight: 800;
}

/* Modal */
.r2ccv2-modal[hidden] { display: none !important; }
.r2ccv2-modal {
    position: fixed;
    z-index: 2147483600;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(4,4,7,.84);
    backdrop-filter: blur(6px);
}
.r2ccv2-modal-card {
    position: relative;
    max-width: min(1080px, 96vw);
    max-height: 92vh;
    padding: 14px;
    border: 1px solid rgba(255,207,121,.28);
    border-radius: 16px;
    background: #15110e;
    box-shadow: 0 30px 90px rgba(0,0,0,.65);
}
.r2ccv2-modal-card img {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 28px);
    border-radius: 10px;
    object-fit: contain;
}
.r2ccv2-modal-close {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    background: rgba(12,10,9,.85);
    color: #fff1d7;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.r2ccv2-modal-close:hover { background: rgba(75,48,24,.95); }

@media (max-width: 760px) {
    .r2ccv2-ertes {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px;
        border-radius: 15px;
    }
    .r2ccv2-recipe-grid { grid-template-columns: 1fr; }
    .r2ccv2-cocoa { grid-column: auto; }
    .r2ccv2-ertes-preview { max-width: 390px; width: 100%; }
    .r2ccv2-rocky-visual { border-radius: 14px; }
    .r2ccv2-rocky-visual img { aspect-ratio: 16 / 9; }
    .r2ccv2-rocky-caption { left: 13px; right: 13px; bottom: 11px; }
    .r2ccv2-rocky-caption span { font-size: 11px; }
    .r2ccv2-permanent-badge { margin-left: 5px; font-size: 9px; }
}


/* =========================================================
   V2.4 — TOP-10 rewards: highlighted, intentionally hidden
   ========================================================= */
.r2ccv2-rewards {
    position: relative;
    overflow: hidden;
    margin: 20px 0 24px;
    border: 1px solid rgba(255,196,83,.42) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(circle at 88% 0%, rgba(255,190,70,.13), transparent 35%),
        radial-gradient(circle at 8% 100%, rgba(155,67,124,.12), transparent 34%),
        linear-gradient(145deg, rgba(48,31,20,.97), rgba(25,21,24,.98) 56%, rgba(43,25,38,.97)) !important;
    box-shadow:
        0 18px 44px rgba(0,0,0,.31),
        inset 0 1px rgba(255,255,255,.045) !important;
}
.r2ccv2-rewards::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(112deg, transparent 0 43%, rgba(255,255,255,.035) 50%, transparent 57%);
}
.r2ccv2-rewards > summary {
    position: relative;
    z-index: 1;
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 15px 18px !important;
    color: #ffe3a7 !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    letter-spacing: .015em;
    cursor: pointer;
    list-style: none;
    border-bottom: 1px solid rgba(255,205,115,.13);
}
.r2ccv2-rewards > summary::-webkit-details-marker {
    display: none;
}
.r2ccv2-rewards > summary::after {
    content: "⌄";
    margin-left: auto;
    color: rgba(255,224,163,.72);
    font-size: 18px;
    transition: transform .18s ease;
}
.r2ccv2-rewards[open] > summary::after {
    transform: rotate(180deg);
}
.r2ccv2-rewards-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
    padding: 4px 8px;
    border: 1px solid rgba(255,203,104,.30);
    border-radius: 999px;
    background: rgba(111,69,24,.28);
    color: #efc873;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.r2ccv2-rewards-body {
    position: relative;
    z-index: 1;
    padding: 8px 16px 16px;
}
.r2ccv2-rewards-note {
    margin: 6px 2px 13px;
    color: rgba(241,224,199,.73);
    font-size: 12px;
    line-height: 1.55;
}
.r2ccv2-rewards-grid {
    display: grid;
    gap: 7px;
}
.r2ccv2-reward-slot {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) 28px;
    align-items: center;
    gap: 11px;
    min-height: 46px;
    padding: 8px 11px;
    border: 1px solid rgba(255,255,255,.065);
    border-radius: 11px;
    background: rgba(7,7,10,.25);
    box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.r2ccv2-reward-slot:nth-child(-n+3) {
    border-color: rgba(240,184,80,.16);
    background: linear-gradient(90deg, rgba(95,62,25,.20), rgba(8,8,11,.25) 54%);
}
.r2ccv2-reward-place {
    color: #f3ce87;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}
.r2ccv2-reward-secret {
    position: relative;
    min-width: 0;
    height: 25px;
    overflow: hidden;
    border-radius: 7px;
    background:
        linear-gradient(90deg,
            rgba(255,230,184,.12) 0 18%,
            rgba(255,230,184,.19) 18% 31%,
            rgba(255,230,184,.10) 31% 48%,
            rgba(255,230,184,.17) 48% 70%,
            rgba(255,230,184,.10) 70% 100%);
}
.r2ccv2-reward-secret::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        105deg,
        transparent 0 8px,
        rgba(255,255,255,.022) 8px 10px
    );
}
.r2ccv2-reward-secret span {
    display: block;
    padding: 4px 10px;
    color: rgba(255,237,207,.62);
    font-size: 12px;
    font-weight: 800;
    filter: blur(5px);
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
}
.r2ccv2-reward-lock {
    color: rgba(246,203,123,.72);
    font-size: 14px;
    text-align: center;
}
.r2ccv2-rewards-footer {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 12px 2px 0;
    color: rgba(232,212,185,.58);
    font-size: 11px;
}
.r2ccv2-rewards-footer strong {
    color: #e8c17b;
}

@media (max-width: 620px) {
    .r2ccv2-rewards > summary {
        min-height: 54px;
        padding: 13px 14px !important;
        font-size: 14px !important;
    }
    .r2ccv2-rewards-badge {
        font-size: 8px;
        padding: 3px 6px;
    }
    .r2ccv2-rewards-body {
        padding: 7px 11px 13px;
    }
    .r2ccv2-reward-slot {
        grid-template-columns: 36px minmax(0,1fr) 24px;
        gap: 8px;
        min-height: 43px;
        padding: 7px 8px;
    }
    .r2ccv2-reward-place {
        font-size: 11px;
    }
}
