.header.df-header-art {
    background-image: var(--df-header-art), var(--xp-blue-gradient) !important;
    background-position: left center, 0 0 !important;
    background-size: cover, auto !important;
    background-repeat: no-repeat !important;
}
/* Название в работе рисует художник. Ссылка остаётся: клик ведёт на главную. */
.header.df-header-art .header-logo,
.header.df-header-art .header-logo:hover { color: transparent !important; text-shadow: none !important; }
.header.df-header-art .logout-link,
.header.df-header-art .bell-icon { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85)); }
@media screen and (max-width: 768px) {
    /* Кнопка «пуск» перекрыла бы начало работы, поэтому сдвигаем картинку за неё. */
    .header.df-header-art {
        background-image: var(--df-header-art), linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #0066ff 100%) !important;
        background-position: 104px center, 0 0 !important;
        background-size: auto 100%, auto !important;
    }
}

.ev-widget {
    margin: 0 0 10px;
    border: 3px solid #0b4f8a; border-top: 0;
    background: #f4faff;
    color: #12304a;
    font: 11px Tahoma, sans-serif;
    box-shadow: 2px 3px 8px rgba(4, 45, 90, 0.3);
    border-radius: 0 !important;
}
.ev-widget *, .ev-widget *::before { box-sizing: border-box; border-radius: 0 !important; }
.ev-head {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 6px;
    min-height: 26px; padding: 3px 4px 3px 6px;
    color: #fff; font-size: 12px; font-weight: bold; cursor: pointer; user-select: none;
    text-shadow: 1px 1px 0 #06406f;
    background: linear-gradient(180deg, #a6ebff 0%, #4cc4f4 47%, #0a86d8 50%, #0a9ae0 80%, #5fe0ff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.ev-head-ico { width: 20px; height: 20px; flex-shrink: 0; background: url("/static/trophies/s3_aero.svg") center / contain no-repeat; }
.ev-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ev-head-timer { font-weight: normal; font-size: 11px; white-space: nowrap; }
.ev-toggle { width: 21px; height: 21px; padding: 0; border: 1px solid #fff; background: linear-gradient(#5fc0f0, #0a6fc0); color: #fff; font: bold 12px Tahoma, sans-serif; cursor: pointer; }
.ev-body { padding: 8px; }
.ev-hero { display: flex; gap: 10px; align-items: center; }
.ev-prize-ico { width: 56px; height: 56px; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(0, 70, 130, 0.4)); }
.ev-about { margin: 0 0 4px; font-size: 12px; font-weight: bold; line-height: 1.35; }
.ev-prize { margin: 0; line-height: 1.4; }
.ev-timer-row, .ev-stats, .ev-final { margin-top: 7px; }
.ev-timer-row b { color: #0b6cc0; font-size: 13px; }
.ev-final { padding: 5px 7px; background: #e6fff0; border: 1px solid #79c79a; }
.ev-rules { margin-top: 7px; border: 1px solid #a9cfe8; background: #fff; }
.ev-rules summary { padding: 4px 7px; font-weight: bold; cursor: pointer; background: linear-gradient(#fff, #dff2fd); }
.ev-rules ul { margin: 0; padding: 6px 10px 8px 24px; line-height: 1.45; }
.ev-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.ev-sort { margin-left: auto; white-space: nowrap; }
.ev-sort select { max-width: 170px; font: 11px Tahoma, sans-serif; }
.ev-btn {
    display: inline-flex; align-items: center; min-height: 23px; padding: 2px 9px;
    color: #000 !important; font: 11px Tahoma, sans-serif; text-decoration: none; cursor: pointer;
    background: linear-gradient(#fff, #e4ecf5); border: 1px solid #7f9db9;
}
.ev-btn:hover { background: linear-gradient(#fff, #cfe9fb); text-decoration: none; }
.ev-btn:focus-visible, .ev-strip:focus-visible, .ev-toggle:focus-visible { outline: 2px solid #0a6fc0; outline-offset: 1px; }
.ev-btn[disabled] { opacity: 0.6; cursor: default; }
.ev-btn-main { color: #fff !important; font-weight: bold; background: linear-gradient(#5fd0f5 0%, #1a9ae0 48%, #0a7ec8 52%, #1fa6e8 100%); border-color: #0b5f9e; text-shadow: 0 1px 0 #06406f; }
.ev-btn-main:hover { background: linear-gradient(#7fdcf8 0%, #2aa6e8 48%, #0a86d8 52%, #36b5f0 100%); }
.ev-btn-danger { color: #a00 !important; border-color: #c88; }
.ev-more { display: flex; justify-content: center; width: 100%; margin-top: 6px; }
.ev-file { display: none; }
.ev-upload { margin-bottom: 8px; padding: 7px; background: #fff; border: 1px solid #7f9db9; }
.ev-upload label { display: block; margin: 6px 0; }
.ev-title-input { width: min(100%, 320px); padding: 2px 4px; font: 11px Tahoma, sans-serif; border: 1px solid #7f9db9; }
.ev-hint { margin-top: 5px; color: #4a6276; }
.ev-entry { margin-bottom: 6px; background: #fff; border: 1px solid #a9cfe8; }
.ev-entry.is-mine { border-color: #0a86d8; box-shadow: inset 0 0 0 1px #9fe8ff; }
.ev-strip { background: #0a4f90; }
.ev-strip img { display: block; width: 100%; height: auto; }
@media (max-width: 768px) {
    /* На телефоне целая полоса стала бы высотой в 14px: держим родную высоту и даём прокрутку. */
    .ev-strip { height: 48px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
    .ev-strip img { height: 40px; width: auto; max-width: none; }
}
.ev-entry-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 7px 2px; }
.ev-entry-info { min-width: 0; }
.ev-entry-title { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.ev-author { color: #4a6276; }
.ev-score { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.ev-score b { color: #0b6cc0; font-size: 13px; }
.ev-mine { color: #15803d; }
.ev-place { display: inline-block; margin-bottom: 2px; padding: 0 5px; color: #fff; font-weight: bold; background: #0a86d8; }
.ev-place-1 { background: linear-gradient(#f6cf4f, #b8860b); text-shadow: 0 1px 0 #6b4c0a; }
.ev-place-2 { background: linear-gradient(#c9d3dc, #6d7a86); }
.ev-place-3 { background: linear-gradient(#e0a86e, #8a5326); }
.ev-actions { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 7px 7px; }
.ev-upload .ev-actions { padding: 0; }
.ev-vote { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 6px 7px; background: #eaf7ff; border-top: 1px solid #a9cfe8; }
.ev-vote-input { width: 70px; min-height: 23px; padding: 1px 3px; font: 11px Tahoma, sans-serif; border: 1px solid #7f9db9; }
.ev-vote-have { font-weight: bold; }
.ev-vote-note { flex-basis: 100%; color: #8a3a04; }
.ev-empty { padding: 18px 8px; text-align: center; color: #4a6276; background: #fff; border: 1px solid #a9cfe8; }
@media (max-width: 480px) {
    .ev-sort { margin-left: 0; width: 100%; }
    .ev-sort select { max-width: none; flex: 1; }
    .ev-prize-ico { width: 44px; height: 44px; }
}
