/* ================================================================ 로비 (640x360 기준)
   상단 재화 바 28px, 하단 탭 40px, 가운데 292px. 홈(전투)은 배경 장면(scene.js)이 성채와 영웅을 그리고 그 위에 UI를 얹는다.
   공통 모양: 어두운 외곽선(--edge) + 위쪽 하이라이트 + 아래 그림자로 도톰한 버튼·패널, 등급색 카드 테두리, 빨간 알림 점, D-day 배지. */
:root {
  --edge: #0b0c22;
  --pan: #1d2150;
  --pan2: #272c66;
  --hi: #ffffff26;
  --yel: #ffd23f;
  --yel2: #f2a600;
  --ink2: #3a2200;
  --blu: #4a78ff;
  --blu2: #2f55d6;
}
.lobby {
  background: transparent;
  display: block;
  font-family: "Galmuri9", "Galmuri11", sans-serif;
  font-size: 10px;
}
.lobby .sp { flex: 1; }
.lobby .gem { color: #9ee8ff; font-weight: normal; }
.lobby .small { font-size: 10px; }
.lobby button { font-family: inherit; }
/* 글자 외곽선: 밝은 배경·장면 위에서도 읽히게 */
.lobby .ol, .lobby .rt, .lobby .nt, .lobby .minfo, .lobby .hplate, .lobby .it, .lobby .gtitle, .lobby .fc b, .lobby .gcard b, .lobby .pc .pn {
  text-shadow: 1px 0 var(--edge), -1px 0 var(--edge), 0 1px var(--edge), 0 -1px var(--edge);
}

/* ---------------------------------------------------------------- 버튼 */
.b2 {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px; padding: 3px 9px;
  font-family: "Galmuri11", sans-serif; font-size: 12px; line-height: 14px; color: #fff; white-space: nowrap; cursor: pointer;
  background: linear-gradient(#5a86ff, var(--blu2)); border: 1px solid var(--edge); border-radius: 3px;
  box-shadow: inset 0 1px 0 #ffffff55, inset 0 -2px 0 #1d3a9e, 0 1px 0 var(--edge);
  text-shadow: 0 1px 0 #0b0c2299;
}
.b2.s { padding: 2px 6px; font-family: "Galmuri9", sans-serif; font-size: 10px; line-height: 12px; }
.b2.y { background: linear-gradient(#ffe680, var(--yel) 45%, var(--yel2)); color: var(--ink2); text-shadow: none; box-shadow: inset 0 1px 0 #ffffffaa, inset 0 -2px 0 #b97a00, 0 1px 0 var(--edge); }
.b2.no { opacity: 0.75; }
.b2 img { width: 14px; height: 14px; }
.b2:hover:not(:disabled) { filter: brightness(1.08); }
.b2:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 1px 0 #ffffff55, 0 0 0 var(--edge); }
.b2:disabled { filter: grayscale(0.85) brightness(0.65); cursor: default; }
.lobby .dot { position: absolute; width: 7px; height: 7px; right: 2px; top: 1px; background: #ff3b4e; border: 1px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--edge); }
.lobby .dd, .screen .dd { display: inline-block; padding: 0 3px; border-radius: 7px; background: #ff7a2f; color: #fff; font-family: "Galmuri11"; font-size: 12px; line-height: 13px; font-style: normal; font-weight: normal; border: 1px solid var(--edge, #0b0c22); white-space: nowrap; }
.lobby .dd.hot, .screen .dd.hot { background: #ff3b5c; animation: ddpulse 1s ease-in-out infinite; }
.lobby .dd.big { padding: 2px 8px; border-radius: 9px; }
@keyframes ddpulse { 50% { filter: brightness(1.35); } }

/* ---------------------------------------------------------------- 상단 바 */
.ltop { position: absolute; left: 0; top: 0; right: 0; height: 28px; display: flex; align-items: center; gap: 5px; padding: 0 6px; background: linear-gradient(#0d0f2cf0, #0d0f2cb0); border-bottom: 1px solid #ffffff18; z-index: 2; }
.prof { display: flex; align-items: center; gap: 4px; }
.prof .ava { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; display: grid; place-items: start center; background: radial-gradient(#4a4f9a, #1d2150); border: 1px solid var(--yel); box-shadow: 0 0 0 1px var(--edge); }
.prof .ava img { width: 20px; height: 26px; margin-top: 1px; }
.prof .pn { display: flex; flex-direction: column; line-height: 11px; }
.prof .pn b { font-family: "Galmuri11"; font-size: 12px; font-weight: normal; color: #fff; }
.prof .pn i { font-style: normal; color: var(--dim2); }
.cur { position: relative; display: flex; align-items: center; gap: 2px; height: 18px; padding: 0 2px 0 3px; background: #07081ccc; border: 1px solid #ffffff22; border-radius: 9px; color: #fff; }
.cur img { width: 14px; height: 14px; }
.cur b { font-weight: normal; min-width: 22px; padding-right: 2px; }
.cur.tk b { min-width: 0; padding-right: 4px; }
.cur.pick { cursor: pointer; border-color: var(--yel); }
.cur .plus { width: 14px; height: 14px; padding: 0; display: grid; place-items: center; font-family: "Galmuri11"; font-size: 12px; line-height: 12px; color: #fff; background: linear-gradient(#7aec6a, #2eae44); border: 1px solid var(--edge); border-radius: 50%; cursor: pointer; }
.ibtn { width: 24px; height: 24px; padding: 0; display: grid; place-items: center; background: linear-gradient(#3a3f8a, #23275e); border: 1px solid var(--edge); border-radius: 5px; box-shadow: inset 0 1px 0 var(--hi); cursor: pointer; }
.ibtn img { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- 하단 탭 */
.lnav { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; display: grid; grid-template-columns: repeat(5, 1fr); background: linear-gradient(#1c2052, #0f1130); border-top: 2px solid var(--edge); box-shadow: inset 0 1px 0 #ffffff1c; z-index: 2; }
.nv { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0; padding: 0 0 3px; background: transparent; border: 0; border-right: 1px solid #00000040; color: #aab0dc; cursor: pointer; }
.nv:last-child { border-right: 0; }
.nv .ni { display: grid; place-items: center; width: 28px; height: 24px; }
.nv .ni img { width: 28px; height: 28px; transition: transform 0.12s; }
.nv .nt { font-size: 10px; line-height: 11px; }
.nv.on { background: linear-gradient(#3b418f, #262a68); color: var(--yel); box-shadow: inset 0 2px 0 var(--yel); }
.nv.on .ni img { transform: translateY(-3px) scale(1.15); }
.nv .dot { right: calc(50% - 18px); top: 3px; }
/* 가운데 전투 탭: 위로 솟은 원형 버튼 */
.nv.main .ni { width: 40px; height: 40px; margin-top: -16px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff2a0, var(--yel) 45%, #ff9a00); border: 2px solid var(--edge); box-shadow: 0 2px 0 var(--edge), inset 0 -3px 0 #c06a00; }
.nv.main .ni img { width: 28px; height: 28px; }
.nv.main.on .ni img { transform: none; }
.nv.main.on { box-shadow: inset 0 2px 0 var(--yel); }

/* ---------------------------------------------------------------- 본문 */
.lbody { position: absolute; left: 0; right: 0; top: 28px; bottom: 40px; padding: 5px 8px; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.lobby.inner .lbody { background: linear-gradient(#171a44f2, #10122ef6); }
.lobby.home .lbody { padding: 0; overflow: hidden; display: block; }
.hd3 { color: #c8ccf0; margin-top: 1px; }
.seg { display: flex; align-self: flex-start; gap: 2px; padding: 2px; background: #07081c; border: 1px solid #ffffff1c; border-radius: 9px; flex: none; }
.sg { position: relative; padding: 2px 12px; font-family: "Galmuri11"; font-size: 12px; line-height: 14px; color: #aab0dc; background: transparent; border: 0; border-radius: 7px; cursor: pointer; }
.sg.on { color: var(--ink2); background: linear-gradient(#ffe680, var(--yel2)); box-shadow: inset 0 -2px 0 #b97a00; }
.sg .dot { right: 1px; top: 0; }
.phead { display: flex; align-items: center; gap: 8px; flex: none; }
.phead > b { font-family: "Galmuri11"; font-size: 12px; font-weight: normal; color: var(--yel); }
.back { padding: 2px 8px; font-family: "Galmuri11"; font-size: 12px; color: #fff; background: linear-gradient(#3a3f8a, #23275e); border: 1px solid var(--edge); border-radius: 9px; box-shadow: inset 0 1px 0 var(--hi); cursor: pointer; }
.cdb { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.cdb.end { justify-content: flex-end; }
.cdb.col { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
.stars { color: var(--gold); letter-spacing: -1px; }
.stars i { color: #3a3d58; font-style: normal; }
.gtag { font-size: 10px; padding: 0 2px; border: 1px solid; border-radius: 2px; }
.notice { padding: 3px 6px; background: #3a2412; border: 1px solid #c08a2a; border-radius: 3px; color: #ffd8a0; flex: none; }
.it { display: inline-flex; align-items: center; gap: 1px; color: #fff; white-space: nowrap; }
.it img { width: 14px; height: 14px; }
.its { display: inline-flex; flex-wrap: wrap; gap: 1px 4px; align-items: center; }
.its.big .it { font-family: "Galmuri11"; font-size: 12px; }
.chipb { padding: 1px 6px; background: #252a5e; border: 1px solid var(--edge); border-radius: 8px; color: #aab0dc; cursor: pointer; }
.chipb.on { background: linear-gradient(#ffe680, var(--yel2)); color: var(--ink2); }
.filters { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- 팝업 */
.lmodal { position: absolute; inset: 0; display: grid; place-items: center; background: #05061acc; z-index: 20; }
.lmbox { max-width: 580px; max-height: 330px; overflow: auto; padding: 8px 10px; background: linear-gradient(#262b66, #181b46); border: 1px solid var(--edge, #0b0c22); border-radius: 6px; box-shadow: inset 0 0 0 1px #6a70c8, 0 3px 0 #0b0c22; display: flex; flex-direction: column; gap: 5px; font-family: "Galmuri9"; font-size: 10px; color: #fff; }
.mtitle { font-family: "Galmuri11"; font-size: 12px; color: var(--yel, #ffd23f); }
.notices { display: flex; flex-direction: column; gap: 4px; max-width: 460px; }
.notices .nt { display: flex; flex-direction: column; gap: 1px; padding: 4px 6px; background: #0b0c2280; border: 1px solid #ffffff18; border-radius: 3px; line-height: 13px; }
.notices .nt b { font-family: "Galmuri11"; font-size: 12px; font-weight: normal; color: #ffe680; }
table.rates { border-collapse: collapse; }
table.rates td, table.rates th { border: 1px solid #ffffff22; padding: 1px 4px; text-align: left; vertical-align: top; }

/* ---------------------------------------------------------------- 전투 홈 */
.home { position: absolute; inset: 0; }
.rail { position: absolute; top: 6px; width: 52px; display: flex; flex-direction: column; gap: 5px; }
.rail.l { left: 6px; }
.rail.r { right: 6px; }
.rb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0; background: transparent; border: 0; color: #fff; cursor: pointer; }
.rb .ri { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; background: linear-gradient(#4a50a8, #262a66); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 #ffffff40, inset 0 -2px 0 #161a48, 0 1px 0 var(--edge); }
.rb .ri img { width: 28px; height: 28px; }
.rb.gift .ri { background: linear-gradient(#ff8a6a, #c8304a); box-shadow: inset 0 1px 0 #ffffff55, inset 0 -2px 0 #7a1630, 0 1px 0 var(--edge); }
.rb .rt { font-size: 10px; line-height: 12px; white-space: nowrap; }
.rb .dot { right: 8px; top: -2px; }
.rb .dd { position: absolute; right: -6px; top: 19px; }
.rb .tag { position: absolute; right: 0; top: -3px; padding: 0 2px; font-style: normal; color: var(--ink2); background: var(--yel); border: 1px solid var(--edge); border-radius: 4px; }
.rb .tm { font-style: normal; color: #ffb0b0; font-size: 10px; line-height: 11px; }
.modes { position: absolute; left: 50%; top: 5px; transform: translateX(-50%); display: flex; gap: 2px; padding: 2px; background: #07081cd8; border: 1px solid #ffffff22; border-radius: 10px; }
.md { padding: 2px 12px; font-family: "Galmuri11"; font-size: 12px; line-height: 14px; color: #c8ccf0; background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.md.on { color: var(--ink2); background: linear-gradient(#ffe680, var(--yel2)); box-shadow: inset 0 -2px 0 #b97a00; }
.minfo { position: absolute; left: 70px; right: 70px; top: 29px; text-align: center; color: #e8e6ff; line-height: 12px; }
.minfo b { color: var(--yel); font-weight: normal; }
.roster { position: absolute; left: 66px; top: 46px; width: 134px; padding: 4px; background: #07081ca8; border: 1px solid #ffffff1c; border-radius: 5px; }
.hrs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-top: 2px; }
.hr { position: relative; display: flex; align-items: center; gap: 3px; height: 30px; padding: 0 2px; background: linear-gradient(#2f3478, #1d2150); border: 1px solid var(--edge); border-radius: 4px; color: #c8ccf0; cursor: pointer; overflow: hidden; }
.hr img { width: 20px; height: 26px; flex: none; }
.hr span { white-space: nowrap; }
.hr.on { background: linear-gradient(#6a5a20, #3a2f10); color: var(--yel); box-shadow: inset 0 0 0 1px var(--yel); }
.hr.locked, .su.locked { opacity: 0.3; }
.harrow { position: absolute; top: 112px; width: 22px; height: 30px; padding: 0; font-size: 12px; color: #fff; background: #07081c99; border: 1px solid #ffffff30; border-radius: 6px; cursor: pointer; }
.harrow.l { left: 208px; }
.harrow.r { left: 410px; }
.harrow:disabled { opacity: 0.25; cursor: default; }
.hplate { position: absolute; left: 50%; top: 222px; transform: translateX(-50%); display: flex; align-items: baseline; gap: 5px; padding: 1px 10px; background: #07081cc8; border: 1px solid #ffffff30; border-radius: 9px; white-space: nowrap; }
.hplate b { font-family: "Galmuri11"; font-size: 12px; font-weight: normal; }
.hplate span { color: #c8ccf0; }
.hinfo { position: absolute; right: 66px; top: 46px; width: 134px; padding: 5px; display: flex; flex-direction: column; gap: 3px; background: #07081cb8; border: 1px solid #ffffff1c; border-radius: 5px; color: #e8e6ff; }
.hinfo .sk { display: flex; align-items: center; gap: 4px; }
.hinfo .sk img { width: 28px; height: 28px; flex: none; }
.hinfo .sk span { display: flex; flex-direction: column; line-height: 12px; }
.hinfo .sk i { font-style: normal; color: var(--dim); }
.hinfo .sk b { font-family: "Galmuri11"; font-size: 12px; font-weight: normal; }
.hinfo .ps { line-height: 12px; color: #c8ccf0; word-break: keep-all; }
.sups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.su { display: flex; flex-direction: column; align-items: center; padding: 2px 0 1px; background: linear-gradient(#2f3478, #1d2150); border: 1px solid var(--edge); border-radius: 4px; color: #c8ccf0; cursor: pointer; }
.su img { width: 28px; height: 28px; }
.su.on { background: linear-gradient(#5a3a9a, #33205e); color: #fff; box-shadow: inset 0 0 0 1px #d0a0ff; }
.hinfo .sd { line-height: 12px; color: #d0b8ff; word-break: keep-all; }
.hfoot { position: absolute; left: 66px; right: 66px; bottom: 5px; height: 44px; display: flex; align-items: center; gap: 8px; }
.lo { display: flex; align-items: center; gap: 4px; flex: 0 0 158px; height: 40px; padding: 2px 5px; text-align: left; line-height: 12px; color: #fff; background: #07081cc8; border: 1px solid #ffffff28; border-radius: 6px; cursor: pointer; }
.lo:disabled { cursor: default; }
.lo img { width: 22px; height: 22px; flex: none; }
.lo i { font-style: normal; }
.diffs { flex: 1; display: flex; justify-content: center; gap: 3px; }
.df { padding: 3px 8px; font-family: "Galmuri11"; font-size: 12px; line-height: 14px; color: #c8ccf0; background: #07081cc8; border: 1px solid #ffffff28; border-radius: 9px; cursor: pointer; }
.df.on { color: #fff; background: linear-gradient(#5a86ff, var(--blu2)); border-color: var(--edge); box-shadow: inset 0 1px 0 #ffffff55; }
.cta { position: relative; flex: 0 0 156px; height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; color: var(--ink2); cursor: pointer;
  background: linear-gradient(#fff2a0, var(--yel) 40%, #ff9d00); border: 2px solid var(--edge); border-radius: 8px; box-shadow: inset 0 2px 0 #ffffffb0, inset 0 -4px 0 #c06a00, 0 2px 0 var(--edge); animation: ctaglow 1.6s ease-in-out infinite; }
.cta b { font-family: "Galmuri11"; font-weight: 700; font-size: 12px; line-height: 14px; letter-spacing: 2px; transform: scale(1.5); transform-origin: center bottom; margin-bottom: 2px; }
.cta span { font-size: 10px; line-height: 12px; }
.cta:active { transform: translateY(1px); }
@keyframes ctaglow { 50% { box-shadow: inset 0 2px 0 #ffffffb0, inset 0 -4px 0 #c06a00, 0 2px 0 var(--edge), 0 0 10px 2px #ffd23f88; } }

/* ---------------------------------------------------------------- 수집 카드 (등급 테두리) */
.gcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px 3px; min-height: 54px; color: #fff; cursor: pointer;
  background: linear-gradient(#4a4e6a, #2c3046); border: 1px solid var(--edge); border-radius: 4px; box-shadow: inset 0 0 0 1px var(--gc, #b8bcc8), inset 0 2px 0 1px #ffffff1c; }
.gC { --gc: #b8bcc8; }
.gB { --gc: #5ad06a; }
.gA { --gc: #4aa8ff; }
.gS { --gc: #c07aff; }
.gSS { --gc: #ffb84a; }
.gcard.gB { background: linear-gradient(#2f7050, #1b3a2c); }
.gcard.gA { background: linear-gradient(#2f5aa0, #1a2f5e); }
.gcard.gS { background: linear-gradient(#6c40ac, #382062); }
.gcard.gSS { background: linear-gradient(#b8802c, #693812); box-shadow: inset 0 0 0 1px var(--gc), inset 0 2px 0 1px #ffffff30, 0 0 5px #ffb84a90; }
.gcard > * { flex-shrink: 0; }
.gcard img { width: 28px; height: 28px; }
.gcard b { min-height: 11px; font-weight: normal; font-size: 10px; line-height: 11px; text-align: center; word-break: keep-all; overflow-wrap: anywhere; max-height: 22px; overflow: hidden; }
.gcard .stars { font-size: 8px; line-height: 8px; }
.gcard.on { outline: 2px solid #fff; outline-offset: -1px; z-index: 1; }
.gcard .eqd { position: absolute; left: 1px; top: 1px; font-style: normal; font-size: 10px; line-height: 10px; background: #07081c; color: var(--cyan); padding: 0 1px; border-radius: 2px; }
.gcard .mg { position: absolute; right: 1px; top: 1px; font-style: normal; font-size: 10px; line-height: 10px; background: #ff3b4e; color: #fff; padding: 0 1px; border-radius: 2px; }
.cdi { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 5px; border: 1px solid var(--edge); background: radial-gradient(#ffffff30, transparent 70%), linear-gradient(#4a4e6a, #2c3046); box-shadow: inset 0 0 0 1px var(--gc); }
.cdi img { width: 28px; height: 28px; }
.cdi.big { width: 48px; height: 48px; }
.cdi.big img { width: 44px; height: 44px; }

/* 보드 편성 */
.boardtab { display: flex; gap: 8px; flex: 1; min-height: 0; }
.bleft { width: 252px; display: flex; flex-direction: column; gap: 4px; flex: none; }
.miniboard { position: relative; width: 248px; height: 156px; flex: none; }
.mslot { position: absolute; width: 30px; height: 25px; display: grid; place-items: center; padding: 0; background: #252a5e; border: 1px solid #3a3d58; border-radius: 3px; cursor: pointer; }
.mslot img { width: 16px; height: 16px; }
.mslot span { position: absolute; left: 1px; top: 0; font-size: 10px; line-height: 10px; color: var(--dim2); }
.mslot .ms { position: absolute; right: 1px; bottom: -1px; font-style: normal; font-size: 7px; color: var(--gold); letter-spacing: -2px; }
.mslot.on { outline: 2px solid #fff; z-index: 2; }
.mslot.start { cursor: default; }
.mcenter { position: absolute; left: 34px; top: 29px; width: 178px; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; border: 1px dashed #ffffff30; border-radius: 4px; }
.bdetail { min-height: 76px; padding: 4px; background: #07081c90; border: 1px solid #ffffff1c; border-radius: 4px; }
.cd { display: flex; gap: 5px; }
.cd .cdt { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 12px; }
.bfoot { display: flex; gap: 6px; align-items: center; }
.bright { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 0; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 3px; overflow-y: auto; padding: 1px 2px 14px 1px; align-content: start; -webkit-mask-image: linear-gradient(#000 calc(100% - 12px), transparent); mask-image: linear-gradient(#000 calc(100% - 12px), transparent); }
.essence { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: none; }
.essence .b2 { margin-left: auto; }

/* 주사위 */
.dicetab { display: flex; gap: 8px; flex: 1; min-height: 0; }
.dleft { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 0; }
.dgrid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 3px; overflow-y: auto; align-content: start; padding: 1px 2px 14px 1px; -webkit-mask-image: linear-gradient(#000 calc(100% - 12px), transparent); mask-image: linear-gradient(#000 calc(100% - 12px), transparent); }
.gcard.dc img { width: 27px; height: 27px; }
.ddetail { width: 220px; flex: none; display: flex; flex-direction: column; gap: 5px; min-height: 0; overflow: hidden; padding: 6px; background: #07081c90; border: 1px solid #ffffff1c; border-radius: 4px; }
.ddetail .dhead { display: flex; gap: 6px; align-items: center; flex: none; min-width: 0; }
.ddetail .dhead > div { min-width: 0; overflow-wrap: anywhere; }
.ddetail p { margin: 2px 0; line-height: 13px; }
.ddetail-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 4px; overflow-wrap: anywhere; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: #6faaa5 #183d50; }
.ddetail-scroll p + p { margin-top: 5px; }
.dice-detail-note { margin-top: 7px; padding-top: 5px; border-top: 1px solid #52768566; }
.ddetail .ddetail-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 4px; flex: none; padding-top: 5px; border-top: 1px solid #527685; }
.ddetail-actions .b2 { min-width: 0; min-height: 24px; padding: 4px 3px; white-space: normal; overflow-wrap: anywhere; line-height: 12px; font-size: 9px; }
.ddetail-actions .b2:last-child { grid-column: 1 / -1; }
.ddetail-scroll::-webkit-scrollbar { width: 5px; }
.ddetail-scroll::-webkit-scrollbar-track { background: #183d50; border-radius: 5px; }
.ddetail-scroll::-webkit-scrollbar-thumb { background: #6faaa5; border-radius: 5px; }

/* 공방, 연구소 */
.wcols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wcol { display: flex; flex-direction: column; gap: 2px; }
.wrow { display: flex; align-items: center; justify-content: space-between; gap: 3px; padding: 2px 4px; background: #07081c90; border: 1px solid #ffffff1c; border-radius: 3px; line-height: 12px; }
.wrow b { font-weight: normal; color: #fff; }
.wrow b.green { color: var(--green); }
.labslots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.labslot { min-height: 62px; padding: 4px; background: #07081c90; border: 1px solid #ffffff1c; border-radius: 4px; display: flex; flex-direction: column; gap: 2px; }
.labslot.lockd { opacity: 0.7; border-style: dashed; }
.labslot .bar { height: 6px; }
.labslot .bar i { background: linear-gradient(90deg, #2a6a8a, #7ad8ff); }
.labgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }

/* ---------------------------------------------------------------- 소환 */
.gacha { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; flex: 1; min-height: 0; }
.guardian-gacha-entry { display:flex; justify-content:flex-end; flex:none; }
.guardian-growth { display:grid; gap:3px; flex:none; padding:5px; border-radius:6px; background:#e4ecdf; color:#345766; font-size:9px; line-height:1.3; }
.guardian-growth > div { display:flex; flex-wrap:wrap; gap:4px; }
.guardian-growth small { font-size:8px; }
.guardian-recruit-sheet { display:grid; gap:5px; font-size:10px; }
.guardian-recruit-sheet ul { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px; list-style:none; padding:0; margin:0; }
.guardian-recruit-sheet li { display:grid; align-items:center; grid-template-columns:24px minmax(0,1fr) auto; gap:4px; padding:3px 4px; border:1px solid #64818a; border-radius:4px; }
.guardian-recruit-sheet img { width:24px; height:22px; object-fit:contain; }
.guardian-recruit-sheet li b { white-space:nowrap; color:#ffe29b; }
.guardian-recruit-sheet p { margin:0; }
.guardian-recruit-result { display:flex; align-items:center; gap:6px; padding:6px; border-radius:5px; background:#334b57; color:#ffe29b; }
.guardian-recruit-result img { width:34px; height:32px; }
.gban { display: flex; flex-direction: column; gap: 5px; padding: 5px; border-radius: 6px; border: 1px solid var(--edge); background: linear-gradient(#2c2266, #1a1640); box-shadow: inset 0 0 0 1px #8a6ad0, 0 2px 0 var(--edge); min-width: 0; }
.gban.b-dice { background: linear-gradient(#123e5c, #0f2440); box-shadow: inset 0 0 0 1px #3ab0c8, 0 2px 0 var(--edge); }
.gart { position: relative; height: 150px; flex: none; border-radius: 4px; overflow: hidden; border: 1px solid var(--edge);
  background: radial-gradient(circle at 50% 78%, #ffe28a66, transparent 55%), repeating-conic-gradient(from 0deg at 50% 78%, #ffffff12 0deg 9deg, transparent 9deg 18deg), linear-gradient(#5a33a8, #261650); }
.b-dice .gart { background: radial-gradient(circle at 50% 78%, #9ef4ff55, transparent 55%), repeating-conic-gradient(from 0deg at 50% 78%, #ffffff12 0deg 9deg, transparent 9deg 18deg), linear-gradient(#1c78a0, #0d2c4c); }
.gtitle { position: absolute; left: 6px; top: 4px; right: 70px; display: flex; flex-direction: column; color: #fff; }
.gtitle b { font-family: "Galmuri11"; font-weight: 700; font-size: 12px; line-height: 15px; }
.gtitle span { color: #ffe8a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ginfo { position: absolute; right: 4px; top: 4px; padding: 1px 5px; color: #fff; background: #07081cc0; border: 1px solid #ffffff40; border-radius: 8px; cursor: pointer; }
.gfeat { position: absolute; left: 0; right: 0; bottom: 15px; display: flex; justify-content: center; align-items: flex-end; gap: 8px; }
.fc { width: 68px; height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 3px 2px 2px; border-radius: 5px; border: 1px solid var(--edge);
  background: radial-gradient(circle at 50% 40%, #fff2b0aa, transparent 60%), linear-gradient(#d8a040, #7a4214); box-shadow: inset 0 0 0 1px #ffe08a, 0 0 8px #ffd87088; }
.fc.f1 { transform: translateY(-6px); }
.fc .fi { display: grid; place-items: center; flex: 1; }
.fc .fi img { max-width: 44px; max-height: 44px; }
.fc b { width: 100%; height: 22px; display: flex; align-items: center; justify-content: center; font-weight: normal; text-align: center; color: #fff; word-break: keep-all; overflow-wrap: anywhere; overflow: hidden; line-height: 11px; }
.glab { position: absolute; left: 0; right: 0; bottom: 1px; text-align: center; color: #ffffffa0; }
.gpity { display: flex; flex-direction: column; gap: 2px; flex: none; }
.prow { display: grid; grid-template-columns: 70px 1fr 32px; gap: 4px; align-items: center; color: #e8e6ff; }
.prow b { font-weight: normal; text-align: right; color: #fff; }
.prow .bar { height: 7px; border-radius: 3px; border-color: var(--edge); }
.bar.s > i { background: linear-gradient(90deg, #7a3ad0, #d4a0ff); }
.bar.ss > i { background: linear-gradient(90deg, #ff8a00, #ffe066); }
.gpity .note { color: #aab0dc; }
.gpity .soft { color: #ffe066; animation: ddpulse 1s ease-in-out infinite; }
.gbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; flex: none; }
.gb { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 2px 4px; color: #fff; cursor: pointer; border: 1px solid var(--edge); border-radius: 5px;
  background: linear-gradient(#5a86ff, var(--blu2)); box-shadow: inset 0 1px 0 #ffffff55, inset 0 -3px 0 #1d3a9e, 0 1px 0 var(--edge); }
.gb.ten { background: linear-gradient(#ffe680, var(--yel) 45%, var(--yel2)); color: var(--ink2); box-shadow: inset 0 1px 0 #ffffffaa, inset 0 -3px 0 #b97a00, 0 1px 0 var(--edge); }
.gb b { font-family: "Galmuri11"; font-size: 12px; font-weight: 700; line-height: 14px; }
.gb span { display: flex; align-items: center; gap: 2px; line-height: 14px; }
.gb img { width: 14px; height: 14px; }
.gb:active { transform: translateY(1px); }
.gsub { display: flex; gap: 4px; align-items: center; flex: none; height: 34px; }

/* 소환 결과 (전체 화면) */
.gres { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff;
  background: radial-gradient(circle at 50% 46%, #4a35a0e0, #0b0c22f6 68%); }
.gres::before { content: ""; position: absolute; left: 50%; top: 46%; width: 760px; height: 760px; margin: -380px 0 0 -380px; background: repeating-conic-gradient(#ffffff0c 0deg 8deg, transparent 8deg 16deg); animation: spin 30s linear infinite; pointer-events: none; }
.gres.best4::before { background: repeating-conic-gradient(#ffd8701e 0deg 8deg, transparent 8deg 16deg); }
.gres > * { position: relative; }
@keyframes spin { to { transform: rotate(360deg); } }
.grt { font-family: "Galmuri11"; font-size: 12px; color: var(--yel); text-shadow: 1px 0 var(--edge), -1px 0 var(--edge), 0 1px var(--edge), 0 -1px var(--edge); }
.grc { display: grid; grid-template-columns: repeat(5, 92px); gap: 7px; perspective: 600px; }
.gres.one .grc { grid-template-columns: 128px; }
.pc { height: 118px; border-radius: 6px; border: 1px solid var(--edge); padding: 2px; background: linear-gradient(#8a90a8, #4a4e66); box-shadow: 0 2px 0 var(--edge); animation: flipin 0.5s both; }
.gres.one .pc { height: 168px; }
.pc.gB { background: linear-gradient(#7ae08a, #2f7050); }
.pc.gA { background: linear-gradient(#7ac0ff, #2f5aa0); }
.pc.gS { background: linear-gradient(#d8a0ff, #6c40ac); box-shadow: 0 2px 0 var(--edge), 0 0 10px 1px #c07affaa; }
.pc.gSS { background: linear-gradient(#fff0a0, #ffb84a 40%, #b8602c); box-shadow: 0 2px 0 var(--edge), 0 0 14px 3px #ffd870cc; animation: flipin 0.5s both, legend 1s 0.6s ease-in-out infinite alternate; }
@keyframes flipin { 0% { opacity: 0; transform: rotateY(90deg) scale(0.8); } 60% { opacity: 1; transform: rotateY(-12deg) scale(1.05); } 100% { opacity: 1; transform: none; } }
@keyframes legend { to { box-shadow: 0 2px 0 var(--edge), 0 0 22px 6px #ffe08aee; } }
.pc .pin { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; border-radius: 4px; background: linear-gradient(#262a58, #12142e); overflow: hidden; }
.pc .pg { align-self: stretch; text-align: center; color: #0b0c22; background: var(--gc); font-family: "Galmuri11"; font-size: 12px; line-height: 14px; }
.pc .pimg { flex: 1; display: grid; place-items: center; width: 100%; background: radial-gradient(circle at 50% 50%, #ffffff2a, transparent 62%); background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--gc) 45%, transparent), transparent 62%); }
.pc .pimg img { max-width: 64px; max-height: 64px; }
.gres.one .pc .pimg img { max-width: 96px; max-height: 96px; }
.pc .pn { width: 100%; height: 24px; padding: 0 2px; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: normal; font-size: 10px; line-height: 11px; word-break: keep-all; overflow-wrap: anywhere; overflow: hidden; }
.gres.one .pc .pn { font-family: "Galmuri11"; font-size: 12px; line-height: 13px; height: 28px; }
.pc .stars { font-size: 10px; line-height: 10px; margin-bottom: 2px; }
.pc .new { position: absolute; left: 2px; top: 16px; padding: 0 2px; font-style: normal; color: #fff; background: #ff3b4e; border: 1px solid var(--edge); border-radius: 3px; line-height: 10px; }
.grb { display: flex; gap: 6px; }

/* ---------------------------------------------------------------- 상점 */
.daily-shop { flex: none; display: grid; gap: 4px; padding: 6px 8px; border: 2px solid #264956; border-radius: 9px; background: #29576a; box-shadow: inset 0 1px #72a0a4; }
.daily-shop header, .shop-draw-name { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.daily-shop header { justify-content: space-between; color: #ffe5a0; }
.daily-shop header strong { font-size: 12px; }
.daily-shop header small { color: #d4e7df; font-size: 9px; }
.daily-shop header small b { font-variant-numeric: tabular-nums; }
.daily-shop-tiles { display: flex; gap: 6px; flex-wrap: wrap; }
.shop-draw-tile { display: flex; align-items: center; gap: 6px; flex: 1 1 215px; min-width: 0; padding: 5px 7px; border: 1px solid #7e9c93; border-radius: 6px; background: #f8f0d9; color: #284a50; }
.shop-draw-tile > img { width: 28px; height: 28px; object-fit: contain; flex: none; image-rendering: pixelated; }
.shop-draw-offer { display: flex; align-items: center; flex-wrap: wrap; min-width: 0; flex: 1; gap: 3px 7px; }
.shop-draw-name { flex: 1 1 112px; min-width: 0; }
.shop-draw-name b { font-size: 11px; line-height: 1.2; overflow-wrap: anywhere; }
.shop-draw-name .ginfo { position: static; width: auto; max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 8px; padding: 2px 4px; cursor: pointer; }
.shop-draw-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 4px; min-width: 0; }
.shop-draw-actions .b2.s { min-height: 27px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }
.daily-shop .shop-sync { margin: 0; color: #fff1c9; }
.shopg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 4px; flex: none; }
.shopc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px 3px; cursor: pointer; color: #fff; border: 1px solid var(--edge); border-radius: 5px;
  background: radial-gradient(circle at 50% 30%, #9ef4ff40, transparent 60%), linear-gradient(#2a3a8a, #1a1f54); box-shadow: inset 0 1px 0 #ffffff30, 0 1px 0 var(--edge); }
.shopc .gi img { width: 28px; height: 28px; }
.shopc .tag { position: absolute; left: -1px; top: -1px; font-style: normal; background: #ff3b4e; color: #fff; padding: 0 3px; border: 1px solid var(--edge); border-radius: 5px 0 5px 0; }
.shopc .first { max-width: 100%; overflow-wrap: anywhere; font-style: normal; color: var(--yel); }
.shopc .price { align-self: stretch; margin-top: auto; overflow-wrap: anywhere; padding: 1px 0; text-align: center; color: var(--ink2); background: linear-gradient(#ffe680, var(--yel2)); border-radius: 3px; }
.shopwrap { display: grid; grid-template-columns: 336px 1fr; gap: 8px; min-height: 0; }
.scol { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pkgs { display: flex; flex-direction: column; gap: 3px; }
.pkg { display: flex; align-items: center; gap: 5px; padding: 2px 5px; background: linear-gradient(#2a2f6e, #1a1d4a); border: 1px solid var(--edge); border-radius: 5px; box-shadow: inset 0 1px 0 #ffffff22; line-height: 12px; }
.pkg .pki { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 6px; background: linear-gradient(#ff8a6a, #c8304a); border: 1px solid var(--edge); }
.pkg .pki img { width: 28px; height: 28px; }
.pkg .pkt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pkg .pkt b { font-family: "Galmuri11"; font-size: 12px; font-weight: normal; color: #fff; }
.pkg.lockd { opacity: 0.6; }

/* ---------------------------------------------------------------- 미션, 패스, 순위 */
.atts { display: grid; grid-template-columns: repeat(7, 1fr) 92px; gap: 4px; flex: none; }
.att { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px 2px; min-height: 42px; background: linear-gradient(#2a2f6e, #1a1d4a); border: 1px solid var(--edge); border-radius: 4px; }
.att b { font-weight: normal; color: #c8ccf0; }
.att .its { justify-content: center; }
.att.done { filter: brightness(0.6); }
.att .ok { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 12px; color: var(--green); text-shadow: 0 0 2px #000; }
.att.today { background: linear-gradient(#6a5a20, #3a2f10); box-shadow: inset 0 0 0 1px var(--yel), 0 0 6px #ffd23f88; }
.att.today b { color: var(--yel); }
.attb { height: 100%; }
.mlist { display: flex; flex-direction: column; gap: 3px; }
.mrow { display: grid; grid-template-columns: 150px 1fr 56px 120px 40px; align-items: center; gap: 6px; padding: 2px 6px; background: #07081c90; border: 1px solid #ffffff1c; border-radius: 4px; }
.mrow .mn { font-weight: normal; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .mission-alternative { white-space: normal; line-height: 1.45; overflow-wrap: anywhere; overflow: visible; }
.mrow .mc { color: var(--dim); text-align: right; }
.mrow .its { justify-content: flex-end; }
.mrow .bar { height: 6px; border-radius: 2px; }
.mrow.ready { border-color: var(--yel); box-shadow: inset 0 0 0 1px #6a5a20; }
.mrow.claimed { opacity: 0.55; }
.mrow.all { background: linear-gradient(90deg, #3a2f10c0, #07081c90); }
.passhead { display: flex; align-items: center; gap: 12px; padding: 4px 8px; background: linear-gradient(90deg, #4a2f8a, #1f2350); border: 1px solid var(--edge); border-radius: 5px; box-shadow: inset 0 1px 0 #ffffff22; flex: none; }
.passhead .ps1, .passhead .ps2 { display: flex; flex-direction: column; gap: 1px; }
.passhead .ps2 { align-items: flex-start; }
.passhead .sea { font-family: "Galmuri11"; font-size: 12px; font-weight: normal; color: var(--yel); }
.prem-on { padding: 2px 8px; color: var(--ink2); background: linear-gradient(#ffe680, var(--yel2)); border: 1px solid var(--edge); border-radius: 8px; }
.passlv { display: flex; align-items: center; gap: 8px; flex: none; }
.passlv .lvb { font-family: "Galmuri11"; font-size: 12px; }
.passlv .lvb b { color: var(--yel); font-weight: normal; }
.passlv .bar { flex: 1; height: 8px; border-radius: 3px; }
.passlv .bar > i { background: linear-gradient(90deg, #ff8a00, #ffe066); }
.pass-rewards { display: flex; gap: 5px; min-width: 0; flex: none; }
.ptrack { display: flex; gap: 4px; min-width: 0; flex: 1; overflow-x: auto; overflow-y: hidden; padding: 0 2px 7px; touch-action: pan-x pan-y; overscroll-behavior-x: contain; scroll-padding: 2px; }
.plabel { flex: 0 0 54px; display: grid; grid-template-rows: 50px 50px; align-content: start; gap: 3px; padding: 18px 3px 0; box-sizing: border-box; border-right: 1px solid #729a9a66; color: #d7e8dc; }
.plabel span { display: grid; place-items: center; text-align: center; overflow-wrap: anywhere; font-size: 9px; line-height: 1.4; }
.pcol { display: flex; flex-direction: column; gap: 3px; flex: 0 0 68px; min-width: 0; opacity: 0.6; }
.lbody.t-pass, .ptrack { scrollbar-width: thin; scrollbar-color: #6faaa5 #183d50; }
.lbody.t-pass::-webkit-scrollbar, .ptrack::-webkit-scrollbar { width: 5px; height: 5px; }
.lbody.t-pass::-webkit-scrollbar-track, .ptrack::-webkit-scrollbar-track { background: #183d50; border-radius: 6px; }
.lbody.t-pass::-webkit-scrollbar-thumb, .ptrack::-webkit-scrollbar-thumb { background: #6faaa5; border: 1px solid #183d50; border-radius: 6px; }
.lbody.t-pass::-webkit-scrollbar-corner { background: #183d50; }
.pcol.reached { opacity: 1; }
.pcol .plv { height: 15px; line-height: 15px; text-align: center; color: #c8ccf0; font-weight: normal; }
.pcol.now .plv { color: var(--yel); }
.pcol.now .plv::after { content: " ◀"; }
.pr { position: relative; min-height: 50px; padding: 3px; display: flex; align-items: center; justify-content: center; background: linear-gradient(#2a2f6e, #1a1d4a); border: 1px solid var(--edge); border-radius: 4px; color: #fff; cursor: pointer; }
.pr .its { justify-content: center; flex-direction: column; }
.pr.prem { background: linear-gradient(#5a4a1a, #2a220c); box-shadow: inset 0 0 0 1px #8a6a20; }
.pr.can { box-shadow: inset 0 0 0 1px var(--green), 0 0 6px #4ae0a088; animation: ddpulse 1.2s ease-in-out infinite; }
.pr:disabled { cursor: default; }
.pr .ok { position: absolute; right: 2px; bottom: 1px; font-style: normal; color: var(--green); }
.pr .lk { position: absolute; left: 0; right: 0; bottom: 1px; text-align: center; font-style: normal; color: #ffd8a0b0; }
.ranks { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.rrow { display: grid; grid-template-columns: 24px 1fr 80px 90px; gap: 4px; padding: 1px 6px; background: #07081c90; border: 1px solid #ffffff1c; border-radius: 3px; }
.rrow.r1 b { color: #ffd23f; }
.rrow.r2 b { color: #dfe4f2; }
.rrow.r3 b { color: #e0a060; }
.rrow.me { border-color: var(--yel); background: #3a2f10c0; }
.rrow .ai { font-style: normal; color: var(--dim2); border: 1px solid var(--dim2); padding: 0 1px; font-size: 10px; }

/* 결과 보상 */
.rewardbox { grid-column: 1 / 3; display: flex; align-items: center; gap: 10px; padding: 4px 6px; background: #1f1c14; border: 1px solid #6a5a20; font-family: "Galmuri9"; font-size: 10px; }
.rewardbox b { color: var(--gold); font-weight: normal; }

/* 광고 (모의) */
#adlayer { position: absolute; inset: 0; display: grid; place-items: center; background: #000d; z-index: 50; color: #fff; font-family: "Galmuri9"; font-size: 10px; }
#adlayer .adbox { padding: 12px 18px; border: 1px solid var(--line2); background: #151724; text-align: center; line-height: 16px; }

/* 공용 정수 */
.essence .ess { font-size: 10px; }

.lo .bgr { display: inline-flex; align-items: center; gap: 4px; }
.lo .bgr > span { display: inline-flex; align-items: center; gap: 1px; }
.lo .bgr i { display: inline-block; width: 6px; height: 6px; border: 1px solid var(--edge); border-radius: 50%; }
.psum { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 3px 6px; background: #07081c90; border: 1px solid #ffffff1c; border-radius: 4px; flex: none; }
.psum .lbl { padding: 0 4px; border: 1px solid #ffffff30; border-radius: 6px; }

/* Home hub: actual events and attendance first; guardian configuration lives separately. */
.lobby .home-hub { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; padding: 9px 12px 8px; }
.home-benefits { display: grid; grid-template-rows: 20px 75px 92px minmax(0, 1fr); gap: 6px; min-width: 0; min-height: 0; }
.home-section-head { display: flex; align-items: center; gap: 5px; color: #153d4c; }
.lobby .home-benefits:has(.home-social-links) { grid-template-rows:20px 23px 66px 83px minmax(30px,1fr); gap:5px; }
.home-social-links { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px; }
.home-social-links button,.soc-btn { font:inherit;color:#173c48;border:1px solid #3a6870;border-radius:6px;background:#edf5dc;cursor:pointer; }
.home-social-links button { font-size:10px;line-height:1.05;padding:1px 3px;min-width:0;height:23px;overflow-wrap:anywhere; }
.home-social-links button:active,.soc-btn[aria-pressed="true"] { background:#ffda83;color:#422c18; }
.lbody.t-social { display:flex;min-height:0;padding:4px 9px; overflow:hidden; }
.social-hub { flex:1;display:flex;flex-direction:column;min-height:0;gap:5px;color:#eef8f2; }
.social-hub header,.social-hub nav,.soc-segments,.soc-entry,.soc-row,.soc-row>div,.soc-confirm { display:flex;align-items:center;gap:5px; }
.social-hub header h2 { flex:1;margin:0;color:#ffdb8b;font-size:17px; }
.social-hub nav { padding-bottom:4px;border-bottom:1px solid #57828a; }
.social-hub nav button { flex:1; }
.soc-btn { min-height:24px;padding:2px 8px;font-size:11px;font-weight:700;line-height:1.15; }
.soc-btn[disabled] { opacity:.55;cursor:default; }
.soc-content { flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:0 3px 7px 0; }
.soc-content p { margin:5px 0;font-size:11px;line-height:1.45; }
.soc-segments { margin-bottom:4px;flex-wrap:wrap; }
.soc-segments .soc-btn { min-height:21px;font-size:10px; }
.soc-list,.soc-opt,.soc-confirm { margin:5px 0;padding:5px 7px;border:1px solid #56848a;border-radius:7px;background:#234755; }
.soc-list h3 { margin:0 0 3px;font-size:12px;color:#ffde96; }
.soc-list p { color:#c0d5d4; }
.soc-row { justify-content:space-between;min-height:25px;flex-wrap:wrap;font-size:11px; }
.soc-row+.soc-row { border-top:1px solid #426573; }
.soc-row>div { flex-wrap:wrap; }
.soc-entry { align-items:flex-end;margin:5px 0; }
.soc-entry label { flex:1;min-width:0;font-size:10px;color:#d6ecde; }
.soc-entry input { display:block;width:100%;height:25px;box-sizing:border-box;border-radius:5px;border:1px solid #5a8488;background:#f9f6d9;color:#1e363e;padding:2px 5px;font:inherit;font-size:12px; }
.soc-id { display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:4px 0;font-size:11px; }
.soc-id input { width:12ch;border:none;background:transparent;color:#ffdc90;font:inherit;font-weight:700;user-select:all; }
.soc-error { color:#ffd69a; }
.soc-confirm { flex-wrap:wrap;border-color:#d39c55;}
.home-section-head h2 { margin: 0; font-size: 13px; line-height: 18px; font-weight: 900; text-shadow: 0 1px #ffffff99; }
.home-utility { border: 1px solid #315968; border-radius: 6px; background: #fff2d4; width: 22px; height: 22px; padding: 2px; cursor: pointer; }
.home-utility img { width: 16px; height: 16px; }
.home-events { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 6px; min-height: 0; }
.home-season, .home-week { position: relative; display: block; min-width: 0; height: 75px; padding: 0; overflow: hidden; text-align: left; border: 2px solid #304a60; border-radius: 9px; cursor: pointer; color: #fff2ce; box-shadow: inset 0 2px #ffffff35, 0 2px #1b3d4e33; }
.home-season { background: linear-gradient(115deg, #75649c, #454d77); }
.home-event-kicker { position: absolute; left: 9px; top: 6px; font-size: 8px; line-height: 10px; color: #e7d9ed; }
.home-season strong { position: absolute; left: 9px; top: 19px; font-size: 17px; line-height: 21px; font-weight: 900; }
.home-event-copy { position: absolute; left: 9px; top: 41px; font-size: 8px; line-height: 11px; }
.home-season > img { position: absolute; right: 9px; top: 15px; width: 45px; height: 45px; transform: rotate(8deg); opacity: .94; }
.home-event-time { position: absolute; right: 7px; top: 5px; padding: 1px 4px; border-radius: 4px; background: #f6c76a; color: #62482b; font-size: 8px; line-height: 11px; font-weight: 900; }
.home-pass-track { position: absolute; left: 9px; bottom: 8px; height: 4px; width: 72px; border-radius: 3px; background: #263d61; overflow: hidden; }
.home-pass-track i { display: block; height: 100%; background: #ffdc7b; border-radius: 3px; }
.home-pass-level { position: absolute; left: 87px; bottom: 5px; font-size: 8px; line-height: 10px; }
.home-event-link { position: absolute; right: 9px; bottom: 5px; font-size: 8px; line-height: 11px; font-weight: 900; color: #fff0b5; }
.home-week { background: linear-gradient(135deg, #3a827b, #28596e); }
.home-week .home-event-kicker { color: #c3e8dc; }
.home-week > img { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; }
.home-week strong { position: absolute; left: 8px; top: 23px; font-size: 12px; font-weight: 900; line-height: 15px; }
.home-week > span:not(.home-event-kicker) { position: absolute; left: 8px; right: 5px; top: 42px; font-size: 8px; line-height: 10px; color: #d3e7db; }
.home-week span i { font-style: normal; }
.home-week > b { position: absolute; left: 8px; bottom: 5px; font-size: 8px; line-height: 11px; color: #ffe8a7; }
.home-week.selected { border-color: #e3be65; }
.home-week.home-growth { background: linear-gradient(135deg, #a77955, #785160); }
.home-growth strong { font-size: 10px; }
.home-attendance { min-width: 0; border: 2px solid #315965; border-radius: 10px; padding: 6px 7px; background: #fff3d7f2; color: #345b63; box-shadow: inset 0 2px #fffef0, 0 2px #23485330; }
.home-attendance-head { display: flex; justify-content: space-between; align-items: center; height: 28px; gap: 5px; }
.home-attendance-head h3 { font-size: 12px; line-height: 14px; font-weight: 900; margin: 0; }
.home-attendance-head > div > span { display: block; font-size: 8px; line-height: 11px; color: #8a7959; }
.home-attend-claim { height: 25px; padding: 0 8px; border: 1px solid #9b7030; border-radius: 6px; background: #ffd263; color: #694a20; box-shadow: inset 0 1px #fff3b8, inset 0 -2px #d7a147; font-size: 9px; font-weight: 900; white-space: nowrap; cursor: pointer; }
.home-attend-claim:disabled { background: #d7ddc4; border-color: #a1ad92; color: #71816a; box-shadow: none; cursor: default; }
.home-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px; margin-top: 3px; }
.home-day { position: relative; height: 43px; display: flex; flex-direction: column; align-items: center; border: 1px solid #acbca9; border-radius: 5px; background: #e5ecdc; padding: 1px; }
.home-day > span { font-size: 8px; line-height: 10px; color: #78896d; }
.home-day img { width: 17px; height: 17px; margin: 0; }
.home-day b { font-size: 9px; font-weight: 900; line-height: 11px; color: #506b62; }
.home-day b i { font-size: 7px; font-style: normal; margin-left: 1px; }
.home-day.today { background: #ffe3a0; border-color: #c19641; box-shadow: inset 0 0 0 1px #fff1bd; }
.home-day.received { background: #d7e4d1; }
.home-day.received img { opacity: .48; }
.home-day > em { position: absolute; right: -1px; top: -2px; font-size: 9px; line-height: 10px; font-style: normal; color: #fff; background: #6b9b71; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #4b7753; text-align: center; }
.home-daily-links { display: grid; min-height: 0; }
.home-daily { position: relative; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 5px 7px; border: 2px solid #2b5262; border-radius: 8px; color: #f5edce; background: #3b6c7b; box-shadow: inset 0 1px #96b5b84d, 0 2px #23485325; text-align: left; cursor: pointer; }
.home-daily > img { width: 27px; height: 27px; flex: none; }
.home-daily > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.home-daily b { font-size: 10px; line-height: 12px; font-weight: 900; white-space: nowrap; }
.home-daily b em { font-size: 9px; font-style: normal; color: #ffdc80; margin-left: 3px; }
.home-daily small { font-size: 8px; line-height: 10px; color: #c8dfd5; white-space: nowrap; }
.home-daily > i:not(.dot) { margin-left: auto; font-size: 15px; font-style: normal; color: #f9d486; }
.home-daily .dot { right: 4px; top: -3px; }
.home-ready { display: grid; grid-template-rows: 76px minmax(0,1fr); gap: 7px; min-width: 0; min-height: 0; }
.home-guardian { display: grid; grid-template-columns: 69px minmax(0,1fr); align-items: center; gap: 6px; padding: 5px 7px; border: 2px solid #315965; border-radius: 10px; background: #fff4dbf2; color: #315763; box-shadow: inset 0 2px #fffdf0, 0 3px #1d3e4d25; text-align: left; cursor: pointer; min-width: 0; }
.home-guardian-art { height: 63px; border-radius: 8px; background: radial-gradient(ellipse at 50% 82%, #d6dfb1, #cce3d980 65%, transparent 67%); }
.home-guardian-art img { width: 69px; height: 63px; object-fit: contain; object-position: center bottom; }
.home-guardian-copy { display: flex; flex-direction: column; min-width: 0; }
.home-guardian-copy small { color: #8a9279; font-size: 8px; line-height: 10px; }
.home-guardian-copy strong { font-size: 14px; font-weight: 900; line-height: 19px; white-space: nowrap; }
.home-guardian-copy > span { font-size: 8px; line-height: 11px; color: #728b83; }
.home-guardian-copy b { font-size: 9px; font-weight: 900; line-height: 16px; color: #927037; }
.home-run { display: flex; flex-direction: column; gap: 4px; min-height: 0; padding: 7px; border: 2px solid #294e60; border-radius: 10px; background: #285265f0; box-shadow: inset 0 1px #9fbdc53b, 0 3px #1d3e4d25; }
.home-mode-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2px; padding: 2px; background: #153b4e; border-radius: 6px; height: 26px; flex: none; }
.home-mode-tabs button { padding: 1px; border: 0; border-radius: 4px; color: #bad5db; background: transparent; font-size: 9px; line-height: 14px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.home-mode-tabs button.on { background: #ffda7d; color: #6b4a24; box-shadow: inset 0 -2px #d5a148; }
.home-run-info { font-size: 9px; line-height: 13px; margin: 0; min-height: 15px; text-align: center; color: #d7e7dc; white-space: nowrap; }
.home-difficulties { display: flex; align-items: center; justify-content: center; gap: 4px; height: 21px; flex: none; }
.home-difficulties button { flex: 1; padding: 2px 4px; background: #3b6b7a; border: 1px solid #72949a; border-radius: 5px; color: #d9e8dd; font-size: 9px; font-weight: 800; line-height: 13px; cursor: pointer; }
.home-difficulties button.on { background: #ffefb9; border-color: #bc9a51; color: #76562c; }
.home-difficulties > span { font-size: 9px; color: #a9c9cc; }
.home-mode-gem { width:14px; height:14px; object-fit:contain; flex:none; }
.home-mode-amount { font-size:10px; color:#efdc9a; }
.home-loadout { display: flex; align-items: center; gap: 5px; min-width: 0; height: 29px; flex: none; padding: 2px 5px; background: #143b4d; border: 1px solid #4b7480; border-radius: 5px; color: #e8e5c7; text-align: left; cursor: pointer; }
.home-loadout img { width: 23px; height: 23px; flex: none; }
.home-loadout > span { min-width: 0; display: flex; flex-direction: column; font-size: 9px; line-height: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.home-loadout small { font-size: 8px; line-height: 10px; color: #adc9c6; }
.home-loadout > b { margin-left: auto; flex: none; font-size: 8px; color: #f1ce7e; }
.home-start { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; min-height: 40px; padding: 1px 4px 3px; border: 2px solid #58472c; border-radius: 9px; background: linear-gradient(#ffeaa1,#ffd363 45%,#f3b635); box-shadow: inset 0 2px #fff5ca, inset 0 -4px #ce9230, 0 2px #183c4c; color: #62451f; cursor: pointer; }
.home-start strong { font-size: 19px; line-height: 23px; font-weight: 900; }
.home-start strong i { font-size: 10px; font-style: normal; }
.home-start > span { font-size: 8px; line-height: 10px; color: #92713b; }
/* Dedicated guardian view; original sprites are never stretched. */
.guardian-help { font-size: 9px; color: #bbd6dc; }
.guardian-selection { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(182px,1fr); gap: 8px; flex: 1; min-height: 0; }
.guardian-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 6px; min-height: 0; }
.guardian-choice { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px; min-width: 0; min-height: 0; background: linear-gradient(#dcebe4,#abcfd1); border: 2px solid #658c96; border-radius: 9px; color: #365d6a; box-shadow: inset 0 1px #ffffffba, inset 0 -3px #85aeb8; cursor: pointer; }
.guardian-choice-state { font-size: 8px; line-height: 11px; color: #748d87; flex: none; }
.guardian-choice img { width: 100%; height: 55px; min-height: 0; flex: 1; object-fit: contain; object-position: center bottom; }
.guardian-choice strong { font-size: 11px; line-height: 14px; font-weight: 900; flex: none; }
.guardian-choice small { font-size: 8px; line-height: 11px; color: #6b8581; flex: none; }
.guardian-choice.on { background: linear-gradient(#fff0bb,#f1cb7c); border-color: #c49845; box-shadow: inset 0 0 0 1px #ffefb7,inset 0 -3px #d3a759; }
.guardian-choice.on .guardian-choice-state { color: #947030; font-weight: 900; }
.guardian-choice:disabled { opacity: .45; cursor: default; }
.guardian-detail { display: flex; flex-direction: column; min-height: 0; overflow: auto; gap: 4px; padding: 7px; background: #f9efd6; border: 2px solid #4d7480; border-radius: 9px; color: #496b71; }
.guardian-detail-title { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; flex: none; }
.guardian-detail-title > span { font-size: 8px; color: #849180; }
.guardian-detail h2 { margin: 0; font-size: 14px; line-height: 18px; font-weight: 900; color: #315767; }
.guardian-skill { display: flex; align-items: center; gap: 6px; flex: none; }
.guardian-skill img { width: 23px; height: 23px; }
.guardian-skill > span { display: flex; flex-direction: column; }
.guardian-skill small { font-size: 8px; line-height: 10px; color: #8a927d; }
.guardian-skill b { font-size: 11px; line-height: 14px; font-weight: 900; }
.guardian-detail > p { margin: 0; font-size: 9px; line-height: 12px; color: #637b77; word-break: keep-all; flex: none; }
.guardian-detail > h3 { margin: 0; font-size: 9px; line-height: 13px; font-weight: 900; flex: none; }
.guardian-supers { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; flex: none; }
.guardian-supers button { padding: 2px 0; background: #d7e6dc; border: 1px solid #9caf9c; border-radius: 5px; color: #5d766b; cursor: pointer; }
.guardian-supers img { display: block; width: 22px; height: 22px; margin: auto; }
.guardian-supers span { display: block; font-size: 8px; line-height: 11px; }
.guardian-supers button.on { background: #f5d88f; border-color: #b28c3f; color: #87662d; box-shadow: inset 0 0 0 1px #ffedb2; }
.guardian-supers button:disabled { opacity: .45; cursor: default; }
.companion-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; flex:none; }
.companion-choices button { min-height:26px; padding:2px; border:1px solid #a7b7a4; border-radius:5px; color:#34545b; background:#e5ece0; font:inherit; font-size:8px; line-height:1.15; cursor:pointer; }
.companion-choices button[aria-pressed="true"] { border-color:#a36b24; background:#ffda89; box-shadow:inset 0 0 0 1px #fff0bc; }
.companion-choices img { display:block; width:26px; height:25px; margin:auto; }
.battle-loading { position:absolute; inset:0; z-index:900; display:grid; place-items:center; background:rgba(9,30,43,.72); color:#fff5ce; touch-action:none; }
.battle-loading > div { width:156px; padding:15px; border:2px solid #6ba4ae; border-radius:10px; background:#204655; text-align:center; box-shadow:0 4px 0 #102e3c; }
.battle-loading strong { font-size:13px; }
.load-track { margin-top:9px; height:6px; overflow:hidden; border-radius:4px; background:#102a34; }
.load-track i { display:block; width:40%; height:100%; background:#ffce68; border-radius:4px; animation:battle-load 1s ease-in-out infinite alternate; }
@keyframes battle-load { to { transform:translateX(150%); } }
@media (prefers-reduced-motion:reduce) { .load-track i { animation:none; width:100%; opacity:.7; } }
.guardian-super-desc { font-size: 8px; line-height: 11px; color: #8f805e; min-height: 22px; flex: none; }
.guardian-confirm { min-height: 27px; margin-top: auto; padding: 3px 8px; font-size: 10px; line-height: 15px; font-weight: 900; color: #695124; background: #f7d37e; border: 1px solid #ac863a; border-radius: 6px; box-shadow: inset 0 1px #fff0b7,inset 0 -2px #d1a24e; cursor: pointer; flex: none; }

/* Permanent staged research (battle speed): current effect, next effect and all three steps. */
.lab-features { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.lab-features > :only-child { grid-column:1 / -1; }
.lab-feature { min-width:0; padding:8px; border:1px solid #dcb86f; border-radius:9px; background:linear-gradient(145deg,#294a58,#193746); box-shadow:inset 0 1px #ffffff20; }
.lab-feature-head { display:flex; align-items:center; gap:6px; }
.lab-feature-head > svg { width:24px; height:24px; flex:0 0 24px; fill:none; stroke:#ffe1a0; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.lab-feature-head > div { min-width:0; flex:1; display:flex; flex-direction:column; gap:3px; }
.lab-feature-head > div > b { color:#fff0c6; overflow-wrap:anywhere; }
.lab-feature-head > button { flex:0 0 auto; }
.lab-feature .lab-effect { color:#d7edf0; margin:6px 0; }
.lab-feature .lab-effect strong { color:#a9efba; }
.lab-feature p { margin:5px 0; line-height:1.35; overflow-wrap:anywhere; }
.lab-stages { list-style:none; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; margin:8px 0 0; padding:0; }
.lab-stages li { min-width:0; display:flex; flex-direction:column; gap:4px; padding:5px; border:1px solid #ffffff28; border-radius:5px; background:#0c263466; line-height:1.35; overflow-wrap:anywhere; }
.lab-stages li > span { color:#a6c2cc; }
.lab-stages li > b { color:#e3edf1; font-weight:600; }
.lab-stages li > small { color:#b4c9cb; font-size:8px; }
.lab-stages .next { border-color:#f5ca75; background:#65522650; }
.lab-stages .done { border-color:#6ab999; background:#1b6e5140; }
@media (max-width:640px) { .lab-features { grid-template-columns:1fr; } }
