.vg-legacy-exchange{position:fixed;inset:0;z-index:3900;display:grid;place-items:center;padding:max(12px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:#1c241f80;color:#5f6553}
.legacy-window{box-sizing:border-box;display:flex;flex-direction:column;width:min(100%,610px);max-height:100%;min-height:0;border:1px solid #d9c690;border-radius:20px;background:radial-gradient(120% 60% at 50% 0%,#f5f8ea,#fffaf0 45%,#f4e9cc);box-shadow:inset 0 0 0 3px #ffffff99,inset 0 0 0 4px #ecdfb9,0 12px 34px #281e0a59;overflow:hidden;font-family:Interface,sans-serif}
.legacy-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;padding:21px 22px 15px;border-bottom:1px solid #e6dcc1;flex:none}.legacy-heading small{color:#8d8060;font-size:12px;letter-spacing:.08em}.legacy-heading h2{margin:6px 0 0;color:#2f5a4d;font-size:23px;line-height:1.15}.legacy-heading button{flex:none;min-width:36px;min-height:36px;padding:0;border:1px solid #d9caa5;background:#fffaf0;color:#5d6b58;font-size:25px;border-radius:7px}
.legacy-scroll{overflow:auto;overscroll-behavior:contain;min-height:0;padding:0 22px 18px;scrollbar-width:none}.legacy-scroll>p{font-size:15px;line-height:1.5;margin:16px 0}.legacy-preserved{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 20px}.legacy-preserved span{font-size:12px;color:#526b49;background:#f4faef;border:1px solid #d9e6cf;border-radius:5px;padding:5px 8px}.legacy-preserved span:before{content:'✓';margin-right:5px;color:#6b8a51}
.legacy-gift{display:flex;gap:12px;align-items:center;padding:14px 12px;border:1px solid #dfcc98;border-radius:10px;background:radial-gradient(ellipse at 20% 50%,#fff7d9,#f7edcf);box-shadow:inset 0 0 0 3px #fffaf080}.legacy-gift>img{width:65px;height:76px;object-fit:contain;flex:none}.legacy-gift>div{min-width:0}.legacy-gift small{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:#8b774b}.legacy-gift strong{display:block;font-size:18px;color:#5b4a22;margin:4px 0}.legacy-gift p{font-size:13px;line-height:1.5;margin:7px 0 3px;color:#526b49}.legacy-gift span{font-size:12px;color:#81765e}
.legacy-list-heading{display:flex;align-items:center;justify-content:space-between;margin:23px 0 10px;gap:10px}.legacy-list-heading h3{font-size:15px;margin:0;font-weight:normal;color:#2f5a4d}.legacy-list-heading>span{min-width:26px;text-align:center;padding:3px;border:1px solid #d9caa5;border-radius:6px;font-size:13px;color:#8b774b}.legacy-replacements{list-style:none;padding:0;margin:0;display:grid;gap:12px}.legacy-replacements li{border:1px solid #d9caa5;background:#fffcf4;border-radius:9px;overflow:hidden}.legacy-pair{display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr);gap:6px;align-items:center;padding:10px}.legacy-item{display:flex;flex-direction:column;align-items:center;min-width:0;text-align:center}.legacy-item small{align-self:flex-start;font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:#8d8060}.legacy-item img{width:86px;height:86px;object-fit:contain;margin:6px 0 3px}.legacy-item strong{font-size:14px;line-height:1.25;overflow-wrap:anywhere;font-weight:normal;color:#6d6857;max-width:100%}.legacy-item:last-child strong{color:#2f5a4d}.legacy-item span{font-size:11px;color:#8d8060;margin-top:6px}.legacy-arrow{color:#b1995c;font-size:23px}.legacy-details{display:flex;flex-wrap:wrap;gap:6px 12px;border-top:1px solid #e6dcc1;padding:8px 10px;font-size:11px;color:#5f6553}.legacy-details span:first-child{color:#8b774b}.legacy-scroll .legacy-footnote{font-size:12px;color:#81765e;margin-bottom:0}
.legacy-footer{flex:none;padding:10px 22px 16px;border-top:1px solid #e6dcc1;background:#fbf6ea}.legacy-footer>div{display:flex;gap:10px}.legacy-footer button{min-height:44px;white-space:normal;font-family:inherit;font-size:14px;line-height:1.2;padding:10px 14px;border-radius:7px}.legacy-footer .primary{flex:1;background:linear-gradient(#e9f0db,#dce8ca);border:1px solid #b5ca99;color:#365b42;box-shadow:inset 0 1px #fff9}.legacy-footer .secondary{background:#f5efdc;border:1px solid #d7cba8;color:#766d53}.legacy-footer button:disabled{opacity:.55}.legacy-status{color:#965131;font-size:12px;line-height:1.3;margin:0}.legacy-status:not(:empty){margin-bottom:9px}.legacy-window button:focus-visible{outline:2px solid #497764;outline-offset:2px}
@media(max-width:380px){.legacy-heading{padding:16px 14px 12px}.legacy-heading h2{font-size:21px}.legacy-scroll{padding:0 14px 14px}.legacy-footer{padding:10px 14px 14px}.legacy-gift{gap:6px;padding:10px 8px}.legacy-gift>img{width:48px;height:65px}.legacy-gift strong{font-size:16px}.legacy-gift p{font-size:12px}.legacy-item img{width:68px;height:68px}.legacy-item strong{font-size:13px}.legacy-pair{padding:9px 7px;gap:3px}.legacy-footer button{font-size:13px;padding:10px}}

.legacy-scroll::-webkit-scrollbar{display:none}
#header-legacy-gear{overflow:hidden}#header-legacy-gear>img{display:block;width:24px;height:24px;max-width:100%;object-fit:contain;pointer-events:none}

/* 11.11.2026 (owner): «окно красивее, аккуратнее» — the game window style: double parchment frame with a diamond on top, centred title,
   ornamented dividers, compact «было → станет» rows, buttons as in the other windows. Layout logic is untouched. */
.vg-legacy-exchange{background:radial-gradient(ellipse at 50% 40%,#1c241f66,#141a16b3)}
.legacy-window{position:relative;overflow:visible;border:1px solid #d6c18a;border-radius:22px;background:linear-gradient(180deg,#fffcf3,#f7efda);box-shadow:0 14px 38px #241a0866}
.legacy-window::before{content:"";position:absolute;inset:7px;border:1px solid #e3d3a6;border-radius:16px;box-shadow:inset 0 0 0 3px #fffdf6;pointer-events:none;z-index:0}
.legacy-window::after{content:"";position:absolute;top:-8px;left:50%;width:14px;height:14px;transform:translateX(-50%) rotate(45deg);background:linear-gradient(135deg,#e7d39b,#c4a45c);border:1px solid #b8964c;box-shadow:0 0 0 3px #fffcf3;z-index:2}
.legacy-window>*{position:relative;z-index:1}
.legacy-heading{display:block;position:relative;text-align:center;padding:22px 52px 12px;border-bottom:0}
.legacy-heading small{display:block;color:#a08a55;font:600 11px/1.3 Interface,sans-serif;letter-spacing:.16em;text-transform:uppercase}
.legacy-heading h2{margin:5px 0 0;color:#2f5a4d;font:700 21px/1.2 Interface,sans-serif}
.legacy-heading button{position:absolute;top:16px;right:16px;width:34px;height:34px;min-width:0;min-height:0;border:1px solid #d9c690;border-radius:10px;background:linear-gradient(180deg,#fffaf0,#f1e6c9);color:#6b5d3c;font-size:20px;line-height:1}
.legacy-scroll{padding:0 22px 14px}
.legacy-scroll>p{margin:4px 0 10px;text-align:center;font-size:13.5px;line-height:1.5;color:#5f6553}
.legacy-rule{display:flex;align-items:center;gap:10px;margin:14px 0 10px;color:#a08a55;font:700 11px/1.2 Interface,sans-serif;letter-spacing:.14em;text-transform:uppercase}
.legacy-rule::before,.legacy-rule::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,#d4bf86)}
.legacy-rule::after{background:linear-gradient(90deg,#d4bf86,transparent)}
.legacy-rule>span{display:inline-flex;align-items:center;gap:7px}
.legacy-rule>span::before,.legacy-rule>span::after{content:"";width:5px;height:5px;transform:rotate(45deg);background:#c9ad66}
.legacy-rule h3{margin:0;font:inherit;color:inherit}
.legacy-rule b{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#efe4c4;color:#6f5e32;font:700 11px/1 Interface,sans-serif;letter-spacing:0}
.legacy-preserved{justify-content:center;gap:6px;margin:0 0 4px}
.legacy-preserved span{display:inline-flex;align-items:center;gap:5px;padding:4px 10px 4px 8px;border:1px solid #cfdcbf;border-radius:999px;background:#f3f8ec;color:#456b4f;font:600 11.5px/1.2 Interface,sans-serif}
.legacy-preserved span::before{content:"✓";display:inline-grid;place-items:center;width:14px;height:14px;border-radius:50%;background:#3f7a66;color:#fff;font-size:9px;line-height:1}
.legacy-gift{margin-top:14px;padding:12px 14px;border:1px solid #d9c27f;border-radius:14px;background:radial-gradient(ellipse at 18% 50%,#fff6d2,#f6ead0 70%);box-shadow:inset 0 0 0 3px #fffaf0aa}
.legacy-gift>img{width:56px;height:64px}
.legacy-gift small{color:#a08a55;letter-spacing:.12em}
.legacy-gift strong{display:block;margin:2px 0;color:#3b4f3a;font:700 16px/1.2 Interface,sans-serif}
.legacy-gift p{margin:0 0 2px;font-size:12.5px;color:#4d6a43}
.legacy-gift span{font-size:11.5px;color:#8d8060}
.legacy-list-heading{margin-top:16px}
.legacy-replacements{display:grid;gap:8px}
.legacy-replacements>li{padding:8px 10px;border:1px solid #e6d9b6;border-radius:12px;background:#fffdf7;box-shadow:0 1px 2px #50421810}
.legacy-pair{display:grid;grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr);align-items:center;gap:6px}
.legacy-item{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:8px;align-items:center;text-align:left;min-width:0}
.legacy-item small{grid-column:1 / -1;margin:0 0 3px;color:#a99a72;font:700 9.5px/1 Interface,sans-serif;letter-spacing:.14em;text-transform:uppercase}
.legacy-item img{grid-row:2 / span 2;width:44px!important;height:44px!important;object-fit:contain;border-radius:9px;background:radial-gradient(circle at 50% 40%,#fbf3de,#efe4c6);border:1px solid #e3d4ac}
.legacy-item strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#3b4f3a;font:600 12.5px/1.2 Interface,sans-serif}
.legacy-item span{color:#8d8060;font-size:11px}
.legacy-arrow{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#efe4c4;color:#8a6f2c;font-size:13px;line-height:1}
.legacy-details{display:flex;flex-wrap:wrap;gap:4px 8px;margin-top:7px;padding-top:6px;border-top:1px dashed #e6d9b6;font-size:11px;color:#8d8060}
.legacy-details span+span::before{content:"·";margin-right:8px;color:#c9b27c}
.legacy-footnote{margin:12px 0 0;text-align:center;font-size:11.5px;line-height:1.45;color:#8d8060}
.legacy-footer{margin:0 7px 7px;padding:10px 15px 12px;border-top:1px solid #e6dcc1;border-radius:0 0 16px 16px;background:linear-gradient(180deg,#fbf6ea,#f5ecd4)}
.legacy-footer>div{gap:8px}
.legacy-footer button{min-height:46px;border-radius:13px;font:700 14px/1.2 Interface,sans-serif}
.legacy-footer .secondary{flex:0 0 36%;background:linear-gradient(180deg,#fffaf0,#efe4c8);border:1px solid #d9c690;color:#6b5d3c;box-shadow:inset 0 1px 0 #fffdf6}
.legacy-footer .primary{flex:1;background:linear-gradient(180deg,#4a8a74,#2f6252);border:1px solid #2a5a4a;color:#fff;box-shadow:inset 0 1px 0 #ffffff33,0 2px 6px #2f5a4d40}
.legacy-footer .primary:disabled{background:linear-gradient(180deg,#efe6cf,#e3d7b7);border-color:#d6c69a;color:#9a9277;box-shadow:none}
.legacy-status:empty{display:none}
@media(max-width:380px){.legacy-heading{padding:20px 46px 10px}.legacy-heading h2{font-size:19px}.legacy-scroll{padding:0 16px 12px}.legacy-item{grid-template-columns:38px minmax(0,1fr)}.legacy-item img{width:38px!important;height:38px!important}.legacy-footer .secondary{flex-basis:32%}}
.legacy-heading small{padding:0 6px;font-size:10px;letter-spacing:.12em}
.legacy-list-heading>span{border:0!important;padding:0!important;background:none!important;min-width:0!important;border-radius:0!important}
.legacy-item strong{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.2}
.legacy-replacements>li{padding:8px 9px}
.legacy-details{margin-top:6px;padding-top:5px}
.legacy-pair.is-single{grid-template-columns:minmax(0,1fr)}
.legacy-pair.is-single .legacy-item small{color:#b0715a}
.legacy-pair.is-single .legacy-item img{filter:grayscale(.35) saturate(.8);opacity:.9}
/* 11.11.2026: the second line of a stat explanation — where it comes from, quieter */
.hero-stat-explanation .hero-stat-source{margin-top:6px;font-size:12px;color:#8d8060}
