/* Fake Dungeon 3 — title, class pick, camp, map, hero, shop, options */
#shaker { position: absolute; inset: 0; z-index: 1; }
#shaker.shake { animation: shake .22s; } #shaker.shake2 { animation: shake2 .42s; }
@keyframes shake { 20% { transform: translate(-4px, 2px); } 45% { transform: translate(4px, -3px); } 70% { transform: translate(-2px, 2px); } }
@keyframes shake2 { 12% { transform: translate(-7px, 3px); } 28% { transform: translate(7px, -5px); } 46% { transform: translate(-6px, 4px); } 64% { transform: translate(4px, -2px); } 82% { transform: translate(-2px, 1px); } }
.bgimg.dimmed { filter: brightness(.45) saturate(.9) blur(2px); transform: scale(1.04); }
.bgimg.dimmed2 { filter: brightness(.5) saturate(1.05) blur(1.5px); transform: scale(1.04); }

/* ---- title ---- */
#s-title { align-items: center; }
.t-logo { margin-top: 7%; text-align: center; animation: logo-in .9s cubic-bezier(.2,1.3,.4,1); }
@keyframes logo-in { from { transform: translateY(-30px) scale(.9); opacity: 0; } }
.t-small { font-size: 13px; letter-spacing: .34em; color: #c79bff; -webkit-text-stroke: 3px #12072e; paint-order: stroke fill; }
.t-big { display: flex; flex-direction: column; line-height: .92; margin-top: 4px; filter: drop-shadow(0 4px 0 #2a1602) drop-shadow(0 0 22px rgba(255,190,70,.45)); }
.t-big span { font-size: clamp(44px, 14.5vw, 64px); background: linear-gradient(180deg, #fffbe6 8%, #ffe08a 38%, #f2a52c 62%, #a85f10 92%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1.5px #5e3a0a; }
.t-big span:last-child { font-size: clamp(50px, 16.5vw, 73px); }
.t-sub { margin-top: 8px; font-size: 14px; letter-spacing: .3em; text-transform: uppercase; color: var(--teal); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.t-heroes { position: absolute; left: 0; right: 0; bottom: 20%; height: 36%; }
.t-heroes img { position: absolute; bottom: 0; height: 100%; filter: drop-shadow(0 10px 8px rgba(0,0,0,.6)); animation: bob 3s ease-in-out infinite; transform-origin: 50% 92%; }
.t-heroes .h1 { left: 50%; margin-left: -18vh; height: 100%; z-index: 3; }
.t-heroes .h2 { left: 50%; margin-left: -36vh; height: 82%; filter: brightness(.82) drop-shadow(0 10px 8px rgba(0,0,0,.6)); animation-delay: -.8s; }
.t-heroes .h3 { left: 50%; margin-left: 6vh; height: 82%; filter: brightness(.82) drop-shadow(0 10px 8px rgba(0,0,0,.6)); animation-delay: -1.7s; }
@keyframes bob { 50% { transform: scaleY(1.025) scaleX(.99); } }
.t-foot { position: absolute; left: 0; right: 0; bottom: calc(22px + var(--sab)); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.t-foot .btn { min-width: 250px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.045); } }
.t-load { width: 200px; height: 10px; border-radius: 5px; background: #070a18; border: 1px solid var(--gold3); overflow: hidden; position: absolute; top: 26px; }
.t-load i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, var(--gold1), var(--gold2)); transition: width .15s; }
.t-note { font-size: 11px; color: var(--dim); -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; }

/* ---- class pick ---- */
#s-pick { align-items: stretch; padding: 0 12px calc(12px + var(--sab)); }
.p-stage { position: relative; flex: 1 1 0; min-height: 120px; display: flex; align-items: flex-end; justify-content: center; }
.p-glow { position: absolute; left: 50%; bottom: 2%; width: 78%; aspect-ratio: 3/1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255,210,110,.55), rgba(255,170,60,.15) 60%, transparent); }
.p-hero { position: relative; height: 100%; max-height: 300px; animation: bob 3s ease-in-out infinite, hero-in .35s cubic-bezier(.2,1.4,.4,1); transform-origin: 50% 92%; filter: drop-shadow(0 12px 10px rgba(0,0,0,.6)); }
@keyframes hero-in { from { transform: translateY(18px) scale(.9); opacity: 0; } }
.p-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 10px; }
.p-card { position: relative; height: 92px; border-radius: 12px; overflow: hidden; background: var(--grain), linear-gradient(180deg, #2a3570, #131a3a); background-blend-mode: overlay, normal; border: 2px solid #3b4a94;
  box-shadow: inset 0 1px 0 rgba(170,190,255,.3), 0 4px 0 #070a18; transition: transform .1s; }
.p-card img { position: absolute; left: 50%; top: -6px; height: 104px; transform: translateX(-50%); }
.p-card b { position: absolute; left: 0; right: 0; bottom: 4px; font-size: 13px; letter-spacing: .04em; }
.p-card.on { border-color: var(--gold1); background: var(--grain), linear-gradient(180deg, #7a5a1a, #3a2a10); background-blend-mode: overlay, normal; transform: translateY(-4px);
  box-shadow: inset 0 1px 0 rgba(255,240,170,.6), 0 0 0 2px var(--gold4), 0 0 18px rgba(255,200,80,.55), 0 6px 0 #2a1a04; }
.p-info { padding: 12px 16px 14px; }
.p-stat { display: flex; align-items: center; gap: 10px; font-size: 12.5px; margin-top: 6px; } .p-stat span { width: 52px; color: var(--dim); }
.p-bar { flex: 1; height: 10px; border-radius: 5px; background: #070a18; border: 1px solid #44539e; overflow: hidden; }
.p-bar i { display: block; height: 100%; max-width: 100%; background: linear-gradient(180deg, #fff0b0, #f2b93c); transition: width .35s; }
.p-go { display: flex; margin-top: 14px; } .p-go .btn { flex: 1; }

/* ---- camp ---- */
.c-stage { position: relative; flex: 1; }
.c-hero { position: absolute; left: 50%; top: calc(62% * 1); height: 37vh; max-height: 340px; transform: translate(-50%, -92%); transform-origin: 50% 92%; animation: cbob 3.2s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(255,170,70,.25)); }
#s-camp .c-stage { position: absolute; inset: 0; }
#s-camp .topbar, #s-camp .nav, #s-camp .c-foot { position: relative; z-index: 4; }
#s-camp .c-foot { margin-top: auto; }
@keyframes cbob { 0%, 100% { transform: translate(-50%, -92%); } 50% { transform: translate(-50%, -92%) scaleY(1.02) scaleX(.992); } }
.c-shadow { position: absolute; left: 50%; top: 62%; width: 30vh; height: 5vh; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.6), transparent); }
.c-pet { position: absolute; left: 83%; top: 43%; width: 13vh; transform: translate(-50%, -50%) scaleX(-1); animation: float 2.6s ease-in-out infinite; filter: drop-shadow(0 8px 6px rgba(0,0,0,.5)); }
@keyframes float { 50% { margin-top: -10px; } }
.c-power { position: absolute; left: 0; right: 0; top: 65.5%; text-align: center; line-height: 1; }
.c-power span { display: block; font-size: 12px; letter-spacing: .3em; color: var(--teal); -webkit-text-stroke-width: 3px; }
.c-power b { font-size: 34px; color: var(--gold1); }
.c-side { position: absolute; right: 8px; top: 24%; width: 62px; height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 5px; font-size: 10.5px; line-height: 1.05; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; animation: float 2.2s ease-in-out infinite; }
.c-side img { position: absolute; top: -8px; width: 46px; height: 46px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.6)); }
.c-side .dot, .pet .dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; transform: rotate(45deg); background: var(--red); border: 2px solid #fff; box-shadow: 0 0 8px var(--red); }
.c-side2 { top: calc(24% + 86px); animation-delay: -.9s; }
.c-foot { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 0 14px 12px; }
.c-next { align-self: center; padding: 6px 14px; font-size: 13px; }
.c-enter { width: 100%; min-height: 70px !important; font-size: 24px !important; }

/* ---- map ---- */
.m-tabs { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 2px 8px 6px; }
.m-tab { position: relative; height: 62px; border-radius: 10px; overflow: hidden; border: 2px solid #2e3b7c; box-shadow: 0 3px 0 #070a18; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 3px; }
.m-tab img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; filter: brightness(.7); }
.m-tab b, .m-tab small { position: relative; font-size: 11.5px; line-height: 1.1; } .m-tab small { font-size: 10.5px; color: var(--gold1); }
.m-tab.on { border-color: var(--gold1); box-shadow: 0 0 0 2px var(--gold4), 0 0 14px var(--tint), 0 3px 0 #070a18; } .m-tab.on img { filter: brightness(1.05); }
.m-tab.locked img { filter: grayscale(1) brightness(.35); }
.m-path { position: relative; flex: 1; min-height: 0; margin: 0 6px; }
.m-path svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.m-path polyline { fill: none; stroke: rgba(255,224,138,.55); stroke-width: 5; stroke-dasharray: 2 12; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 2px 0 #000); }
.m-node { position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; display: grid; place-items: center; }
.m-node .tile { width: 42px; height: 42px; display: grid; place-items: center; transform: rotate(45deg); border-radius: 9px; font: 900 17px 'Cinzel', serif;
  background: var(--grain), linear-gradient(135deg, #3b4788, #1a2150); background-blend-mode: overlay, normal; border: 2px solid #0b0f26; color: #7c88c0;
  box-shadow: inset 0 2px 0 rgba(170,190,255,.25), 0 4px 0 #05070f, 0 8px 10px rgba(0,0,0,.5); }
.m-node .tile b { transform: rotate(-45deg); }
.m-node.done .tile { color: #3a2204; background: var(--grain), linear-gradient(135deg, #fff0b0, #f2b93c 55%, #b8741a); background-blend-mode: overlay, normal; border-color: var(--gold4); box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 4px 0 #4a2c06, 0 8px 10px rgba(0,0,0,.5); }
.m-node.open .tile { color: #032b28; background: var(--grain), linear-gradient(135deg, #c5fff3, #3ee0c5 55%, #137567); background-blend-mode: overlay, normal; border-color: #063f39; animation: nodepulse 1.3s ease-in-out infinite; }
@keyframes nodepulse { 50% { box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 4px 0 #06332e, 0 0 0 5px rgba(62,224,197,.3), 0 0 22px var(--teal); } }
.m-node.sel::after { content: ''; position: absolute; inset: -5px; border: 3px solid #fff; border-radius: 12px; transform: rotate(45deg) scale(.86); box-shadow: 0 0 12px #fff; animation: pulse 1s ease-in-out infinite; pointer-events: none; }
.m-node .tick { position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; border-radius: 5px; background: #1f9a3b; border: 2px solid #05070f; font-size: 12px; font-style: normal; display: grid; place-items: center; }
.m-node.boss { width: 84px; height: 84px; margin: -50px 0 0 -42px; }
.m-node.boss .tile { width: 54px; height: 54px; font-size: 11px; margin-top: 30px; background: var(--grain), linear-gradient(135deg, #ff8f9a, #c2263f 55%, #6c1024); background-blend-mode: overlay, normal; color: #fff; border-color: #3a0611; }
.m-node.boss.done .tile { background: var(--grain), linear-gradient(135deg, #fff0b0, #f2b93c 55%, #b8741a); background-blend-mode: overlay, normal; color: #3a2204; }
.m-node.boss img { position: absolute; left: 50%; bottom: 34px; width: 96px; transform: translateX(-50%); filter: drop-shadow(0 4px 4px rgba(0,0,0,.7)); z-index: 1; }
.m-node.boss.locked img { filter: brightness(.25) drop-shadow(0 4px 4px rgba(0,0,0,.7)); }
.m-sheet { margin: 4px 8px calc(10px + var(--sab)); padding: 12px; border-radius: 16px; }
.m-name { font-size: 18px; } .m-sub { font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.m-foes { display: flex; } .m-foes img { width: 48px; height: 48px; margin-left: -12px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }

/* ---- items ---- */
.it { position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; --rc: #8f9ab8;
  background: var(--grain), radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rc) 55%, #1a2150), #10163a 78%); background-blend-mode: overlay, normal;
  border: 2px solid var(--rc); box-shadow: inset 0 0 0 2px #080b1c, inset 0 2px 6px rgba(255,255,255,.2), 0 3px 0 #05070f; }
.it img { width: 86%; height: 86%; filter: drop-shadow(0 3px 2px rgba(0,0,0,.55)); }
.it small { position: absolute; left: 5px; bottom: 2px; font-size: 10.5px; font-weight: 900; -webkit-text-stroke: 2.5px #080b1c; paint-order: stroke fill; }
.it .up { position: absolute; right: 3px; top: 1px; color: #6dff8a; font-style: normal; font-size: 13px; -webkit-text-stroke: 2.5px #06300f; paint-order: stroke fill; animation: float 1.2s ease-in-out infinite; }
.r0 { --rc: #9aa5c4; } .r1 { --rc: #5fe08a; } .r2 { --rc: #58b4ff; } .r3 { --rc: #c77dff; } .r4 { --rc: #ffb84a; }
.it.r3, .it.r4 { box-shadow: inset 0 0 0 2px #080b1c, inset 0 2px 6px rgba(255,255,255,.2), 0 3px 0 #05070f, 0 0 12px color-mix(in srgb, var(--rc) 70%, transparent); }
.it.r4::after { content: ''; position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); background-size: 250% 100%; animation: sweep 2.4s linear infinite; }
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.it.empty { border-style: dashed; border-color: #3b4a94; background: rgba(8,11,28,.6); box-shadow: none; } .it.empty img { opacity: .22; filter: grayscale(1); }

/* ---- hero ---- */
.h-bg { position: absolute; inset: 0; z-index: -1; background: var(--grain), radial-gradient(90% 46% at 50% 30%, #35459a 0%, #1a2252 45%, #0a0e24 100%); background-blend-mode: overlay, normal; }
.h-bg.shopbg { background: var(--grain), radial-gradient(90% 50% at 50% 12%, #5a3a8f 0%, #231a52 45%, #0a0e24 100%); background-blend-mode: overlay, normal; }
.h-top { display: grid; grid-template-columns: 66px 1fr 66px; gap: 6px; padding: 2px 12px 0; align-items: center; }
.h-col { display: flex; flex-direction: column; gap: 9px; }
.h-mid { position: relative; min-width: 0; height: 31vh; min-height: 190px; max-height: 280px; display: flex; justify-content: center; }
.h-glow { position: absolute; left: 50%; bottom: 9%; width: 90%; aspect-ratio: 3.2/1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(62,224,197,.5), rgba(62,224,197,.12) 62%, transparent); }
.h-hero { position: relative; flex: none; height: 100%; transform-origin: 50% 92%; animation: bob 3s ease-in-out infinite; filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)); }
.h-pow { position: absolute; left: 0; right: 0; bottom: -8px; text-align: center; line-height: 1; }
.h-pow span { display: block; font-size: 10.5px; letter-spacing: .3em; color: var(--teal); } .h-pow b { font-size: 28px; color: var(--gold1); display: inline-block; }
.powpop { animation: powpop .5s cubic-bezier(.2,1.6,.4,1); } @keyframes powpop { 40% { transform: scale(1.45); color: #fff; } }
.h-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 14px 12px 8px; padding: 7px 4px; }
.h-stats div { position: relative; text-align: center; line-height: 1.15; padding-top: 2px; } .h-stats div + div { border-left: 1px solid #3b4a94; }
.h-stats img { width: 26px; height: 26px; display: block; margin: -2px auto 0; } .h-stats b { display: block; font-size: 15px; } .h-stats small { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.h-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 10px; -webkit-overflow-scrolling: touch; }
.h-pets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pet { position: relative; display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 4px 8px 4px 4px; text-align: left; }
.pet img { width: 44px; height: 44px; flex: none; } .pet b { display: block; font-size: 12.5px; } .pet small { display: block; font-size: 10.5px; color: var(--dim); line-height: 1.15; }
.pet.on { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal), 0 0 12px rgba(62,224,197,.45); } .pet.locked img { filter: brightness(.25) grayscale(1); }
.h-baghead { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; } .h-baghead span { flex: 1; font-size: 16px; color: var(--gold1); }
.h-bag { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sheet-top { display: flex; gap: 12px; align-items: center; } .bigit { width: 84px; flex: none; }
.sheet-name { font: 900 17px 'Cinzel', serif; line-height: 1.1; } .sheet-pow { margin-top: 4px; font-size: 14px; } em { font-style: normal; } em.pos { color: #6dff8a; } em.neg { color: var(--red); }
.sheet-pow em:not(.pos):not(.neg) { color: var(--teal); font-size: 12px; }
.sheet-stats { margin-top: 12px; border-top: 1px solid #3b4a94; } .st-row { display: flex; padding: 7px 2px; border-bottom: 1px solid rgba(59,74,148,.5); font-size: 14.5px; }
.st-row span { flex: 1; color: var(--dim); } .st-row em { width: 64px; text-align: right; }

/* ---- shop + options ---- */
.s-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 6px 12px 10px; }
.offer { display: flex; align-items: center; gap: 10px; padding: 9px 10px; flex: none; }
.offer.feat { border-color: var(--teal); } .offer.royal { background: var(--grain), radial-gradient(120% 90% at 50% 0%, #6a3fb0 0%, #2f1c66 55%, #160e38 100%); background-blend-mode: overlay, normal; }
.o-art { width: 58px; height: 58px; flex: none; border-radius: 10px; background: radial-gradient(closest-side, rgba(255,224,138,.35), transparent); display: grid; place-items: center; } .o-art img { width: 64px; height: 64px; filter: drop-shadow(0 4px 3px rgba(0,0,0,.6)); }
.o-name { font-size: 15.5px; color: var(--gold1); } .o-desc { font-size: 12px; color: var(--dim); line-height: 1.25; margin-top: 1px; }
.offer .btn { min-width: 86px; flex: none; }
.opt { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 14px; text-align: left; flex: none; } .opt span { flex: 1; } .opt b { display: block; font-size: 15px; } .opt small { color: var(--dim); font-size: 12px; } .opt em { font-size: 26px; color: var(--gold1); }
.sw { width: 54px; height: 28px; border-radius: 8px; background: #070a18; border: 2px solid #3b4a94; position: relative; flex: none; transition: background .2s; }
.sw u { position: absolute; top: 2px; left: 2px; width: 22px; height: 20px; border-radius: 5px; background: linear-gradient(180deg, #8f9ab8, #5a6488); transition: left .18s; }
.sw.on { background: #0f5a50; border-color: var(--teal); } .sw.on u { left: 26px; background: linear-gradient(180deg, #fff0b0, #f2b93c); }
.stats-line { text-align: center; font-size: 11.5px; padding: 6px 0; flex: none; }
