/* Splash, main menu and hero select: game-like presentation. */

/* ---------- animated background ---------- */
.scene { position: fixed; inset: 0; overflow: hidden; background: #0a0604; z-index: 0; transition: opacity .6s; }
.scene.off { opacity: 0; pointer-events: none; }
.scene-art { position: absolute; inset: -6%; filter: saturate(.9) brightness(.55) contrast(1.05); }
.scene-strip { position: absolute; top: 0; bottom: 0; left: 0; display: flex; gap: 0; animation: pan 90s linear infinite; }
.scene-strip .sa { height: 100%; aspect-ratio: .72; background-size: cover; background-position: 50% 30%; position: relative; }
.scene-strip .sa::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 6, 4, .7), transparent 20%, transparent 80%, rgba(10, 6, 4, .7)); }
@keyframes pan { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.scene-fog { position: absolute; inset: -20%; background: url('../assets/fx/smoke_03.png') 0 0 / 700px repeat, url('../assets/fx/smoke_05.png') 300px 200px / 900px repeat;
  opacity: .16; mix-blend-mode: screen; animation: fog 60s linear infinite; filter: sepia(1) hue-rotate(-10deg) saturate(2); }
.scene-fog.f2 { opacity: .1; animation-duration: 95s; animation-direction: reverse; background-size: 1100px, 800px; }
@keyframes fog { from { transform: translate(0, 0); } to { transform: translate(-700px, -200px); } }
.scene #menu-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 65% at 50% 45%, transparent 30%, rgba(8, 4, 2, .85) 100%), linear-gradient(transparent 60%, rgba(8, 4, 2, .8)); }
#splash, #menu, #picker, #heroes { background: none !important; z-index: 1; }
#heroes { overflow-y: auto; }
#menu.active, #splash.active, #picker.active { animation: screenin .6s ease-out; }
@keyframes screenin { from { opacity: 0; transform: scale(1.03); } }

/* ---------- splash ---------- */
#splash { cursor: pointer; display: none; }
#splash.active { display: grid; place-items: center; }
.splash-box { text-align: center; padding: 20px; }
.crest { width: 120px; height: 120px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 60px; color: #3a2008;
  background: radial-gradient(circle at 38% 30%, #fff6c8, #f0c04a 40%, #8a5a10 85%); box-shadow: 0 0 0 4px #2a1604, 0 0 0 8px #c8a058, 0 0 60px rgba(255, 190, 80, .7);
  animation: crest 3s ease-in-out infinite; }
@keyframes crest { 0%, 100% { transform: translateY(0) rotate(-2deg); box-shadow: 0 0 0 4px #2a1604, 0 0 0 8px #c8a058, 0 0 40px rgba(255, 190, 80, .5); } 50% { transform: translateY(-8px) rotate(2deg); box-shadow: 0 0 0 4px #2a1604, 0 0 0 8px #c8a058, 0 0 90px rgba(255, 200, 90, .9); } }
.big-logo span { font-size: clamp(54px, 12vw, 110px) !important; }
.press { margin-top: 30px; font-family: var(--font-card); font-size: 26px; letter-spacing: 3px; color: #f4ead2; animation: press 1.6s ease-in-out infinite; text-shadow: 0 0 20px rgba(255, 200, 100, .8); }
@keyframes press { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- logo with a shine sweep ---------- */
.logo span { background: linear-gradient(100deg, #b98a2e 0%, #ffe9a8 30%, #fff 38%, #ffe9a8 46%, #b98a2e 70%, #e8c46a 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 5s ease-in-out infinite; filter: drop-shadow(0 4px 0 #3a1d02) drop-shadow(0 0 24px rgba(255, 170, 60, .55)); }
@keyframes shine { 0%, 60% { background-position: 120% 0; } 100% { background-position: -40% 0; } }
.logo { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- menu ---------- */
#menu { overflow-y: auto; }
.menu-box { max-width: 560px; padding-top: 5vh; }
.plaque { width: 100%; display: flex; align-items: center; gap: 14px; cursor: pointer; text-align: left; padding: 14px 18px; border-radius: 14px; position: relative; overflow: hidden;
  font-family: var(--font-card); font-size: 24px; color: #f6e9c6; text-shadow: 0 2px 2px #000;
  background: linear-gradient(rgba(30, 16, 6, .78), rgba(18, 9, 3, .9)), url('../assets/tex/walnut.webp') center / 400px;
  border: 2px solid #8a6328; box-shadow: 0 0 0 1px #1a0e06, inset 0 1px 0 rgba(255, 220, 150, .25), 0 8px 20px rgba(0, 0, 0, .55);
  transition: transform .15s, box-shadow .2s, border-color .2s; }
.plaque::before { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 230, 170, .22) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s; }
.plaque:hover { transform: translateY(-2px) scale(1.01); border-color: #f0c96a; box-shadow: 0 0 0 1px #1a0e06, 0 0 26px rgba(255, 200, 90, .45), 0 12px 26px rgba(0, 0, 0, .6); }
.plaque:hover::before { transform: translateX(120%); }
.plaque:active { transform: translateY(1px) scale(.99); }
.plaque.main { font-size: 28px; padding: 18px 20px; border-color: #c8a058; }
.plaque.main .pl-ico { font-size: 34px; }
.pl-ico { font-size: 26px; filter: drop-shadow(0 2px 3px #000); }
.pl-txt small { display: block; font-family: var(--font-ui); font-size: 16px; color: #c9b993; letter-spacing: .5px; text-shadow: none; }
.plaque-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.plaque.small { flex-direction: column; gap: 4px; justify-content: center; text-align: center; padding: 12px 6px; font-size: 17px; }
.plaque.small .pl-ico { font-size: 28px; }
@media (max-width: 520px) { .plaque-row { grid-template-columns: repeat(2, 1fr); } .plaque.main { font-size: 23px; } }
.menu-buttons .plaque { opacity: 0; animation: plaquein .5s ease-out forwards; }
.menu-buttons > .plaque:nth-child(1) { animation-delay: .1s; } .menu-buttons > .plaque:nth-child(2) { animation-delay: .2s; } .menu-buttons > .plaque:nth-child(3) { animation-delay: .3s; }
.plaque-row .plaque { animation-delay: .4s; }
@keyframes plaquein { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
.menu-opts { background: linear-gradient(rgba(22, 12, 5, .9), rgba(14, 8, 3, .94)); }
.menu-opts select { font: inherit; background: #1d130b; color: var(--ink); border: 1px solid #6b4b25; border-radius: 6px; padding: 4px 8px; }

/* ---------- hero select ---------- */
.hero-select { position: relative; max-width: 1200px; margin: 0 auto; padding: 14px 16px 120px; min-height: 100vh; }
.hs-title { font-family: var(--font-title); color: var(--gold); text-align: center; font-size: clamp(26px, 4vw, 40px); margin: 6px 0 10px; text-shadow: 0 0 20px rgba(255, 170, 60, .6), 0 3px 0 #3a1d02; }
.hs-main { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 28px; align-items: center; }
.hs-portrait { position: relative; aspect-ratio: .72; border-radius: 22px; overflow: hidden; background-size: cover; background-position: center;
  box-shadow: 0 0 0 3px #2a1604, 0 0 0 7px #c8a058, 0 0 60px rgba(255, 190, 80, .45), 0 30px 60px #000; animation: heroin .6s cubic-bezier(.2, .8, .3, 1.2); }
.hs-portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .25) 48%, transparent 60%); background-size: 260% 100%; animation: gloss2 4s ease-in-out infinite; }
@keyframes gloss2 { 0%, 70% { background-position: 140% 0; } 100% { background-position: -40% 0; } }
@keyframes heroin { from { transform: scale(.85) rotateY(25deg); opacity: 0; filter: brightness(2); } }
.hs-info { animation: infoin .5s ease-out; }
@keyframes infoin { from { opacity: 0; transform: translateX(30px); } }
.hs-name { font-family: var(--font-card); font-size: clamp(30px, 4vw, 46px); color: #ffe9a8; line-height: 1.05; text-shadow: 0 3px 0 #2a1604; }
.hs-sub { color: var(--ink-dim); font-size: 18px; margin: 4px 0 14px; }
.hs-hp { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-title); font-size: 30px; color: #fff; padding: 4px 16px 4px 8px; border-radius: 30px; background: rgba(160, 20, 10, .5); border: 2px solid #c97a5a; }
.hs-ability { margin-top: 14px; font-size: 19px; line-height: 1.45; background: rgba(0, 0, 0, .45); border-left: 3px solid #c8a058; padding: 12px 14px; border-radius: 8px; }
.hs-style { margin-top: 12px; font-size: 18px; color: #e6d5ae; font-style: italic; }
.hs-roster { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 22px 0 6px; }
.hs-medal { width: 96px; text-align: center; cursor: pointer; font-family: var(--font-card); font-size: 14px; color: #e6d5ae; transition: transform .2s; }
.hs-medal .m { width: 86px; height: 86px; margin: 0 auto 6px; border-radius: 50%; background-size: 240%; background-position: 50% 24%; box-shadow: 0 0 0 3px #2a1604, 0 0 0 5px #8a6328, 0 8px 16px #000; transition: box-shadow .2s, transform .2s; }
.hs-medal:hover .m { transform: translateY(-4px); box-shadow: 0 0 0 3px #2a1604, 0 0 0 5px #f0c96a, 0 0 24px rgba(255, 200, 90, .7); }
.hs-medal.sel .m { transform: translateY(-6px) scale(1.08); box-shadow: 0 0 0 3px #2a1604, 0 0 0 6px #ffe08a, 0 0 34px rgba(255, 210, 100, 1); }
.hs-medal.sel { color: #ffe08a; }
.hs-medal.random .m { display: grid; place-items: center; font-size: 40px; background: radial-gradient(circle, #4a2f18, #1a0e06); }
.hs-medal .tag { font-family: var(--font-ui); font-size: 12px; color: var(--ink-dim); }
.hs-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 12px; justify-content: center; padding: 14px; background: linear-gradient(transparent, rgba(8, 4, 2, .95) 40%); z-index: 5; }
.hs-bar .btn { font-size: 20px; padding: 12px 24px; }
.hs-go { font-family: var(--font-title) !important; font-size: 26px !important; padding: 14px 44px !important; background: radial-gradient(ellipse at 50% 28%, #fff6c8 0%, #f0c04a 40%, #9a6410 85%) !important; color: #2a1800 !important; border: 3px solid #2a1604 !important; box-shadow: 0 0 0 2px #d9a948, 0 6px 0 #1e1002, 0 0 30px rgba(255, 200, 80, .6) !important; animation: glowbtn 1.4s infinite alternate; }
@media (max-width: 760px) { .hs-main { grid-template-columns: 1fr; } .hs-portrait { width: min(62vw, 280px); margin: 0 auto; } .hs-medal { width: 76px; } .hs-medal .m { width: 66px; height: 66px; } }

/* ---------- VS intro ---------- */
.vs-layer { position: fixed; inset: 0; z-index: 260; pointer-events: none; }
.vs-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, rgba(60, 20, 5, .55), rgba(0, 0, 0, .92)); }
.vs-hero { position: absolute; top: 50%; width: min(34vw, 300px); aspect-ratio: .72; border-radius: 20px; background-size: cover; background-position: center;
  box-shadow: 0 0 0 3px #2a1604, 0 0 0 7px #c8a058, 0 0 60px rgba(255, 190, 80, .6), 0 30px 60px #000; }
.vs-name { position: absolute; left: 0; right: 0; bottom: -46px; text-align: center; font-family: var(--font-card); font-size: 26px; color: #ffe9a8; text-shadow: 0 2px 4px #000; }
.vs-text { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--font-title); font-size: min(18vw, 150px); color: #ffd060;
  text-shadow: 0 0 40px rgba(255, 120, 30, 1), 0 6px 0 #3a1d02; }

/* ---------- board themes & easter eggs ---------- */
.prop { position: absolute; z-index: 20; cursor: pointer; user-select: none; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .7)); transition: transform .2s; }
.prop:hover { transform: scale(1.12) rotate(-3deg); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .7)) drop-shadow(0 0 10px rgba(255, 220, 140, .7)); }
.prop.emoji { font-size: 54px; line-height: 1; }
#stage.port .prop { display: none; }
#stage.port .prop.keep-port { display: block; }
.painting { position: absolute; z-index: 3; width: 120px; height: 150px; border-radius: 8px; background-size: 180%; background-position: 50% 26%; cursor: pointer;
  box-shadow: 0 0 0 4px #4a2f12, 0 0 0 7px #c8a058, 0 0 0 9px #2a1604, 0 12px 22px rgba(0, 0, 0, .7); transition: transform .3s; }
.painting:hover { transform: rotate(-2deg) scale(1.05); }
.bubble { position: absolute; z-index: 89; max-width: 330px; padding: 10px 14px; border-radius: 16px; background: #fbf3dc; color: #2a1606; font-size: 18px; line-height: 1.3;
  font-family: var(--font-ui); box-shadow: 0 8px 20px rgba(0, 0, 0, .6); border: 2px solid #8a6328; pointer-events: none; animation: bubblein .25s cubic-bezier(.2, .8, .3, 1.4); }
.bubble::after { content: ''; position: absolute; left: 30px; bottom: -12px; border: 12px solid transparent; border-top-color: #fbf3dc; border-bottom: 0; }
.bubble.down::after { top: -12px; bottom: auto; border: 12px solid transparent; border-bottom-color: #fbf3dc; border-top: 0; }
@keyframes bubblein { from { transform: scale(.4); opacity: 0; } }
#stage.port .bubble { font-size: 26px; max-width: 520px; }
.emote-wheel { position: absolute; z-index: 90; display: grid; gap: 6px; }
.emote-wheel button { font-family: var(--font-card); font-size: 18px; padding: 8px 14px; border-radius: 20px; cursor: pointer; color: #f6e9c6; background: linear-gradient(#5a3a22, #2a1608); border: 2px solid #c8a058; box-shadow: 0 6px 14px #000; white-space: nowrap; }
.emote-wheel button:hover { filter: brightness(1.25); }
#stage.port .emote-wheel button { font-size: 26px; padding: 12px 18px; }
.theme-castle #board { background: radial-gradient(ellipse 65% 60% at 50% 48%, rgba(200, 210, 255, .18), transparent 72%), linear-gradient(rgba(10, 14, 30, .35), rgba(10, 14, 30, .55)), url('../assets/tex/stone.webp') center / 360px repeat, #2a2a30 !important; }
.theme-castle .mat { background: radial-gradient(ellipse at 50% 50%, rgba(230, 236, 255, .18), transparent 70%), linear-gradient(rgba(40, 50, 90, .2), rgba(20, 24, 50, .4)), url('../assets/tex/marble.webp') center / 420px repeat !important; }
.theme-dungeon #board { background: radial-gradient(ellipse 60% 55% at 50% 48%, rgba(120, 255, 160, .12), transparent 72%), linear-gradient(rgba(8, 10, 6, .55), rgba(4, 6, 3, .75)), url('../assets/tex/stone.webp') center / 300px repeat, #141a10 !important; }
.theme-dungeon .mat { background: radial-gradient(ellipse at 50% 50%, rgba(150, 220, 120, .14), transparent 70%), linear-gradient(rgba(20, 30, 14, .45), rgba(10, 16, 6, .6)), url('../assets/tex/mat.webp') center / 420px repeat !important; }
.theme-dungeon .torch .flame { filter: hue-rotate(80deg) blur(.6px); }
.theme-dungeon .torch .glow { filter: hue-rotate(80deg); }

.plaque-row.two { grid-template-columns: 1fr 1fr; }
.plaque-row.two .plaque { font-size: 20px; }
.menu-buttons > .plaque-row { opacity: 0; animation: plaquein .5s ease-out .3s forwards; }
.menu-buttons > .plaque-row .plaque { opacity: 1; animation: none; }
@media (max-width: 520px) { .plaque-row.two { grid-template-columns: 1fr; } }

/* --- readability fixes --- */
.scene-art { filter: saturate(.85) brightness(.42) blur(1.5px); }
.scene-strip .sa { aspect-ratio: .9; background-size: 150% auto; background-position: 50% 18%; }
.logo span { background-image: linear-gradient(100deg, #f3cf6e 0%, #fff4c8 30%, #ffffff 38%, #fff4c8 46%, #f0c050 70%, #ffe08a 100%);
  filter: drop-shadow(0 3px 0 #3a1d02) drop-shadow(0 0 2px #000) drop-shadow(0 0 26px rgba(255, 170, 60, .7)); }
.logo small { color: #f4ead2; font-size: 22px; text-shadow: 0 2px 4px #000, 0 0 12px #000; }
.splash-box, .menu-box { position: relative; }
.splash-box::before { content: ''; position: absolute; left: 50%; top: 50%; width: 900px; height: 620px; transform: translate(-50%, -50%); z-index: -1;
  background: radial-gradient(ellipse at 50% 50%, rgba(8, 4, 2, .85), rgba(8, 4, 2, .5) 45%, transparent 70%); }
.press { color: #fff4d6; font-size: 28px; text-shadow: 0 2px 4px #000, 0 0 22px rgba(255, 190, 90, .9); }
.menu-box::before { content: ''; position: absolute; inset: -20px -60px; z-index: -1; background: radial-gradient(ellipse at 50% 40%, rgba(8, 4, 2, .82), rgba(8, 4, 2, .4) 55%, transparent 75%); }
.emote-wheel .em-mute { font-size: 15px; margin-top: 4px; background: linear-gradient(#2d2620, #15110d); border-color: #8a7a5a; color: #d8ccb0; }
