/* dodzu-world.css — хижина + персонаж на главной (новая игра, в т.ч. мобильная) */

.dodzu-world {
    position: relative;
    z-index: 120;
    max-width: 1000px;
    width: 100%;
    margin: 50px auto 0;
    padding: 0 50px;
    box-sizing: border-box;
    min-height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    overflow: visible;
}

.dodzu-world__stage {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    overflow: visible;
}

.dodzu-world__hut-wrap {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    flex-shrink: 0;
}

.dodzu-world__hut-hit {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    border-radius: 12px;
    transition: transform 0.15s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

/* Крестик: отключить игру (над хижиной справа) */
.dodzu-world__game-off {
    position: absolute;
    top: 10px;
    right: 18px;
    z-index: 8;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(40, 48, 44, 0.42);
    color: rgba(255, 255, 255, 0.92);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease, visibility 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

/* Десктоп: крестик только при наведении на хижину */
@media (hover: hover) and (pointer: fine) {
    .dodzu-world__hut-wrap:hover .dodzu-world__game-off,
    .dodzu-world__game-off:focus-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* Тач: без hover крестик всегда доступен, пока игра включена */
@media (hover: none), (pointer: coarse) {
    .dodzu-world__game-off {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

.dodzu-world__game-off:hover,
.dodzu-world__game-off:focus-visible {
    background: rgba(40, 48, 44, 0.72);
    outline: none;
    transform: scale(1.06);
}

/* Игра отключена: только бледный силуэт хижины ×0.5 */
body.dodzu-game-off .dodzu-world {
    min-height: 80px;
    margin-top: 28px;
}

body.dodzu-game-off .dodzu-world__hut {
    width: 80px;
    height: 70px;
    opacity: 0.28;
    filter: grayscale(1);
}

body.dodzu-game-off .dodzu-world__hut-hit:hover,
body.dodzu-game-off .dodzu-world__hut-hit:focus-visible {
    transform: none;
}

body.dodzu-game-off .dodzu-world__game-off,
body.dodzu-game-off .dodzu-world__base,
body.dodzu-game-off .dw-forge,
body.dodzu-game-off .dodzu-world-char,
body.dodzu-game-off .dw-zone,
body.dodzu-game-off .dw-hud,
body.dodzu-game-off .dw-upper,
body.dodzu-game-off .site-footer__game-dev,
body.dodzu-game-off .site-footer__game-btn {
    display: none !important;
}

body.dodzu-game-off .dw-gothic,
body.dodzu-game-off .dw-level2 {
    display: none !important;
}

.dodzu-world__hut-hit:hover,
.dodzu-world__hut-hit:focus-visible {
    transform: translateY(-2px);
    outline: none;
}

.dodzu-world__hut {
    display: block;
    width: 160px;
    height: 140px;
    pointer-events: none;
}

/* Компактная база справа: лужайка + галочка закрепить */
.dodzu-world__base {
    position: absolute;
    left: calc(100% + 4px);
    bottom: 8px;
    width: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
    z-index: 60;
}

.dodzu-world__meadow {
    position: relative;
    left: auto;
    bottom: auto;
    width: 54px;
    height: 22px;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(180, 230, 120, 0.35) 0 18%, transparent 19%),
        radial-gradient(ellipse at 70% 55%, rgba(160, 220, 100, 0.3) 0 14%, transparent 15%),
        radial-gradient(ellipse at 50% 50%, rgba(110, 180, 70, 0.38) 0%, rgba(70, 130, 45, 0.22) 55%, rgba(60, 110, 40, 0.08) 100%);
    box-shadow: 0 2px 6px rgba(60, 100, 40, 0.12);
    pointer-events: auto;
    opacity: 0.85;
    cursor: help;
}

.dodzu-world__meadow::before,
.dodzu-world__meadow::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 10px;
    border-radius: 0 70% 0 70%;
    background: rgba(90, 150, 50, 0.4);
    transform: rotate(-35deg);
    pointer-events: none;
}

.dodzu-world__meadow::before {
    left: 22%;
    top: 18%;
}

.dodzu-world__meadow::after {
    right: 20%;
    top: 28%;
    transform: rotate(28deg) scaleX(-1);
    background: rgba(100, 160, 55, 0.32);
}

.dodzu-world__pin {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.dodzu-world__pin-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.dodzu-world__pin-box {
    position: relative;
    display: block;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 1.5px solid rgba(40, 65, 80, 0.45);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: background 0.15s, border-color 0.15s;
}

.dodzu-world__pin:hover .dodzu-world__pin-box,
.dodzu-world__pin-input:focus-visible + .dodzu-world__pin-box {
    border-color: #1a6b6d;
}

.dodzu-world__pin-input:checked + .dodzu-world__pin-box {
    background: #1a6b6d;
    border-color: #1a6b6d;
}

.dodzu-world__pin-input:checked + .dodzu-world__pin-box::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 45%;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.dodzu-world__pin-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    z-index: 70;
    padding: 6px 10px;
    border-radius: 8px;
    background: #fffef8;
    color: #2a3a44;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    pointer-events: none;
}

.dodzu-world__pin-tip[hidden] {
    display: none;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Готовая картинка + один transform (translate3d). Без покачивания:
   вторая анимация на canvas держала процессор во время всего бега. */
.dodzu-world-char {
    position: absolute;
    left: 0;
    top: 0;
    width: 72px;
    height: 110px;
    z-index: 40;
    pointer-events: none;
    contain: layout paint;
    isolation: isolate;
}

.dodzu-world-char.is-moving {
    will-change: transform;
}

/* Закреплён: стоит на полянке и смещается вместе с ней */
.dodzu-world__meadow > .dodzu-world-char.is-anchored {
    position: absolute;
    left: 50%;
    top: auto;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 2;
}

.dodzu-world__meadow:has(> .dodzu-world-char.is-anchored) {
    opacity: 1;
}

.dodzu-world-char canvas {
    display: block;
    width: 72px;
    height: 110px;
    transform-origin: 50% 100%;
}

.dodzu-world-char.is-left canvas {
    scale: -1 1;
}

.dodzu-world-char .dodzu-world-char__tool {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    transform-origin: 67% 80%;
}

/* Качается только топор: CSS-поворот готовой картинки, персонаж не перерисовывается. */
.dodzu-world-char.is-chopping .dodzu-world-char__tool {
    animation: dw-chop 1.7s ease-in-out infinite;
}

@keyframes dw-chop {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(10deg); }
}

.dodzu-world-char__lv {
    position: absolute;
    left: 0;
    right: 0;
    top: 38px;
    text-align: center;
    font: bold 10px Arial, sans-serif;
    color: #ECEFF1;
    text-shadow: 0 0 2px #000, 0 1px 2px #000;
    pointer-events: none;
}

/* ==========================================================
   Безопасная зона под хижиной (только десктоп)
   0–600px: фон сайта плавно переходит в светлую полянку
   600–1200px: тёмно-зелёная «база»
   Декор — статичный SVG, без анимаций
   ========================================================== */

.dw-zone {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 1200px;
    /* последний блок main: компенсируем нижний padding .main (40px), чтобы зона упиралась в подвал */
    margin-bottom: -40px;
    overflow-x: clip;
    overflow-y: visible;
    contain: layout;
    background: linear-gradient(to bottom,
        rgba(168, 214, 150, 0) 0px,
        rgba(168, 214, 150, 0.14) 110px,
        rgba(140, 198, 112, 0.34) 280px,
        rgba(110, 176, 84, 0.62) 430px,
        rgba(84, 146, 60, 0.9) 540px,
        #4a8636 600px,
        #3a6f2b 700px,
        #2d5a1e 850px,
        #22481b 1000px,
        #1a3a1a 1200px);
}

.dw-zone__decor {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    pointer-events: none;
}

.dw-zone__nodes {
    position: absolute;
    inset: 0;
}

.dw-upper {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    z-index: 30;
}

.dw-upper[hidden] {
    display: none;
}

/* ---- Ольха / булыжник ---- */

.dw-node {
    position: absolute;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.dw-node__canvas {
    position: relative;
    display: block;
    pointer-events: none;
}

/* Сбоку от хранилища: чуть прозрачнее, чтобы фокус оставался на рабочем столе */
.dw-upper .dw-node__canvas {
    opacity: 0.8;
    transition: opacity 0.2s;
}

.dw-upper .dw-node:hover .dw-node__canvas,
.dw-upper .dw-node:focus-visible .dw-node__canvas,
.dw-upper .dw-node.is-gathering .dw-node__canvas {
    opacity: 0.95;
}

/* Лёгкая полянка с травинками под деревом/камнем сбоку от хранилища */
.dw-node__glade {
    position: absolute;
    left: 50%;
    bottom: -9px;
    pointer-events: none;
    opacity: 0.85;
}

.dw-node__glade svg {
    display: block;
}

.dw-node:hover .dw-node__canvas,
.dw-node:focus-visible .dw-node__canvas {
    filter: brightness(1.08);
}

.dw-node:focus-visible {
    outline: 2px solid rgba(252, 233, 74, 0.8);
    outline-offset: 2px;
    border-radius: 10px;
}

.dw-node.is-cooldown {
    cursor: default;
}

/* ---- Животные: куры и овцы ---- */

.dw-animal__shadow {
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 1px;
    height: 7px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(15, 35, 10, 0.38), rgba(15, 35, 10, 0));
    pointer-events: none;
}

.dw-node--animal .dw-node__canvas {
    position: relative;
    transform-origin: 50% 100%;
}

.dw-node--animal.is-left .dw-node__canvas {
    scale: -1 1;
}

/* Лёгкое покачивание только пока животное идёт */
.dw-node--animal.is-walking .dw-node__canvas {
    animation: dw-step 0.34s ease-in-out infinite alternate;
}

.dw-node--sheep.is-walking .dw-node__canvas {
    animation-duration: 0.5s;
}

@keyframes dw-step {
    from { transform: translateY(0) rotate(-2deg); }
    to { transform: translateY(-2px) rotate(2deg); }
}

/* Курица клюёт, овца щиплет траву — наклон вперёд и обратно */
.dw-node--animal.is-peck .dw-node__canvas {
    animation: dw-peck 0.45s ease-in-out 2;
}

.dw-node--sheep.is-peck .dw-node__canvas {
    animation: dw-graze 0.9s ease-in-out 1;
}

@keyframes dw-peck {
    0%, 100% { transform: rotate(0); }
    50% { transform: rotate(14deg) translateY(1px); }
}

@keyframes dw-graze {
    0%, 100% { transform: rotate(0); }
    50% { transform: rotate(6deg); }
}

.dw-node--animal .dw-node__bar {
    top: -12px;
}

.dw-node--animal .dw-node__ring {
    top: -22px;
}

.dw-node__bar {
    position: absolute;
    left: 50%;
    top: -10px;
    width: 58px;
    height: 6px;
    margin-left: -29px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.dw-node__bar i {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #8bc34a, #cddc39);
    transform: scaleX(0);
    transform-origin: left center;
}

.dw-node.is-gathering .dw-node__bar {
    opacity: 1;
}

/* Круг восстановления над деревом/камнем */
.dw-node__ring {
    position: absolute;
    left: 50%;
    top: -18px;
    width: 24px;
    height: 24px;
    margin-left: -12px;
    border-radius: 50%;
    background: rgba(10, 25, 10, 0.45);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.dw-node__ring[hidden] {
    display: none;
}

.dw-node__ring svg {
    display: block;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dw-node__ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 3;
}

.dw-node__ring-fill {
    fill: none;
    stroke: #7ddc4a;
    stroke-width: 3;
    stroke-linecap: round;
}

/* Цвет круга под палитру: деревья — зелёный, камни — серый, животные — белый */
.dw-node--rock .dw-node__ring-fill {
    stroke: #b8bcc0;
}

.dw-node--animal .dw-node__ring-fill {
    stroke: #f7f5ef;
}

/* Награда: строки столбиком, крупно и ярко, медленно поднимаются */
.dw-reward {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 3;
    display: grid;
    grid-template-columns: auto auto auto;
    row-gap: 5px;
    pointer-events: none;
    transform: translateX(-50%);
    animation: dw-reward-rise 3s cubic-bezier(0.22, 0.7, 0.3, 1) forwards;
}

/* Строки делят общие колонки: количество | иконка или «XP» | подпись */
.dw-reward__line {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    align-items: center;
    justify-items: start;
    column-gap: 6px;
    padding: 4px 12px 4px 10px;
    border-radius: 999px;
    background: rgba(12, 30, 12, 0.72);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 0 0 1.5px rgba(255, 255, 255, 0.2);
    font: 800 17px/1.2 system-ui, Arial, sans-serif;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
    animation: dw-reward-pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.dw-reward__line svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.dw-reward__line--wood { color: #ffcf4a; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 0 0 1.5px rgba(255, 207, 74, 0.55); }
.dw-reward__line--stone { color: #e3f2fd; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 0 0 1.5px rgba(179, 229, 252, 0.55); }
.dw-reward__line--feather { color: #fff3d6; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 0 0 1.5px rgba(255, 236, 190, 0.6); }
.dw-reward__line--wool { color: #ffffff; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.dw-reward__line--xp { color: #69f0ae; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 0 0 1.5px rgba(105, 240, 174, 0.55); }
.dw-reward__amt {
    font-weight: 800;
}

.dw-reward__mid {
    display: inline-flex;
    align-items: center;
    font-weight: 800;
}

.dw-reward__lbl {
    font-size: 13px;
    font-weight: 700;
    opacity: 0.92;
}

.dw-reward__line--level {
    color: #3a2a00;
    background: linear-gradient(180deg, #fff59d, #fbc02d);
    text-shadow: none;
    justify-items: center;
}

.dw-reward__line--level .dw-reward__lbl {
    grid-column: 1 / -1;
    font-size: 16px;
    font-weight: 800;
    opacity: 1;
}

@keyframes dw-reward-rise {
    0% { transform: translate(-50%, 10px); opacity: 0; }
    8% { opacity: 1; }
    72% { opacity: 1; }
    100% { transform: translate(-50%, -60px); opacity: 0; }
}

@keyframes dw-reward-pop {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Разлёт листочков / каменной крошки */
.dw-burst {
    position: absolute;
    left: 50%;
    top: 38%;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 2;
}

.dw-burst--rock {
    top: 55%;
}

.dw-burst i {
    position: absolute;
    left: -3px;
    top: -3px;
    width: 6px;
    height: 6px;
    border-radius: 0 70% 0 70%;
    animation: dw-burst 0.85s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

.dw-burst--rock i {
    border-radius: 35%;
    width: 5px;
    height: 5px;
}

@keyframes dw-burst {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.6); opacity: 0; }
}

.dw-float {
    position: absolute;
    left: 50%;
    bottom: 100%;
    z-index: 2;
    transform: translate(-50%, 0);
    font: 700 13px/1.2 system-ui, sans-serif;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 6px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    animation: dw-float 2.2s ease-out forwards;
}

.dw-float--wood { color: #ffe0a3; }
.dw-float--stone { color: #eceff1; }
.dw-float--xp { color: #b9f6ca; }
.dw-float--level { color: #fce94a; font-size: 15px; }
.dw-float--muted {
    color: #f1f8e9;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
}

@keyframes dw-float {
    0% { opacity: 0; transform: translate(-50%, 6px); }
    15% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -34px); }
}

/* ---- Нижняя панель игры (прозрачный фон) ---- */

.dw-hud {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    padding: 0 18px 12px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    color: #fff;
    font-family: system-ui, Arial, sans-serif;
}

.dw-hud.is-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0s;
}

.dw-hud__tools {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.dw-hud__tool {
    position: relative;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 10px;
    border: 1.5px dashed rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.1);
    pointer-events: auto;
    cursor: help;
    outline: none;
    color: inherit;
    font: inherit;
}

.dw-hud__tool.is-owned {
    border-style: solid;
    border-color: rgba(230, 197, 106, 0.9);
    background: rgba(24, 36, 20, 0.34);
    cursor: pointer;
}

.dw-hud__tool.is-owned svg {
    opacity: 1;
}

.dw-hud__tool.is-held {
    box-shadow: 0 0 0 2px #fce94a, 0 0 14px rgba(252, 233, 74, 0.7);
}

.dw-hud__tool svg {
    width: 28px;
    height: 28px;
    fill: rgba(0, 0, 0, 0.5);
    color: rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.35));
}

.dw-hud__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.dw-hud__player {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 2px 4px;
    border: none;
    background: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
    pointer-events: auto;
    border-radius: 10px;
}

.dw-hud__player:focus-visible,
.dw-hud__tool:focus-visible,
.dw-hud__res-item:focus-visible {
    outline: 2px solid rgba(252, 233, 74, 0.8);
    outline-offset: 2px;
}

.dw-hud__logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(20, 45, 20, 0.55);
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.35);
}

.dw-hud__logo svg {
    width: 22px;
    height: 22px;
}

.dw-hud__info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 0 6px rgba(0, 0, 0, 0.35);
}

.dw-hud__name-line {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.dw-hud__name {
    font-size: 14px;
    font-weight: 700;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dw-hud__level {
    font-size: 12px;
    font-weight: 700;
    color: #fce94a;
}

.dw-hud__xp {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dw-hud__xp-bar {
    width: 110px;
    height: 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.dw-hud__xp-bar i {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #66bb6a, #b9f6ca);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.4s ease;
}

.dw-hud__xp-text {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.dw-hud__res {
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
}

.dw-hud__res-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: help;
    outline: none;
    border-radius: 8px;
}

.dw-hud__res-item svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.dw-hud__res-count {
    font-size: 15px;
    font-weight: 700;
    min-width: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 0 6px rgba(0, 0, 0, 0.35);
}

.dw-hud__res-item.is-bump .dw-hud__res-count {
    animation: dw-bump 0.45s ease-out;
}

@keyframes dw-bump {
    0% { transform: scale(1); }
    40% { transform: scale(1.3); color: #fce94a; }
    100% { transform: scale(1); }
}

/* Подсказки HUD */
.dw-tip::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    padding: 6px 10px;
    border-radius: 8px;
    background: #fffef8;
    color: #2a3a44;
    font: 600 12px/1.35 system-ui, sans-serif;
    text-shadow: none;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 2;
}

.dw-tip:hover::after,
.dw-tip:focus-visible::after {
    opacity: 1;
    visibility: visible;
}

.dw-hud__player.dw-tip::after {
    left: 0;
    transform: none;
}

.dw-hud__res .dw-tip::after {
    left: auto;
    right: 0;
    transform: none;
}

@media (max-width: 880px) {
    .dw-zone,
    .dw-hud,
    .dw-upper {
        display: none !important;
    }

    .dodzu-world__game-off {
        top: 8px;
        right: 14px;
        width: 20px;
        height: 20px;
        font-size: 15px;
    }

    body.dodzu-game-off .dodzu-world {
        margin-top: 20px;
        min-height: 70px;
    }

    body.dodzu-game-off .dodzu-world__hut {
        width: 70px;
        height: 61px;
    }

    .dodzu-world {
        padding: 0 12px;
        margin-top: 40px;
        min-height: 130px;
    }

    .dodzu-world__hut {
        width: 132px;
        height: 116px;
    }

    .dodzu-world__base {
        left: calc(100% + 2px);
        bottom: 6px;
        width: 44px;
        gap: 5px;
    }

    .dodzu-world__meadow {
        width: 44px;
        height: 18px;
    }
}

@media (max-width: 490px) {
    .dodzu-world {
        padding: 0 8px;
        margin-top: 36px;
        min-height: 120px;
    }

    .dodzu-world__hut {
        width: 120px;
        height: 105px;
    }

    .dodzu-world__base {
        width: 40px;
        bottom: 4px;
        gap: 4px;
    }

    .dodzu-world__meadow {
        width: 40px;
        height: 16px;
    }

    .dodzu-world__pin,
    .dodzu-world__pin-box {
        width: 15px;
        height: 15px;
    }
}

/* Старые окна: поздравление, кузница, персонаж */

.dw-forge {
    position: absolute;
    right: calc(100% + 10px);
    bottom: 0;
    z-index: 40;
    width: 86px;
    margin: 0;
    padding: 4px 4px 6px;
    border: none;
    background: transparent;
    color: #f4e6c4;
    cursor: pointer;
    pointer-events: auto;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.35));
}

.dw-forge[hidden] { display: none !important; }

.dw-forge.is-locked {
    cursor: help;
}

.dw-forge.is-locked .dw-forge__art {
    filter: grayscale(0.7) brightness(0.78);
}

.dw-forge__art {
    display: block;
    width: 78px;
    height: 70px;
}

.dw-forge__name {
    display: block;
    margin-top: -2px;
    font-family: Palatino Linotype, Palatino, Georgia, serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #e7f0d4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 0 6px rgba(0, 0, 0, 0.35);
}

.dw-level2,
.dw-gothic {
    position: fixed;
    inset: 0;
    z-index: 130000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(36, 58, 32, 0.28);
    box-sizing: border-box;
}

.dw-level2__card,
.dw-gothic__frame {
    position: relative;
    width: min(460px, 100%);
    padding: 28px 26px 22px;
    border-radius: 10px;
    box-sizing: border-box;
    color: #2c3a24;
    text-align: center;
    font-family: Palatino Linotype, Palatino, Georgia, serif;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(186, 214, 140, 0.55), transparent 58%),
        linear-gradient(180deg, #fbf8ee 0%, #e7f0d8 100%);
    border: 1px solid #7d9a58;
    box-shadow:
        0 0 0 5px #f4efe2,
        0 0 0 6px #b7c98a,
        0 18px 40px rgba(40, 60, 30, 0.22);
}

.dw-level2__card::before,
.dw-gothic__frame::before,
.dw-level2__card::after,
.dw-gothic__frame::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #6f8f48;
    pointer-events: none;
}

.dw-level2__card::before,
.dw-gothic__frame::before { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.dw-level2__card::after,
.dw-gothic__frame::after { right: 6px; bottom: 6px; border-left: none; border-top: none; }

.dw-level2__seal {
    width: 54px;
    height: 54px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 2px solid #6f8f48;
    box-shadow: inset 0 0 0 3px #efe6c8, 0 0 12px rgba(111, 143, 72, 0.35);
    background: radial-gradient(circle at 40% 35%, #d7e7b4, #8eaf62 72%);
    color: #2f4a28;
    font-size: 22px;
    font-weight: 700;
    line-height: 50px;
    letter-spacing: 0.06em;
}

.dw-level2__title,
.dw-gothic__title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #c6a13a;
    text-shadow: none;
}

.dw-kicker {
    margin: 0 0 4px;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-align: center;
    color: #6d7568;
}

.dw-head-line {
    width: 88px;
    height: 3px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #d4b45a 20%, #8fb56a 50%, #d4b45a 80%, transparent);
}

.dw-gothic__sub {
    color: #5c6560;
    font-size: 14px;
}

.dw-level2__lead {
    margin: 0 0 12px;
    font-size: 18px;
}

.dw-level2__text,
.dw-level2__next,
.dw-gothic__sub {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.45;
    color: #3e4f34;
}

.dw-level2__bonus,
.dw-level2__forge {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #c4b06a;
    background: #f6e7a8;
    color: #3d4a22;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.dw-level2__block {
    margin: 0 0 12px;
    padding: 10px 12px 8px;
    border: 1px solid rgba(198, 161, 58, 0.55);
    border-radius: 10px;
    background: rgba(255, 252, 242, 0.78);
    text-align: left;
}

.dw-level2__block-title {
    margin: 0 0 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(198, 161, 58, 0.45);
    color: #8a6a22;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
}

.dw-level2__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dw-level2__row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.3;
    color: #3d4a22;
}

.dw-level2__row-label {
    min-width: 0;
}

.dw-level2__plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.4em;
    padding: 2px 8px;
    border-radius: 999px;
    background: #2f9e44;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.dw-level2__forge {
    color: #245034;
    background: #dcecc4;
}

.dw-level2__btn,
.dw-craft__go,
.dw-gothic__x {
    font-family: Palatino Linotype, Palatino, Georgia, serif;
}

.dw-level2__btn,
.dw-craft__go {
    margin-top: 4px;
    padding: 10px 22px;
    border: 1px solid #5f8144;
    border-radius: 10px;
    background: linear-gradient(180deg, #8fb56a, #5d8a45);
    color: #f7fbf2;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    text-shadow: none;
}

.dw-level2__btn:hover,
.dw-level2__btn:focus-visible,
.dw-craft__go:hover:not(:disabled),
.dw-craft__go:focus-visible {
    background: linear-gradient(180deg, #a4c87a, #6e9a52);
}

.dw-craft__go:disabled {
    opacity: 0.55;
    cursor: default;
}

.dw-gothic__frame > .dw-level2__btn {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.dw-gothic__x {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #6f8f48;
    background: #f4f7ea;
    color: #34562c;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.dw-gothic__frame {
    width: min(560px, 100%);
    text-align: left;
}

.dw-gothic__frame.dw-hut {
    width: min(640px, 100%);
}

.dw-hut-offer {
    margin: 18px 0 16px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid #c4b06a;
    background: #f6e7a8;
    color: #3d4a22;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.dw-gothic__title,
.dw-gothic__sub { text-align: center; }

.dw-forge-slots {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 18px;
    margin: 8px 0 16px;
}

.dw-forge-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.dw-forge-slot {
    position: relative;
    width: 118px;
    padding: 10px 8px 8px;
    border-radius: 10px;
    border: 1px solid #8eaa68;
    background: rgba(255, 252, 242, 0.72);
    color: #2c3a24;
    font-family: Palatino Linotype, Palatino, Georgia, serif;
    font-size: 14px;
    cursor: pointer;
}

.dw-forge-slot svg {
    width: 42px;
    height: 42px;
    display: block;
    margin: 0 auto 6px;
    fill: #5c6b48;
    color: #5c6b48;
}

.dw-forge-slot.is-shadow svg,
.dw-craft__item.is-shadow svg {
    fill: rgba(40, 48, 36, 0.38);
    color: rgba(40, 48, 36, 0.38);
}

.dw-forge-slot.is-art svg,
.dw-craft__item.is-art svg {
    fill: none;
}

.dw-forge-slot__name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    line-height: 1.2;
}

.dw-forge-slot__ok {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 999px;
    background: #2f9e44;
    color: #fff;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.dw-forge-slot.is-owned {
    border-color: #2f9e44;
    background: rgba(232, 255, 236, 0.92);
    box-shadow: inset 0 0 0 1px rgba(47, 158, 68, 0.28);
}

.dw-forge-slot.is-picked,
.dw-forge-slot:hover,
.dw-forge-slot:focus-visible {
    border-color: #fce94a;
    outline: none;
    box-shadow: 0 0 0 1px #fce94a;
}

.dw-forge-slot.is-owned.is-picked,
.dw-forge-slot.is-owned:hover,
.dw-forge-slot.is-owned:focus-visible {
    border-color: #2f9e44;
    box-shadow: 0 0 0 1px #2f9e44, inset 0 0 0 1px rgba(47, 158, 68, 0.28);
}

.dw-recipe-tip {
    position: absolute;
    z-index: 3;
    width: 268px;
    padding: 12px 12px 10px;
    border-radius: 10px;
    border: 1px solid #c6a13a;
    background: #fffdf6;
    color: #3a4038;
    font-size: 13px;
    line-height: 1.35;
    box-shadow: 0 10px 24px rgba(60, 48, 16, 0.22);
    pointer-events: none;
}

.dw-recipe-tip[hidden] { display: none !important; }

.dw-recipe-tip__name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #c6a13a;
    text-align: center;
}

.dw-recipe-tip__have {
    margin: 6px 0 0;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #2f9e44;
}

.dw-recipe-tip__for {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #6a6248;
}

.dw-recipe-tip .dw-head-line {
    width: 72px;
    margin: 6px auto 10px;
}

.dw-recipe-tip__block {
    margin-top: 8px;
    padding: 8px 10px 9px;
    border-radius: 8px;
    border: 1px solid rgba(198, 161, 58, 0.4);
    background: rgba(255, 248, 230, 0.72);
}

.dw-recipe-tip__k {
    margin: 0 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(198, 161, 58, 0.45);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #8a6a22;
}

.dw-recipe-tip p { margin: 0; color: #3a4038; }

.dw-recipe-tip__row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.dw-recipe-tip__row svg { width: 18px; height: 18px; flex: none; }

.dw-craft {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(230, 197, 106, 0.35);
    text-align: center;
}

.dw-craft[hidden] { display: none !important; }

.dw-craft__item svg {
    width: 64px;
    height: 64px;
    fill: #3f5a32;
    color: #3f5a32;
    filter: drop-shadow(0 0 10px rgba(252, 220, 120, 0.45));
}

.dw-craft__item b {
    display: block;
    margin: 4px 0 10px;
    font-size: 18px;
    color: #34562c;
}

.dw-craft__mats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.dw-craft__mat {
    width: 120px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #8eaa68;
    background: rgba(255, 252, 242, 0.8);
}

.dw-craft__mat svg { width: 28px; height: 28px; }

.dw-craft__mat b,
.dw-craft__mat span { display: block; font-size: 13px; }

.dw-craft__mat.is-ok {
    box-shadow: 0 0 12px rgba(140, 220, 90, 0.45);
    border-color: #b6e36a;
}

.dw-craft__mat.is-short { opacity: 0.55; }

.dw-craft__bar {
    height: 10px;
    margin: 0 auto 12px;
    max-width: 280px;
    background: #e4ecd4;
    border: 1px solid #8eaa68;
    overflow: hidden;
}

.dw-craft__bar i {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #3d6b32, #c6ef7a);
    transform: scaleX(0);
    transform-origin: left center;
}

.dw-craft__done {
    margin: 8px 0 0;
    font-size: 20px;
    font-weight: 700;
    color: #3d6b22;
    text-shadow: none;
}

.dw-craft__need {
    margin: 8px 0 0;
    font-size: 15px;
    font-weight: 700;
    color: #6a6248;
}

.dw-gothic__frame.dw-char {
    width: min(330px, calc(100vw - 28px));
    padding: 18px 18px 16px;
    text-align: left;
}

.dw-gothic__frame.dw-char .dw-gothic__title {
    text-align: center;
}

.dw-char__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
}

.dw-char__portrait {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #7d9a58;
    background: #f4f7ea;
}

.dw-char__portrait svg { width: 32px; height: 32px; }

.dw-char__who { min-width: 0; flex: 1; }

.dw-char__name {
    display: block;
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
    color: #2f4a28;
}

.dw-char__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.25;
    color: #4a5c3e;
}

.dw-char__bars {
    display: grid;
    gap: 6px;
    margin: 0 0 12px;
}

.dw-char__bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid rgba(60, 48, 16, 0.35);
    overflow: hidden;
    font-size: 12px;
    line-height: 1;
    color: #fff8e8;
}

.dw-char__bar i {
    position: absolute;
    inset: 0;
    transform-origin: left center;
    pointer-events: none;
}

.dw-char__bar span,
.dw-char__bar b {
    position: relative;
    z-index: 1;
    font-weight: 700;
}

.dw-char__bar--hp { border-color: #6a3030; background: #2a1010; }
.dw-char__bar--hp i { background: linear-gradient(90deg, #8d1d1d, #d45454); }

.dw-char__bar--xp { border-color: #3a4a68; background: #141c2c; }
.dw-char__bar--xp i { background: linear-gradient(90deg, #3d5cae, #7ea0ef); }

.dw-char__sect {
    margin: 0 0 10px;
    padding-top: 2px;
}

.dw-char__sect:last-child { margin-bottom: 0; }

.dw-char__sect-title {
    margin: 0 0 4px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(198, 161, 58, 0.55);
    color: #8a6a22;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.dw-char__sect.is-gather .dw-char__sect-title {
    font-size: 14px;
}

.dw-char__stats {
    display: flex;
    flex-direction: column;
}

.dw-char__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 4.6em;
    align-items: baseline;
    column-gap: 10px;
    min-height: 26px;
    padding: 4px 12px 4px 0;
    border-bottom: 1px solid rgba(230, 197, 106, 0.18);
    font-size: 14px;
    line-height: 1.2;
    color: #3a4038;
}

.dw-char__row:last-child { border-bottom: none; }

.dw-char__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dw-char__val {
    display: grid;
    grid-template-columns: 2.2em 1.2em;
    align-items: baseline;
    justify-self: stretch;
    font-variant-numeric: tabular-nums;
}

.dw-char__num {
    margin: 0;
    text-align: left;
    font-weight: 700;
    color: #2f4a28;
}

.dw-char__unit {
    margin: 0;
    padding-left: 3px;
    font-style: normal;
    font-weight: 700;
    color: #2f4a28;
}

@media (max-width: 640px) {
    .dw-forge-slots { flex-wrap: wrap; }
}
