#year-chests { color: #e2e5df; padding: 10px; text-align: left; }
/* Этот файл подключают только площадь и зимние сундуки. */
html, body, .main_start, #yc-overlay #year-chests, .yc-guide, #yc-result.yc-modal, #yc-rewards, #year-window {
    scrollbar-width:none; -ms-overflow-style:none;
}
html::-webkit-scrollbar, body::-webkit-scrollbar, .main_start::-webkit-scrollbar, #yc-overlay #year-chests::-webkit-scrollbar,
.yc-guide::-webkit-scrollbar, #yc-result.yc-modal::-webkit-scrollbar, #yc-rewards::-webkit-scrollbar,
#year-window::-webkit-scrollbar { display:none; }
#yc-overlay[hidden] { display:none; }
#yc-overlay, #start .main > #yc-overlay {
    position:fixed; z-index:80; top:0; right:0; bottom:0; left:0; max-width:700px; margin:0 auto; box-sizing:border-box;
    display:flex; align-items:center; justify-content:center; padding:10px; background:rgba(5,12,18,.68);
}
#start .main > #yc-overlay[hidden] { display:none; }
body.yc-catalog-on { overflow:hidden; }
#yc-overlay #year-chests {
    box-sizing:border-box; width:100%; max-width:600px; max-height:100%; overflow-y:auto; overscroll-behavior:contain;
    padding:6px 12px 12px; background:#111e24; border:1px solid #77613d; border-radius:6px; box-shadow:0 10px 40px #03090db3;
}
#yc-overlay #year-chests[data-loading] .yc-catalog { display:none; }
.yc-modal-on #yc-overlay #year-chests > :not(#yc-result) { visibility:hidden; }
.yc-modal-on #yc-overlay #year-chests { background:none; border-color:transparent; box-shadow:none; }
body.yc-modal-on #start .main > #yc-overlay { background:transparent; }
#year-chests [hidden] { display: none !important; }
#year-chests h1, #year-chests h2 {
    margin: 0; color: #ffe8b3; font-family: Georgia, "Times New Roman", serif;
    line-height: 1.15; text-shadow: 0 2px 3px #03090d;
}
.yc-header { display:flex; align-items:center; justify-content:space-between; gap:48px; min-height:44px; margin:0; }
#yc-title { font-size:clamp(20px,5vw,24px); }
.yc-close-icon, .yc-info summary {
    box-sizing:border-box; width:44px; height:44px; padding:0; margin:0; display:flex;
    align-items:center; justify-content:center; cursor:pointer; color:#ffe5a7; background:transparent; border:0;
}
.yc-close-icon { flex:none; position:relative; }
.yc-close-icon::before, .yc-close-icon::after {
    content:""; position:absolute; width:23px; height:5px; box-sizing:border-box; border-radius:2px;
    background:linear-gradient(#fff1bd,#dbad65 56%,#ad783d); border:1px solid #805b32;
    box-shadow:0 1px 2px #03090c; transform:rotate(45deg);
}
.yc-close-icon::after { transform:rotate(-45deg); }
.yc-close-icon:hover, .yc-info summary:hover { filter:brightness(1.2); }
#year-chests .ssilki1, #year-chests .ssilki3, #year-chests .ssilki4 {
    display:inline-flex; box-sizing:border-box; align-items:center; justify-content:center; vertical-align:middle;
    min-width:0; min-height:42px; margin:0; padding:4px 13px; background-size:auto 100%; cursor:pointer; border:0;
}
#year-chests a:focus-visible, #year-chests button:focus-visible,
#year-chests summary:focus-visible, .yc-guide:focus-visible, #yc-rewards:focus-visible { outline: 2px solid #fff0b5; outline-offset: 2px; }
#yc-notice { margin: 0; font-size: 14px; color: #ffdfa8; }
#yc-notice:not(:empty) { padding: 3px 4px 12px; }
.yc-catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
#year-chests .yc-card, #year-chests .yc-result-panel { box-sizing: border-box; min-width: 0; }
#year-chests .yc-card { margin: 0; padding: 16px 12px 13px; text-align: center; }
#year-chests .yc-card h2 { font-size: 21px; }
.yc-balance { margin: 5px 0 0; font-size: 13px; line-height: 1.25; color: #c4d1d3; }
.yc-balance b, .yc-pity b { color: #ffe2a2; }
.yc-card-art, .yc-stage { position: relative; isolation: isolate; }
.yc-card-art { height: 165px; display: flex; justify-content: center; align-items: center; margin: 1px auto 10px; }
.yc-card-art::before, .yc-stage::before, .yc-stage::after {
    content: ""; position: absolute; pointer-events: none; z-index: -1;
}
.yc-card-art::before {
    width: 92%; height: 88%; bottom: 0; left: 4%;
    background: radial-gradient(ellipse at 50% 72%, rgba(226,166,53,.24), transparent 64%);
}
.yc-card[data-chest="2"] .yc-card-art::before {
    background: radial-gradient(ellipse at 50% 68%, rgba(87,178,232,.29), transparent 63%);
}
.yc-card-art img, .yc-opening-art img { display: block; width: auto; height: 100%; max-width: 100%; object-fit: contain; }
.yc-actions { display: flex; justify-content: center; gap: 6px; }
.yc-actions form { margin: 0; flex: 1 1 0; min-width: 0; }
#year-chests .yc-actions button { width:100%; max-width:191px; font-size:13px; letter-spacing:.2px; white-space:nowrap; }
#year-chests .yc-actions button:disabled { cursor: default; opacity: .58; filter: saturate(.55); }
.yc-pity { margin: 10px 0 0; font-size: 13px; line-height: 1.35; color: #c0cbcd; }
#year-chests .yc-buy { justify-self:center; margin:5px auto 0; padding:4px 17px; font-size:13px; }
.yc-info { position:relative; margin:0 0 8px; }
.yc-info summary { position:absolute; bottom:100%; right:46px; list-style:none; }
.yc-info summary::-webkit-details-marker { display:none; }
.yc-help-mark {
    width:25px; height:25px; box-sizing:border-box; text-align:center; font:bold 20px/23px Georgia,serif;
    border:1px solid #bb985d; border-radius:50%; background:linear-gradient(#304049,#18262a);
    box-shadow:inset 0 0 0 2px #1d292c, 0 1px 3px #03090c; text-shadow:0 1px 2px #03090c;
}
.yc-info[open] .yc-help-mark { background:#55452f; border-color:#ffe0a0; }
.yc-info .yc-native-close { display:none; }
#year-chests:not(.yc-ready) .yc-info[open] summary { right:0; z-index:1; }
#year-chests:not(.yc-ready) .yc-info[open] .yc-help-mark { display:none; }
#year-chests:not(.yc-ready) .yc-info[open] .yc-native-close { display:flex; }
#year-chests:not(.yc-ready):has(.yc-info[open]) .yc-header .yc-close-icon { visibility:hidden; }
.yc-info:not([open]) .yc-guide { display:none; }
.yc-info[open] ~ .yc-catalog { display:none; }
.yc-guide {
    max-height:60vh; overflow:auto; overscroll-behavior:contain; padding:10px 14px; text-align:left;
    background:#142329; border:1px solid #405158; border-radius:4px; color:#dde3df; font:14px/1.45 Georgia,serif;
}
#year-chests .yc-guide h2 { font-size:18px; margin:14px 0 4px; }
#year-chests .yc-guide h2:first-child { margin-top:0; }
.yc-guide h3 { color:#d8c8a6; font:bold 14px/1.3 Georgia,serif; margin:8px 0 3px; }
.yc-guide p { margin:2px 0 5px; }
.yc-guide b { color:#ffe1a3; }
.yc-guide ul { list-style:none; margin:4px 0 9px; padding:0; }
.yc-guide li, .yc-guide-price { display:flex; align-items:center; gap:9px; }
.yc-guide li { min-height:31px; padding:2px 0; border-bottom:1px solid #304147; }
.yc-guide li:last-child { border:0; }
.yc-guide-icons, .yc-guide .yc-item-icon, .yc-guide-icons img { display:inline-block; flex:none; width:28px; height:28px; }
.yc-guide-icons { display:flex; align-items:center; }
.yc-guide-icons img { object-fit:contain; color:#ffe0a1; font-size:18px; }
.yc-guide-icons .yc-item-icon:not(:only-child) { width:20px; height:20px; align-self:flex-start; }
.yc-guide-icons .yc-item-icon + .yc-item-icon { align-self:flex-end; margin-left:-12px; }

#yc-result { margin-bottom: 12px; }
.yc-modal-on { overflow: hidden; }
#yc-result.yc-modal {
    position: fixed; z-index: 100010; top: 0; right: 0; bottom: 0; left: 0;
    display: flex; align-items: center; justify-content: center; overflow-y: auto;
    box-sizing: border-box; max-width:700px; margin:0 auto; padding: 12px; background: rgba(3,9,14,.84);
}
#year-chests .yc-result-panel {
    position: relative; isolation: isolate; width: 100%; max-width: 540px; margin: 0 auto;
    padding: 11px 15px 15px; text-align: center; overflow: hidden;
    background: radial-gradient(ellipse at 50% 6%, #22424a 0, transparent 40%), linear-gradient(150deg,#13272d,#0b181e 52%,#111b20);
    border: 1px solid #ae8c50; border-radius: 7px;
    box-shadow: inset 0 0 0 3px #111a1f, inset 0 0 0 4px #534934, 0 10px 35px #02080b;
}
.yc-result-panel::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none; top: -24px; left: 0; right: 0; height: 160px;
    opacity: .22; background: url(../images/event/year/aurora.webp) 50% 20% / 115% auto no-repeat;
}
.yc-modal .yc-result-panel { display: flex; flex-direction: column; max-height: 100%; }
.yc-stage { height: 97px; width: 100%; margin: 0 auto; flex: none; }
.yc-stage::before {
    inset: -20% 0 -10%; background: radial-gradient(ellipse, rgba(255,214,127,.52), rgba(246,193,97,.08) 47%, transparent 65%);
}
.yc-stage::after {
    opacity: 0; width: 270px; height: 180px; top: 50%; left: 50%; transform: translate(-50%,-50%);
    background: repeating-conic-gradient(from 8deg, transparent 0 18deg, rgba(255,221,142,.32) 20deg, transparent 27deg);
    mask-image: radial-gradient(ellipse, #000 0%, transparent 67%);
}
.yc-opening-art { position: relative; width: 100%; height: 100%; transform-origin: 50% 85%; }
.yc-opening-art img { position: absolute; top: 0; left: 0; width: 100%; }
#yc-closed-art { opacity: 0; }
#year-chests #yc-result-title {
    display: flex; justify-content: center; align-items: center; gap: 10px;
    font-size: 28px; letter-spacing: .01em; color: #fff0cd;
}
#yc-result-title::before, #yc-result-title::after {
    content: ""; width: 28px; height: 1px; background: linear-gradient(to right,transparent,#c59d60);
}
#yc-result-title::after { transform: rotate(180deg); }
#yc-rewards {
    margin: 0 0 12px; padding: 0 2px 4px; overflow: auto; min-height: 0; text-align: left;
    overscroll-behavior: contain;
}
.yc-loot-group { margin: 6px 0 12px; }
.yc-loot-group:last-child { margin-bottom: 0; }
.yc-loot-group h3 {
    display: flex; align-items: center; gap: 8px; margin: 0 0 7px;
    color: #e9d8b1; font: bold 15px/1.25 Georgia,"Times New Roman",serif;
}
.yc-loot-group h3::after { content: ""; height: 1px; flex: 1; background: linear-gradient(to right,#796647,transparent); }
.yc-loot-group ul { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin: 0; padding: 0; list-style: none; }
.yc-loot-group li { position: relative; flex: none; max-width: 100%; margin: 0; padding: 0; list-style: none; }
.yc-loot-slot {
    display: block; position: relative; box-sizing: border-box; width: 54px; height: 54px; padding: 3px; cursor: pointer;
    list-style: none; color: #eee5c7; border: 1px solid #52666c; border-radius: 4px;
    background: radial-gradient(ellipse at 44% 30%,#314a4f,#16282f 78%); box-shadow: inset 0 0 0 2px #152229;
}
.yc-loot-slot::-webkit-details-marker { display: none; }
[data-loot="find"] .yc-loot-slot { border-color: #88754d; background: radial-gradient(ellipse at 44% 30%,#4c4735,#282c29 78%); }
[data-loot="winter"] .yc-loot-slot { border-color: #5c8087; background: radial-gradient(ellipse at 44% 30%,#3d646b,#172b34 78%); }
.yc-loot-slot:hover, .yc-loot-slot:focus, .yc-loot-group details[open] .yc-loot-slot { border-color: #f2db9f; }
.yc-loot-art { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.yc-item-icon {
    display:inline-block; flex:none; background:url(../images/event/year/loot-items.webp) 0 0 / 300% 300% no-repeat;
}
.yc-item-icon[data-item^="decor"] { background-image:url(../images/event/year/loot-ornaments.webp); }
.yc-item-icon[data-item="gold"], .yc-item-icon[data-item="decor2"] { background-position:50% 0; }
.yc-item-icon[data-item="iron"], .yc-item-icon[data-item="decor3"] { background-position:100% 0; }
.yc-item-icon[data-item="fang"], .yc-item-icon[data-item="decor4"] { background-position:0 50%; }
.yc-item-icon[data-item="wing"], .yc-item-icon[data-item="decor5"] { background-position:50% 50%; }
.yc-item-icon[data-item="hide"], .yc-item-icon[data-item="decor6"] { background-position:100% 50%; }
.yc-item-icon[data-item="claw"], .yc-item-icon[data-item="decor7"] { background-position:0 100%; }
.yc-item-icon[data-item="tablet"], .yc-item-icon[data-item="decor8"] { background-position:50% 100%; }
.yc-item-icon[data-item="potion"], .yc-item-icon[data-item="decor9"] { background-position:100% 100%; }
.yc-item-icon[data-item="father"] { background:url(../images/event/year/father-frost-portrait.webp) center / contain no-repeat; }
.yc-item-icon[data-item="maiden"] { background:url(../images/event/year/snow-maiden-portrait.webp) center / contain no-repeat; }
.yc-item-icon[data-item^="gem"] { background-image:url(../images/event/year/loot-gems.webp); background-size:500% 300%; }
.yc-item-icon[data-item="gem2"], .yc-item-icon[data-item="gem7"], .yc-item-icon[data-item="gem12"] { background-position-x:25%; }
.yc-item-icon[data-item="gem3"], .yc-item-icon[data-item="gem8"], .yc-item-icon[data-item="gem13"] { background-position-x:50%; }
.yc-item-icon[data-item="gem4"], .yc-item-icon[data-item="gem9"], .yc-item-icon[data-item="gem14"] { background-position-x:75%; }
.yc-item-icon[data-item="gem5"], .yc-item-icon[data-item="gem10"], .yc-item-icon[data-item="gem15"] { background-position-x:100%; }
.yc-item-icon[data-item="gem6"], .yc-item-icon[data-item="gem7"], .yc-item-icon[data-item="gem8"],
.yc-item-icon[data-item="gem9"], .yc-item-icon[data-item="gem10"] { background-position-y:50%; }
.yc-item-icon[data-item="gem11"], .yc-item-icon[data-item="gem12"], .yc-item-icon[data-item="gem13"],
.yc-item-icon[data-item="gem14"], .yc-item-icon[data-item="gem15"] { background-position-y:100%; }
.yc-loot-art .yc-item-icon { width:44px; height:44px; }
.yc-loot-art img { display: block; width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 1px 1px #071116); }
.yc-loot-art:empty::after {
    content: "✦"; display: grid; place-items: center; width: 30px; height: 30px;
    border: 1px solid #ab966b; border-radius: 50%; background: radial-gradient(at 35% 25%,#6c6250,#302e27);
    color: #ffe4a2; font: bold 18px/1 Georgia,serif; text-shadow: 0 1px 2px #141513;
}
.yc-loot-slot[title^="Руна "] .yc-loot-art:empty::after { content: "ᚱ"; }
[data-loot="resource"] .yc-loot-art:empty::after { content: "◆"; }
.yc-loot-slot[title^="Тренировка «Атака»"] .yc-loot-art:empty::after { content: "⚔"; }
.yc-loot-slot[title^="Тренировка «Защита»"] .yc-loot-art:empty::after { content: "⛨"; }
.yc-loot-slot[title^="Тренировка «Здоровье»"] .yc-loot-art:empty::after { content: "♥"; }
.yc-loot-count {
    position: absolute; right: 1px; bottom: 1px; padding: 0 3px 1px; border-radius: 3px 0 2px 0;
    background: #101c20; color: #ffe7af; font: bold 13px/1.15 Georgia,serif; font-variant-numeric: tabular-nums;
}
.yc-loot-group details[open] { box-sizing: border-box; min-height: 54px; padding: 0 0 0 60px; }
.yc-loot-group details[open] .yc-loot-slot { position: absolute; left: 0; top: 0; }
.yc-loot-detail {
    display: flex; align-items: center; box-sizing: border-box; min-height: 54px; max-width: 170px; padding: 3px 5px;
    color: #fff0c7; font: 14px/1.25 Georgia,serif; overflow-wrap: anywhere; text-align: left;
}
#yc-continue { align-self: center; min-width: 160px; flex-shrink: 0; }
.yc-opening #yc-rewards, .yc-opening #yc-result-title { visibility: hidden; }
.yc-opening .yc-stage { animation: yc-settle 1.38s both; }
.yc-opening #yc-closed-art { animation: yc-unlock 1s both; }
.yc-opening #yc-open-art { animation: yc-lid 1s both; }
.yc-opening .yc-stage::after { animation: yc-rays 1.35s both; }
.yc-reveal #yc-rewards li { animation: yc-drop .28s backwards; }
@keyframes yc-unlock {
    0%, 40% { opacity: 1; }
    8%, 22% { transform: translateX(-3px) rotate(-2deg); }
    15%, 30% { transform: translateX(3px) rotate(2deg); }
    42% { transform: none; }
    75%, 100% { opacity: 0; }
}
@keyframes yc-lid { 0%, 42% { opacity: 0; } 80%, 100% { opacity: 1; } }
@keyframes yc-rays {
    0%, 38% { opacity: 0; transform: translate(-50%,-36%) scale(.65); }
    64% { opacity: .9; } 100% { opacity: 0; transform: translate(-50%,-51%) scale(1.3); }
}
@keyframes yc-settle {
    0%, 71% { transform: translateY(30px) scale(1.45); transform: translateY(var(--yc-opening-offset, 30px)) scale(1.45); }
    100% { transform: none; }
}
@keyframes yc-drop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) {
    #year-chests { padding: 7px; }
    .yc-catalog { grid-template-columns: minmax(0, 1fr); }
    #year-chests .yc-card { padding: 12px; }
    .yc-card-art { height: 129px; margin: 0 auto 6px; }
    #yc-overlay .yc-card {
        display:grid; grid-template-columns:28% minmax(0,1fr); column-gap:8px; align-items:center;
        padding:12px 9px 9px;
    }
    #yc-overlay .yc-card-art { grid-column:1; grid-row:1 / 3; width:100%; height:auto; margin:0; }
    #yc-overlay .yc-card-art img { width:100%; height:auto; }
    #yc-overlay .yc-card h2, #yc-overlay .yc-balance { grid-column:2; }
    #yc-overlay .yc-actions { grid-column:1 / -1; margin-top:4px; }
    #yc-overlay .yc-card h2 { font-size:19px; }
    #yc-overlay .yc-balance { margin:3px 0 8px; }
    #yc-overlay .yc-pity, #yc-overlay .yc-buy { grid-column:1 / -1; }
}
@media (max-height: 560px) {
    .yc-modal .yc-stage { height: 63px; }
    .yc-modal .yc-result-panel { padding-top: 7px; padding-bottom: 7px; }
    #year-chests .yc-modal #yc-result-title { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    #yc-result *, #yc-result *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; }
}
