/* Redesign 2026-10 («меню A»): one interface kit for the whole game — dark carved walnut, burnished gold rims,
   parchment insets, red gems like on the cards. Buttons are «plaques» (.plq), windows are «panels» (.pnl). */
:root {
  --k-wood: #22150c; --k-wood-2: #3a2414; --k-wood-hi: #5a3a20;
  --k-gold: #e8b85a; --k-gold-hi: #fff1b8; --k-gold-lo: #8a5a1c;
  --k-red: #a3221c; --k-red-hi: #ff7a5a; --k-cream: #f3e6c4; --k-ink: #2a170c;
  --k-rim: inset 0 0 0 1.5px var(--k-gold), inset 0 0 0 4px #160c06, inset 0 0 0 5px rgba(232, 184, 90, .45);
  --k-font: 'Fira Sans Extra Condensed', sans-serif;
}

/* ---------- plaques (buttons) ---------- */
.plq { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; cursor: pointer; border: none; border-radius: 7px;
  height: clamp(46px, 7vh, 66px); padding: 0 52px; font: 800 clamp(19px, 2.6vh, 26px) var(--k-font); letter-spacing: 2px; text-transform: uppercase; color: var(--k-cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .55);
  background: linear-gradient(rgba(255, 220, 160, .1), rgba(0, 0, 0, .35)), url('../assets/tex/walnut.webp') center / 420px, var(--k-wood-2);
  box-shadow: var(--k-rim), 0 6px 16px rgba(0, 0, 0, .55); transition: transform .15s, filter .2s, box-shadow .2s; }
.plq::before, .plq::after { content: ''; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; transform: rotate(45deg); background: linear-gradient(135deg, var(--k-gold-hi), var(--k-gold-lo)); box-shadow: 0 0 0 1.5px #160c06; }
.plq::before { left: 14px; } .plq::after { right: 14px; }
.plq .gem { display: none; }
.plq:hover { transform: translateX(6px); filter: brightness(1.15); box-shadow: var(--k-rim), 0 0 0 1px rgba(255, 220, 140, .35), 0 0 22px rgba(232, 184, 90, .35), 0 8px 18px rgba(0, 0, 0, .6); }
.plq:active { transform: translateX(6px) translateY(1px); filter: brightness(.95); }
.plq.gold { height: clamp(54px, 8.6vh, 82px); font-size: clamp(24px, 3.4vh, 34px); color: #3a1206; text-shadow: 0 1px 0 rgba(255, 240, 200, .6);
  background: linear-gradient(#fff0b0, #f0c25e 45%, #c98a2a 55%, #e9b24e); box-shadow: inset 0 0 0 1.5px #fff6d0, inset 0 0 0 4px #9a611c, inset 0 0 0 5px #ffe39a, 0 0 26px rgba(240, 190, 90, .45), 0 8px 20px rgba(0, 0, 0, .6);
  animation: plq-glow 2.6s ease-in-out infinite; }
.plq.gold::before, .plq.gold::after { background: radial-gradient(circle at 35% 30%, var(--k-red-hi), var(--k-red) 60%, #4a0a08); width: 13px; height: 13px; margin-top: -6.5px; border-radius: 50%; transform: none; box-shadow: 0 0 0 2px #7a4a14, 0 0 8px rgba(255, 90, 60, .6); }
@keyframes plq-glow { 50% { box-shadow: inset 0 0 0 1.5px #fff6d0, inset 0 0 0 4px #9a611c, inset 0 0 0 5px #ffe39a, 0 0 40px rgba(255, 205, 110, .7), 0 8px 20px rgba(0, 0, 0, .6); } }

/* ---------- panels (boxes on the menu and windows) ---------- */
.pnl, .mv .menu-daily, .mv-side { border-radius: 9px; color: var(--k-cream); font-family: var(--k-font);
  background: linear-gradient(rgba(40, 24, 12, .92), rgba(20, 12, 6, .95)); box-shadow: var(--k-rim), 0 10px 24px rgba(0, 0, 0, .6); }

/* ---------- menu ---------- */
#app:has(#menu.active) .scene-slices, #app:has(#menu.active) .scene-velvet { opacity: 0; }
#menu.mv.active { display: block; text-align: left; overflow: hidden; }
.mv-art { position: absolute; inset: 0; background: #120a05 url('../assets/ui/menu_art.webp') right center / cover no-repeat; animation: mv-art 18s ease-in-out infinite alternate; }
.mv-art::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14, 7, 4, .94) 0%, rgba(14, 7, 4, .72) 26%, rgba(14, 7, 4, .1) 52%, transparent 70%),
              linear-gradient(0deg, rgba(14, 7, 4, .85) 0%, transparent 30%), linear-gradient(180deg, rgba(14, 7, 4, .7) 0%, transparent 16%); }
@keyframes mv-art { from { transform: scale(1.02); } to { transform: scale(1.07) translateX(-1%); } }

.mv-top { position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: 64px; padding: 0 2.4vw; padding-top: env(safe-area-inset-top); display: flex; align-items: center; gap: 14px;
  background: linear-gradient(rgba(30, 18, 9, .96), rgba(18, 10, 5, .9)); box-shadow: 0 1px 0 rgba(232, 184, 90, .55), 0 2px 0 #0c0603, 0 8px 20px rgba(0, 0, 0, .5); }
.mv-me { display: flex; align-items: center; gap: 10px; background: none; border: none; cursor: pointer; padding: 0; text-align: left; color: var(--k-cream); font-family: var(--k-font); }
.mv-ava { width: 46px; height: 46px; border-radius: 50%; background: #2a1c12 center 30% / auto 170% no-repeat; box-shadow: 0 0 0 2px #160c06, 0 0 0 4px var(--k-gold), 0 0 12px rgba(232, 184, 90, .4); }
.mv-me b { display: block; font-size: 21px; font-weight: 800; line-height: 1; }
.mv-me small { font-size: 14px; color: #cdb27a; }
.mv-me:hover b { color: var(--k-gold-hi); }
.mv-chip { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 20px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(232, 184, 90, .45); font: 800 18px var(--k-font); color: var(--k-gold-hi); }
.mv-chip img { width: 22px; height: 22px; filter: drop-shadow(0 1px 0 #000); }
.mv-icons { margin-left: auto; display: flex; gap: 10px; }
.mv-icons button { width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 30%, #fff0b0, #e3ad4c 55%, #8a5a1c); box-shadow: 0 0 0 2px #160c06, 0 4px 10px rgba(0, 0, 0, .5); transition: transform .15s, filter .2s; }
.mv-icons button img { width: 24px; height: 24px; filter: brightness(0) saturate(100%) invert(9%) sepia(30%) saturate(1500%) hue-rotate(345deg); }
.mv-icons button:hover { transform: scale(1.08); filter: brightness(1.1); }

.mv-left { position: absolute; z-index: 2; left: 4vw; top: calc(64px + 3vh); width: min(390px, 32vw); display: flex; flex-direction: column; align-items: stretch; }
.mv-logo { width: 100%; height: auto; max-height: 30vh; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .8)); animation: mv-logo .9s cubic-bezier(.2, .8, .3, 1.2) both; }
@keyframes mv-logo { from { transform: scale(.8); opacity: 0; } }
.mv-sub2 { margin: 1.4vh 0 2.6vh; text-align: center; font: 600 clamp(14px, 1.9vh, 19px) 'Cormorant SC', serif; letter-spacing: 3px; color: #d9b469; text-shadow: 0 2px 4px #000; }
.mv-btns { display: flex; flex-direction: column; gap: clamp(9px, 1.6vh, 16px); }
.mv-btns .plq { animation: mv-in .5s cubic-bezier(.2, .8, .3, 1) both; }
.mv-btns .plq:nth-child(2) { animation-delay: .06s; } .mv-btns .plq:nth-child(3) { animation-delay: .12s; } .mv-btns .plq:nth-child(4) { animation-delay: .18s; }
@keyframes mv-in { from { transform: translateX(-40px); opacity: 0; } }
.mv .mv-more { position: static; margin-top: 2vh; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.mv .mv-more button { font-size: 17px; }
.mv .join-banner { position: fixed; z-index: 30; top: calc(64px + 1.4vh); left: 50%; transform: translateX(-50%); margin: 0; width: max-content; max-width: 92vw; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); } /* above everything, so it never pushes the buttons onto the daily task */
.mv .menu-daily .dl-st { display: inline-block; margin-top: 4px; padding: 1px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(0, 0, 0, .35); color: #e7d6ae; }
.mv .menu-daily.done .dl-st { background: #2f7a45; color: #fff; }

.mv-bottom { position: absolute; z-index: 2; left: 4vw; right: 2.4vw; bottom: calc(4.2vh + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; pointer-events: none; }
.mv-bottom > * { pointer-events: auto; }
.mv .menu-daily { width: min(390px, 32vw); max-width: none; margin: 0; padding: 12px 16px; font-size: 16px; }
.mv .menu-daily b { font-size: 13px; }
.mv .menu-daily.done { box-shadow: var(--k-rim), inset 0 0 0 7px rgba(143, 224, 160, .25), 0 10px 24px rgba(0, 0, 0, .6); }
.mv-side { min-width: 250px; max-width: 320px; padding: 12px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font-size: 16px; transition: filter .2s; }
.mv-side:hover { filter: brightness(1.12); }
.mv-side b { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #f6d77a; }
.mv-side em { font-style: normal; font-weight: 800; font-size: 22px; color: var(--k-gold-hi); }
.mv-side .btn { margin-top: 4px; }
#menu.mv .credits { position: absolute; z-index: 2; left: 0; right: 0; bottom: calc(.6vh + env(safe-area-inset-bottom)); margin: 0; max-width: none; text-align: center; font-size: 12px; color: #9a8670; }
#menu.mv .credits .buy-real { position: static; margin-left: 14px; }

/* Settings: a window over the menu */
#menu.mv .menu-opts { position: fixed; z-index: 300; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(600px, 94vw); max-height: 88vh; overflow: auto; margin: 0; padding: 16px 20px 18px;
  border: none; border-radius: 12px; background: linear-gradient(rgba(40, 24, 12, .98), rgba(20, 12, 6, .99)); box-shadow: var(--k-rim), 0 0 0 100vmax rgba(6, 3, 1, .6), 0 30px 70px rgba(0, 0, 0, .8); }
#menu.mv .menu-opts.hidden { display: none; }
.mo-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mo-head b { font: 800 24px var(--k-font); color: var(--k-gold-hi); text-transform: uppercase; letter-spacing: 1.5px; }
.mo-close { width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer; font: 700 18px var(--k-font); color: var(--k-ink); background: radial-gradient(circle at 40% 30%, #fff0b0, #e3ad4c 55%, #8a5a1c); }

/* Phones held upright: art on top, logo over it, plaques at the bottom. */
@media (max-width: 760px) {
  .mv-art { background: #120a05 url('../assets/ui/menu_art_m.webp') 68% calc(56px + 11vh + env(safe-area-inset-top)) / auto 50vh no-repeat; animation: none; }
  .mv-art::after { background: linear-gradient(0deg, rgba(14, 7, 4, .97) 0%, rgba(14, 7, 4, .9) 38%, rgba(14, 7, 4, .2) 62%, rgba(14, 7, 4, .55) 100%); }
  .mv-top { height: 56px; padding: 0 12px; padding-top: env(safe-area-inset-top); gap: 8px; }
  .mv-ava { width: 38px; height: 38px; } .mv-me b { font-size: 18px; } .mv-me small { display: none; }
  .mv-chip { font-size: 16px; padding: 3px 9px 3px 6px; } .mv-chip + .mv-chip { display: none; }
  .mv-icons { gap: 6px; } .mv-icons button { width: 38px; height: 38px; } .mv-icons button img { width: 20px; height: 20px; }
  .mv-left { left: 16px; right: 16px; width: auto; top: calc(56px + 1.5vh + env(safe-area-inset-top)); bottom: calc(92px + env(safe-area-inset-bottom)); justify-content: flex-end; }
  .mv-logo { margin-bottom: auto !important; }
  .mv-logo { width: 60vw; max-height: 17vh; margin: 0 auto; }
  .mv-sub2 { display: none; }
  .mv-btns { gap: 9px; } .plq { height: clamp(42px, 6.4vh, 56px); } .plq.gold { height: clamp(50px, 7.6vh, 66px); }
  .plq:hover, .plq:active { transform: none; }
  .mv .mv-more { margin-top: 1.2vh; gap: 2px 14px; } .mv .mv-more button { font-size: 15px; }
  .mv-bottom { left: 16px; right: 16px; bottom: calc(26px + env(safe-area-inset-bottom)); }
  .mv .menu-daily { width: 100%; padding: 8px 12px; font-size: 14px; }
  .mv-side { display: none; }
  #menu.mv .credits { font-size: 11px; } #menu.mv .credits > span, #menu.mv .credits .buy-real { display: none; }
}
@media (max-width: 760px) and (max-height: 700px) { .mv-logo { max-height: 16vh; } .mv .mv-more { margin-top: .8vh; } .mv .mv-more button { font-size: 13px; } }

/* ---------- the kit everywhere: buttons, windows, screen titles ---------- */
.btn:not(.hs-go) { font-family: var(--k-font); font-weight: 800; letter-spacing: .6px; color: var(--k-cream); border-radius: 7px;
  background: linear-gradient(rgba(255, 220, 160, .1), rgba(0, 0, 0, .35)), url('../assets/tex/walnut.webp') center / 360px, var(--k-wood-2);
  box-shadow: inset 0 0 0 1.5px var(--k-gold), inset 0 0 0 3.5px #160c06, 0 4px 12px rgba(0, 0, 0, .5); }
.btn:not(.hs-go):hover { filter: brightness(1.15); box-shadow: inset 0 0 0 1.5px var(--k-gold-hi), inset 0 0 0 3.5px #160c06, 0 0 16px rgba(232, 184, 90, .35), 0 6px 14px rgba(0, 0, 0, .55); }
.btn.primary:not(.hs-go) { color: #3a1206; text-shadow: 0 1px 0 rgba(255, 240, 200, .5); background: linear-gradient(#fff0b0, #f0c25e 45%, #c98a2a 55%, #e9b24e);
  box-shadow: inset 0 0 0 1.5px #fff6d0, inset 0 0 0 3.5px #9a611c, 0 0 14px rgba(240, 190, 90, .35), 0 4px 12px rgba(0, 0, 0, .5); }
.btn.danger:not(.hs-go) { color: #ffe0d4; background: linear-gradient(rgba(255, 255, 255, .1), rgba(0, 0, 0, .3)), var(--k-red); }
.modal, #game > .modal-back .modal, .fb-win { border: none; border-radius: 12px; color: var(--k-cream);
  background: linear-gradient(rgba(255, 220, 160, .04), rgba(0, 0, 0, .25)), url('../assets/tex/walnut.webp') center / 520px, #24160c;
  box-shadow: var(--k-rim), 0 30px 70px rgba(0, 0, 0, .8); }
.modal h3, #game > .modal-back .modal h3, .fb-win h3 { font-family: var(--k-font); font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: var(--k-gold-hi); text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
.picker-box h2, .rules-box h2, .builder-head h2, .stats-box h2 { font-family: var(--k-font) !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: 2px; color: var(--k-gold-hi) !important; text-shadow: 0 3px 0 rgba(0, 0, 0, .6); }

/* Splash: the same gold logo as the menu */
.fan-logo-img { margin: 2vh 0 0; line-height: 0; }
.fan-logo-img img { width: min(480px, 76vw); max-height: 24vh; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .8)); animation: mv-logo .9s cubic-bezier(.2, .8, .3, 1.2) both; }

/* Speaker button and the quick sound window */
.snd-btn { position: relative; }
.snd-btn.muted::after { content: ''; position: absolute; left: 18%; right: 18%; top: 50%; height: 3px; margin-top: -1.5px; transform: rotate(-45deg); background: #7a1010; border-radius: 2px; box-shadow: 0 0 0 1.5px #fff0b0; }
.snd-pop { position: fixed; z-index: 900; width: 270px; padding: 12px 14px; border-radius: 10px; color: var(--k-cream); font: 600 16px var(--k-font);
  background: linear-gradient(rgba(40, 24, 12, .98), rgba(20, 12, 6, .99)); box-shadow: var(--k-rim), 0 18px 40px rgba(0, 0, 0, .7); animation: fadein .15s; }
.snd-pop .snd-tg { display: flex; gap: 6px; margin-bottom: 8px; }
.snd-pop .snd-tg .btn { flex: 1; padding: 6px 4px; font-size: 14px; }
.snd-pop label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; }
.snd-pop input[type=range] { width: 140px; accent-color: #e8b85a; }

/* scrollbars: a thin gold bar on dark wood instead of the system one (windows, card lists, panels) */
* { scrollbar-width: thin; scrollbar-color: #c9973f rgba(20, 12, 6, .55); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(20, 12, 6, .55); border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(232, 184, 90, .18); }
::-webkit-scrollbar-thumb { border-radius: 10px; border: 2px solid rgba(20, 12, 6, .9); background: linear-gradient(90deg, #fff0b0, #e3ae4c 45%, #a8701f); }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #fff6d0, #f0c25e 45%, #c98a2a); }
::-webkit-scrollbar-corner { background: transparent; }

/* opening clip (js/ui/intro.js): full screen over the menu, fades out into it */
#intro { position: fixed; inset: 0; z-index: 900; background: #000; display: grid; place-items: center; cursor: pointer; transition: opacity .9s ease; }
#intro video { width: 100%; height: 100%; object-fit: cover; }
#intro.out { opacity: 0; pointer-events: none; }
.intro-skip { position: absolute; right: 18px; bottom: calc(16px + env(safe-area-inset-bottom)); padding: 8px 16px; border: none; border-radius: 7px; cursor: pointer;
  font: 800 15px var(--k-font); letter-spacing: 1px; text-transform: uppercase; color: var(--k-cream); background: rgba(20, 12, 6, .7); box-shadow: inset 0 0 0 1.5px rgba(232, 184, 90, .7); }

/* ---------- studio title screen (body.studio): the hall is dark, the spotlights come on one by one, then the logo ---------- */
.st-hall, .st-spots { display: none; }
body.studio #splash .st-hall { display: block; position: absolute; inset: 0; z-index: 0; background: #000 url('../assets/ui/intro/studio_hall.webp') center / cover no-repeat;
  animation: st-lights 3s .3s ease-out both; }
@keyframes st-lights { 0% { filter: brightness(.06) saturate(.6) } 25% { filter: brightness(.22) saturate(.7) } 45% { filter: brightness(.45) } 65% { filter: brightness(.7) } 100% { filter: brightness(1) } }
body.studio #splash .st-spots { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
body.studio .st-spots i { position: absolute; top: -4%; width: 13%; height: 62%; transform: translateX(-50%); opacity: 0; mix-blend-mode: screen;
  background: linear-gradient(rgba(255, 236, 190, .55), rgba(255, 220, 160, .12) 70%, transparent); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); filter: blur(4px); }
body.studio .st-spots i:nth-child(1) { left: 31%; animation: st-spot 1.2s .7s ease-out forwards; }
body.studio .st-spots i:nth-child(2) { left: 43.6%; animation: st-spot 1.2s 1.15s ease-out forwards; }
body.studio .st-spots i:nth-child(3) { left: 57%; animation: st-spot 1.2s 1.6s ease-out forwards; }
body.studio .st-spots i:nth-child(4) { left: 70%; animation: st-spot 1.2s 2.05s ease-out forwards; }
@keyframes st-spot { 0% { opacity: 0 } 12% { opacity: 1 } 20% { opacity: .2 } 30% { opacity: .9 } 100% { opacity: .75 } }
body.studio #splash .fan-wrap { display: none; }
body.studio #app:has(#splash.active) #scene { opacity: 0; }
body.studio #splash .fan-logo-img { position: relative; z-index: 2; margin-top: 44vh; animation: st-logo 1.1s 3s cubic-bezier(.2, .8, .3, 1) both; }
body.studio #splash .fan-logo-img img { width: min(520px, 74vw); max-height: 26vh; filter: drop-shadow(0 10px 26px rgba(0, 0, 0, .95)) drop-shadow(0 0 30px rgba(255, 190, 90, .35)); animation: none; }
@keyframes st-logo { from { opacity: 0; transform: scale(.7); filter: blur(10px) } to { opacity: 1; transform: none; filter: none } }
body.studio #splash .press { position: relative; z-index: 2; animation: st-fade .8s 3.8s ease both, splash-press 2.2s 4.6s ease-in-out infinite; }
body.studio #splash .fan-sub, body.studio #splash .splash-legal { z-index: 2; animation: st-fade 1s 3.4s ease both; }
@keyframes st-fade { from { opacity: 0 } }
@media (max-width: 760px) { body.studio #splash .st-hall { background-image: url('../assets/ui/intro/studio_hall_m.webp'); background-position: 50% 40%; } body.studio #splash .fan-logo-img { margin-top: 36vh; } }
.mv-art-next { animation: mv-art-fade 2.2s ease-in-out both !important; } @keyframes mv-art-fade { from { opacity: 0; } to { opacity: 1; } }
.friends-box .link { display: flex; gap: 8px; margin: 6px 0 14px; } .friends-box .link input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; }
.friends-box .fr-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; text-align: left; }
.friends-box .fr-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px rgba(217, 196, 138, .3); }
.friends-box .fr-row b { flex: 1; font-size: 18px; }
.friends-box .fr-st { font-size: 14px; color: #9a8670; } .friends-box .fr-st.on { color: #8fe0a0; } .friends-box .fr-st.play { color: #f2cd6b; }

/* «Играть»: how shall we play? Three tall tiles with the Leader paintings; the same height, the buttons on one line */
.play-win { max-width: min(1080px, 96vw) !important; width: 96vw; }
.pl-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 4px 0 16px; }
.pl-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 440px; border-radius: 14px; overflow: hidden; cursor: pointer; text-align: center;
  background: linear-gradient(180deg, rgba(14, 8, 4, .25) 0%, rgba(14, 8, 4, .05) 30%, rgba(14, 8, 4, .9) 60%, #120a05 100%), var(--art) var(--pos, center 20%) / auto 62% no-repeat, #120a05;
  box-shadow: inset 0 0 0 2px rgba(217, 196, 138, .6), inset 0 0 0 5px rgba(16, 9, 4, .8), inset 0 0 0 6px rgba(217, 196, 138, .25), 0 12px 26px rgba(0, 0, 0, .6); transition: transform .18s, box-shadow .18s; }
.pl-tile:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 2px #f2cd6b, inset 0 0 0 5px rgba(16, 9, 4, .8), inset 0 0 0 6px rgba(242, 205, 107, .45), 0 0 34px rgba(255, 200, 90, .35), 0 16px 30px rgba(0, 0, 0, .65); }
.pl-tile.off { filter: grayscale(.7) brightness(.7); cursor: default; }
.pl-head { padding: 16px 14px 30px; display: flex; flex-direction: column; gap: 4px; background: linear-gradient(#120a05 55%, rgba(18, 10, 5, 0)); }
.pl-head b { font: 900 clamp(22px, 2.2vw, 28px)/1.05 var(--k-font); letter-spacing: .03em; text-transform: uppercase; color: #fff1c8; -webkit-text-stroke: 1px rgba(20, 10, 4, .8); paint-order: stroke fill; text-shadow: 0 3px 0 rgba(0, 0, 0, .7), 0 0 18px rgba(0, 0, 0, .8); }
.pl-head span { font-size: 15px; color: #f3e6c8; text-shadow: 0 2px 4px #000, 0 0 10px #000; }
.pl-foot { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 0 16px 16px; }
.pl-cap { font: 700 12px var(--k-font); letter-spacing: .14em; text-transform: uppercase; color: #c9b081; }
/* segmented choice: wooden tabs in a gold-rimmed strip; the chosen one is gold. Always two rows high, so the buttons line up */
.pl-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-radius: 9px; overflow: hidden; min-height: 78px; align-items: stretch;
  background: linear-gradient(rgba(255, 220, 160, .08), rgba(0, 0, 0, .35)), url('../assets/tex/walnut.webp') center / 300px, #2a1a0d; box-shadow: inset 0 0 0 1.5px #d9c48a, inset 0 0 0 3px #160c06, 0 4px 10px rgba(0, 0, 0, .5); }
.pl-seg:empty { visibility: hidden; }
.pl-seg4 { grid-template-columns: repeat(2, 1fr); grid-auto-flow: row; }
.pl-seg button { border: none; cursor: pointer; padding: 8px 6px; font: 800 15px var(--k-font); color: #e7d6ae; background: transparent; text-shadow: 0 1px 0 #000; border-left: 1px solid rgba(217, 196, 138, .22); }
.pl-seg button:first-child { border-left: none; }
.pl-seg4 button:nth-child(odd) { border-left: none; } .pl-seg4 button:nth-child(n+3) { border-top: 1px solid rgba(217, 196, 138, .22); }
.pl-seg button:hover { color: #fff3cf; background: rgba(255, 220, 150, .08); }
.pl-seg button.on { color: #3a1206; text-shadow: 0 1px 0 rgba(255, 240, 200, .6); background: linear-gradient(#fff0b0, #f0c25e 45%, #c98a2a 55%, #e9b24e); box-shadow: inset 0 0 0 1px #fff6d0, inset 0 0 0 2.5px #9a611c; }
.pl-seg.pl-info { place-items: center; font: 800 17px var(--k-font); color: #f3e6c8; text-shadow: 0 1px 0 #000; }
.pl-note { min-height: 2.6em; font-size: 13px; line-height: 1.3; color: #c9b88f; text-shadow: 0 1px 2px #000; }
/* the gold plaque of the game (assets/ui/btn_gold.webp) */
.pl-go { position: relative; align-self: center; width: min(100%, 300px); aspect-ratio: 3.09; border: none; padding: 0; cursor: pointer; background: url('../assets/ui/btn_gold.webp') center / 100% 100% no-repeat;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .65)); transition: transform .12s, filter .15s; }
.pl-go span { position: absolute; inset: 0 13%; display: grid; place-items: center; font: 900 clamp(16px, 1.7vw, 21px) var(--k-font); letter-spacing: .1em; text-transform: uppercase; color: #4a1a04; text-shadow: 0 1px 0 rgba(255, 245, 210, .7); }
.pl-tile:hover .pl-go { filter: brightness(1.1) drop-shadow(0 8px 16px rgba(0, 0, 0, .65)) drop-shadow(0 0 22px rgba(255, 210, 110, .6)); transform: scale(1.03); }
.pl-go[disabled] { filter: grayscale(1) brightness(.6); cursor: default; }
.pl-more { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; }
.pl-more .plq { height: 50px; font-size: 16px; letter-spacing: 1px; padding: 0 34px; }
.pl-more .plq:hover { transform: translateY(-2px); }
.pl-more .pl-cancel { padding: 0 30px; }
@media (max-width: 760px) {
  .pl-tiles { grid-template-columns: 1fr; gap: 12px; } .pl-tile { min-height: 0; }
  .pl-head { padding-top: 80px; } .pl-more { grid-template-columns: 1fr; }
}
/* The invitation card: who calls, and two clear answers */
.mv .join-banner.invite-card { display: flex; align-items: center; gap: 14px; padding: 12px 16px; font-size: 18px; }
.mv .join-banner.invite-card.hidden { display: none; }
.invite-card .ic-btns { display: flex; gap: 8px; }
.menu-opts .mo-test { margin-top: 10px; padding-top: 8px; border-top: 1px dashed rgba(217, 196, 138, .35); font-size: 14px; color: #b9a67f; }
.menu-opts .mo-test b { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.mv-left .menu-daily { width: 100% !important; margin-top: 1.6vh !important; }
/* «в прошлый раз: …» — a small line inside the gold «Играть» plaque, under the word */
.plq .plq-last { position: absolute; left: 0; right: 0; bottom: 5px; font: 600 12px/1 var(--k-font); color: rgba(60, 30, 8, .78); text-transform: none; letter-spacing: 0; text-shadow: none; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 30px; }
.plq .plq-last:empty { display: none; }
.plq.gold:has(.plq-last:not(:empty)) > span { transform: translateY(-6px); }
@media (min-width: 761px) and (max-height: 720px) { .mv-logo { max-height: 22vh; } .mv-sub2 { margin-bottom: 1.4vh; } .mv-btns { gap: 8px; } .mv .mv-more { margin-top: 1vh; } .mv-left .menu-daily { margin-top: 1vh !important; padding: 8px 12px !important; } }
.friends-box .fr-add { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; } .friends-box .fr-add span { flex: 1; color: #d7c7a4; } .friends-box .fr-add b { color: #f6e2a8; letter-spacing: .06em; } .friends-box .fr-add input { width: 130px; padding: 7px 10px; border-radius: 8px; }
.friends-box.watch-only .fr-intro, .friends-box.watch-only .link, .friends-box.watch-only .fr-add { display: none; }
@media (min-width: 761px) { #menu.mv .credits { left: calc(4vw + min(390px, 32vw) + 28px); right: 2.4vw; text-align: left; } } /* the bottom line starts after the left column, so it never runs over the daily task */
/* Leader paintings in the menu: shifted right, the left side under the buttons stays dark */
.mv-art.leader-art { background-color: #120a05 !important; background-size: auto 100% !important; background-position: 30vw center !important; animation: none !important; }
.mv-art.leader-art::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, #120a05 0%, #120a05 30vw, rgba(18, 10, 5, .85) 34vw, rgba(18, 10, 5, 0) 46vw); }
/* bottom: one tidy line (text, link, «Купить» button) with room under it; the ranking panel sits above it */
#menu.mv .credits { bottom: calc(10px + env(safe-area-inset-bottom)) !important; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: nowrap; white-space: nowrap; }
#menu.mv .credits .buy-real { margin-left: 0 !important; padding: 4px 12px; line-height: 1.2; }
.mv-bottom { bottom: calc(52px + env(safe-area-inset-bottom)) !important; }
.mv-left .mv-side { margin-top: 1.6vh; max-width: none; width: 100%; box-sizing: border-box; } /* the world ranking under the buttons */
.log-panel { font-size: 16px !important; line-height: 1.25 !important; } /* the battle log a bit smaller */
/* a friend's call into a game: floats above every screen and window */
.invite-pop { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 900; display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 12px; font-size: 19px; color: #fff3cf;
  background: linear-gradient(rgba(255, 220, 160, .08), rgba(0, 0, 0, .35)), url('../assets/tex/walnut.webp') center / 300px, #2a1a0d; box-shadow: inset 0 0 0 2px #d9c48a, inset 0 0 0 5px #160c06, 0 0 30px rgba(255, 200, 90, .45), 0 14px 30px rgba(0, 0, 0, .7); animation: invPop .35s ease-out; }
.invite-pop .ic-btns { display: flex; gap: 8px; }
@keyframes invPop { from { opacity: 0; transform: translate(-50%, -16px); } }
@media (max-width: 760px) { .invite-pop { flex-direction: column; width: calc(100vw - 32px); box-sizing: border-box; text-align: center; } }

/* leagues: five emblems to pick from, a tag in the table, the profile card with progress */
.lg-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 8px 0 14px; }
.lg-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: none; border-radius: 12px; cursor: pointer; color: #f3e6c8; font: inherit;
  background: linear-gradient(rgba(255, 220, 160, .06), rgba(0, 0, 0, .3)); box-shadow: inset 0 0 0 1.5px rgba(217, 196, 138, .35); transition: transform .15s, box-shadow .15s; }
.lg-pick:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px #d9c48a, 0 0 18px rgba(255, 200, 90, .25); }
.lg-pick.on { box-shadow: inset 0 0 0 2px #f2cd6b, 0 0 22px rgba(255, 200, 90, .4); background: linear-gradient(rgba(242, 205, 107, .16), rgba(0, 0, 0, .3)); }
.lg-pick b { font-size: 16px; } .lg-pick small { font-size: 12px; color: #c9b081; } .lg-pick i { font-style: normal; font-size: 12px; color: #9fe0a6; }
.lg-pick .lg-emb { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .6)); }
.lg-tag { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } .lg-tag b { font-weight: 800; }
.lg-bronze b { color: #e0a070; } .lg-silver b { color: #dfe4ee; } .lg-gold b { color: #f2cd6b; } .lg-platinum b { color: #7fe3d0; } .lg-challenger b { color: #e2a2ff; }
.pf-league { display: flex; align-items: center; gap: 10px; } .pf-league small { display: block; color: #c9b081; }
.lg-prog { width: 220px; max-width: 100%; height: 7px; margin: 4px 0 2px; border-radius: 4px; background: rgba(0, 0, 0, .5); overflow: hidden; } .lg-prog i { display: block; height: 100%; background: linear-gradient(90deg, #f2cd6b, #ffe9a8); }
@media (max-width: 760px) { .lg-row { grid-template-columns: repeat(3, 1fr); } }

#mv-side .mv-place { display: flex; align-items: center; gap: 8px; } /* the league emblem in the menu panel */

/* ---------- Main menu, variant В3 (2026-10-26): a dark glass panel over the painting ---------- */
.mv-left { width: min(340px, 28vw) !important; }
.mv-logo { max-height: 24vh !important; }
.mv-sub2 { margin: 1vh 0 1.8vh !important; font-size: clamp(13px, 1.6vh, 16px) !important; }
.mv-panel { display: flex !important; flex-direction: column; gap: 7px !important; padding: 10px; border-radius: 16px; background: rgba(18, 10, 5, .58); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(217, 196, 138, .35), 0 16px 34px rgba(0, 0, 0, .55); animation: mv-in .5s cubic-bezier(.2, .8, .3, 1) both; }
.mvp-play { position: relative; height: clamp(84px, 12.5vh, 112px); border: none; border-radius: 12px; overflow: hidden; cursor: pointer; display: flex; align-items: flex-end; justify-content: space-between; padding: 10px 14px; font-family: var(--k-font);
  background: linear-gradient(rgba(8, 4, 2, .05) 15%, rgba(8, 4, 2, .88)), url('../assets/ui/intro/studio_hall.webp') 50% 38% / 150% auto no-repeat, #120a05;
  box-shadow: inset 0 0 0 2px #f2cd6b, 0 0 22px rgba(255, 200, 90, .3); transition: transform .15s, box-shadow .15s, filter .15s; }
.mvp-play:hover { transform: translateY(-2px); filter: brightness(1.12); box-shadow: inset 0 0 0 2px #ffe39a, 0 0 32px rgba(255, 200, 90, .5); }
.mvp-play b { font: 900 clamp(24px, 3.6vh, 32px)/1 var(--k-font); letter-spacing: .08em; text-transform: uppercase; color: #fff3cf; text-shadow: 0 2px 0 #000, 0 0 14px rgba(0, 0, 0, .8); }
.mvp-go { padding: 6px 14px; border-radius: 999px; font: 800 14px var(--k-font); color: #3a1206; background: linear-gradient(#fff0b0, #e9b24e); box-shadow: 0 0 0 1px #7a4a14, 0 4px 10px rgba(0, 0, 0, .5); }
.mvp-play .plq-last { display: none; }
.mvp-row { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border: none; border-radius: 10px; cursor: pointer; text-align: left; font-family: var(--k-font); color: #f3e6c8;
  background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(217, 196, 138, .18); transition: background .15s, box-shadow .15s, transform .15s; }
.mvp-row:hover { background: rgba(242, 205, 107, .1); box-shadow: inset 0 0 0 1px rgba(242, 205, 107, .55); transform: translateX(3px); }
.mvp-circ { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #3a2614, #160c06); box-shadow: inset 0 0 0 1.5px #d9c48a; }
.mvp-circ svg { width: 21px; height: 21px; fill: none; stroke: #f2cd6b; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mvp-tx { display: flex; flex-direction: column; min-width: 0; } .mvp-tx b { font: 800 18px/1.1 var(--k-font); letter-spacing: .08em; text-transform: uppercase; }
.mvp-tx small { display: flex; align-items: center; gap: 5px; font: 600 13px/1.2 var(--k-font); color: #b9a67f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mvp-tx small .lg-emb { flex: none; }
.mvp-row i { margin-left: auto; font-style: normal; color: #d9c48a; font-size: 22px; }
.mv-login { margin-top: 8px; text-align: center; } .mv-login:empty { display: none; }
.mv-login-btn { border: none; background: none; cursor: pointer; font: 600 13px var(--k-font); color: #d9c48a; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) {
  .mv-left { width: auto !important; }
  .mv-panel { padding: 8px; } .mvp-play { height: clamp(70px, 11vh, 96px); } .mvp-row { padding: 6px 9px; } .mvp-circ { width: 34px; height: 34px; }
}
