/* ===================== v4: Rise-of-Kingdoms-style minimalist HUD, dice duels ===================== */
body.v4 #stage { background: radial-gradient(1200px 700px at 50% 40%, #1d1a4a 0%, #120f34 55%, #070618 100%); }
.v4 .hud-profile { position: fixed; z-index: 20; top: 12px; left: 12px; display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 40px; background: linear-gradient(180deg, rgba(22,23,33,.94), rgba(12,13,20,.94)); box-shadow: var(--shadow); text-align: left; max-width: calc(100vw - 24px); }
.hp-avatar { position: relative; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #1d1e2c; flex: none; }
.hp-avatar img { width: 100%; height: 100%; object-fit: cover; } .hp-avatar svg { width: 30px; color: #8c8ea8; }
.hp-ring { position: absolute; left: 3px; top: 3px; width: 64px; height: 64px; transform: rotate(-90deg); pointer-events: none; }
.hp-ring circle { fill: none; stroke-width: 4; } .hp-ring .bg { stroke: #2a2b3d; } .hp-ring .fg { stroke: #f6c453; stroke-dasharray: 182; stroke-dashoffset: 182; stroke-linecap: round; transition: stroke-dashoffset .6s; }
.hp-lv { position: absolute; left: 46px; top: 46px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; background: linear-gradient(#ffe488, #d98a12); color: #2b1a00; font: 800 13px var(--ui); display: grid; place-items: center; box-shadow: 0 0 0 2px #0c0d14; }
.hp-txt { display: grid; min-width: 0; } .hp-txt b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; } .hp-txt small { font-size: 12px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.hp-xp { display: block; height: 5px; width: 160px; border-radius: 3px; background: #0c0d14; margin-top: 4px; overflow: hidden; } .hp-xp i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2fbf4f, #b6ff6a); }
.hud-res { position: fixed; z-index: 20; top: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.res { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 4px; border-radius: 20px; background: rgba(10,11,17,.88); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 6px 14px rgba(0,0,0,.35); font-weight: 800; font-size: 15px; white-space: nowrap; }
.res .ri { width: 32px; height: 32px; display: grid; place-items: center; } .res .ri svg { width: 26px; height: 26px; } .res .ri .coinflag { width: 26px; height: 19px; }
.res.gems { padding-right: 4px; } .res .plus { width: 30px; height: 30px; margin-left: 4px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #6cf07f, #1f9a3a 70%); color: #fff; font-size: 20px; font-weight: 800; }
.hud-tools { position: fixed; z-index: 20; top: 14px; right: 12px; display: flex; gap: 6px; }
.chatbox { position: fixed; z-index: 15; left: 12px; bottom: 96px; width: 340px; height: 300px; display: flex; flex-direction: column; border-radius: 16px; background: rgba(10,11,17,.86); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 10px 26px rgba(0,0,0,.4); overflow: hidden; }
.chatbox.min { height: 40px; } .chatbox.min .cb-list, .chatbox.min .cb-form { display: none; }
.cb-head { display: flex; gap: 4px; padding: 6px; } .cb-head button { height: 28px; padding: 0 12px; border-radius: 14px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-head button.on { background: #26273a; color: #fff; } .cb-head .cb-min { margin-left: auto; }
.cb-list { flex: 1; overflow: auto; padding: 4px 10px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; overscroll-behavior: contain; }
.cb-msg img, .cb-ev img { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; display: inline-block; vertical-align: -2px; margin-right: 5px; cursor: pointer; }
.cb-msg b { color: var(--gold); margin-right: 4px; }
.cb-ev { padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.05); box-shadow: inset 3px 0 0 #5fd4ff; font-size: 12px; }
.cb-ev.war { box-shadow: inset 3px 0 0 #ff4d5e; } .cb-ev.incident { box-shadow: inset 3px 0 0 #ff9a3c; } .cb-ev.discovery, .cb-ev.resolved { box-shadow: inset 3px 0 0 #3ee08a; }
.cb-form { display: flex; gap: 6px; padding: 6px; } .cb-form .input { height: 34px; font-size: 13px; }
.top10 { position: fixed; z-index: 15; right: 12px; top: 72px; width: 250px; border-radius: 16px; background: rgba(10,11,17,.86); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 10px 26px rgba(0,0,0,.4); padding: 8px; }
.t10-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 6px 6px; } .t10-head b { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 14px; color: var(--gold); } .t10-head span { font-size: 11px; color: var(--muted); }
.t10-row { display: grid; grid-template-columns: 20px 24px 1fr auto; align-items: center; gap: 8px; width: 100%; padding: 4px 6px; border-radius: 8px; text-align: left; font-size: 13px; }
.t10-row:hover { background: rgba(255,255,255,.05); } .t10-row img { width: 24px; height: 17px; border-radius: 2px; object-fit: cover; } .t10-n { color: var(--muted); font-weight: 800; } .t10-c { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .t10-row.me { background: #26213f; margin-top: 6px; }
.t10-you { width: 100%; margin-top: 4px; font-size: 11px; color: var(--gold); text-align: left; padding: 2px 6px; }
.roll-cta { position: fixed; z-index: 16; left: 50%; bottom: 96px; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; }
.roll-btn { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 30px 0 16px; border-radius: 32px; color: #2b1a00; background: linear-gradient(180deg, #fff1a8 0%, #ffd23f 45%, #f0a20f 100%); box-shadow: inset 0 -4px 0 rgba(120,60,0,.4), inset 0 2px 0 rgba(255,255,255,.7), 0 10px 30px rgba(255,190,40,.45), 0 0 0 3px #2b1a00; animation: rollPulse 2.4s ease-in-out infinite; text-align: left; }
.roll-btn b { display: block; font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .03em; } .roll-btn small { display: block; font-size: 12px; font-weight: 700; opacity: .75; }
.roll-btn .dice-ico svg { width: 40px; height: 40px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.4)); }
.roll-btn[disabled] { filter: grayscale(.7); animation: none; opacity: .6; }
.roll-btn.big { width: 100%; justify-content: center; margin-top: 12px; }
@keyframes rollPulse { 50% { transform: scale(1.04); box-shadow: inset 0 -4px 0 rgba(120,60,0,.4), inset 0 2px 0 rgba(255,255,255,.7), 0 12px 40px rgba(255,190,40,.7), 0 0 0 3px #2b1a00; } }
.roll-chips { display: flex; gap: 6px; } .roll-chips button { height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(10,11,17,.86); font-size: 12px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.hud-bottom { position: fixed; z-index: 20; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 6px; padding: 6px 10px; border-radius: 24px; background: linear-gradient(180deg, rgba(24,25,35,.96), rgba(13,14,21,.98)); box-shadow: var(--shadow); }
.hb { position: relative; display: grid; justify-items: center; gap: 2px; width: 68px; padding: 6px 0; border-radius: 16px; color: #e6e7f2; }
.hb span { width: 30px; height: 30px; display: grid; place-items: center; font-size: 22px; } .hb span svg { width: 26px; height: 26px; } .hb small { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.hb:hover { background: rgba(255,255,255,.05); } .hb .hbflag { width: 30px; height: 22px; border-radius: 4px; object-fit: cover; }
.hb-roll { width: 76px; margin-top: -24px; } .hb-roll span { width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(180deg, #fff1a8, #f0a20f); box-shadow: 0 0 0 3px #2b1a00, 0 6px 16px rgba(255,190,40,.5); } .hb-roll span svg { width: 34px; height: 34px; }
.shield-ico svg { width: 28px; height: 28px; } .hb-menu .badge-dot { position: absolute; top: 2px; right: 10px; }
.gamemenu { position: fixed; z-index: 30; right: 12px; bottom: 92px; width: 240px; padding: 8px; border-radius: 18px; background: linear-gradient(180deg, #1f2030, #14151e); box-shadow: 0 0 0 1.5px #3a2c66, 0 20px 50px rgba(0,0,0,.6); display: grid; gap: 2px; max-height: calc(100dvh - 120px); overflow: auto; }
.gamemenu.hidden { display: none; } .gamemenu button { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border-radius: 10px; font-weight: 700; text-align: left; } .gamemenu button:hover { background: #26273a; } .gamemenu span { width: 24px; text-align: center; }
body.v4.focus .roll-cta { display: none; }
.v4 .sheet { bottom: 96px; max-height: 42vh; }
.terr-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 8px; scrollbar-width: thin; }
.terr { flex: none; display: grid; gap: 3px; min-width: 150px; padding: 8px 10px; border-radius: 12px; background: #181924; box-shadow: inset 0 0 0 1px var(--line); text-align: left; }
.terr .tn { font-weight: 800; font-size: 13px; } .terr .tg { font-size: 12px; color: var(--muted); }
.terr.att { box-shadow: inset 0 0 0 1.5px #ff4d5e; } .terr.occ { background: #3a1218; box-shadow: inset 0 0 0 1.5px #ff4d5e; }
.terr .tp { height: 6px; border-radius: 3px; background: #0c0d14; overflow: hidden; } .terr .tp i { display: block; height: 100%; background: linear-gradient(90deg, #ff4d5e, #ff9a3c); } .terr .tpl { font-size: 11px; color: #ff9aa4; }
.v4 .sheet-actions { padding: 0 14px 14px; margin-top: 2px; }
/* duel */
.duel-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .duel-types button { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; background: #181924; font-size: 12px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); } .duel-types span { font-size: 22px; } .duel-types .on { background: #2a2148; box-shadow: inset 0 0 0 1.5px var(--gold); }
.duel-targets { display: grid; gap: 6px; max-height: 34vh; overflow: auto; } .duel-targets button { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: #181924; text-align: left; box-shadow: inset 0 0 0 1px var(--line); } .duel-targets .on { box-shadow: inset 0 0 0 1.5px var(--gold); } .duel-targets img { width: 32px; height: 24px; border-radius: 3px; object-fit: cover; } .duel-targets small { display: block; color: var(--muted); font-size: 12px; }
.vs-scrim { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, rgba(60,20,100,.85), rgba(4,4,12,.96)); animation: fade .2s; padding: 12px; }
.vs { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; width: min(860px, 100%); }
.vs-side { display: grid; justify-items: center; gap: 6px; text-align: center; animation: slideIn .5s cubic-bezier(.2,.9,.2,1.1); }
.vs-side.r { animation-name: slideInR; } .vs-side img { width: 120px; height: 90px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 10px 30px rgba(0,0,0,.6); }
.vs-side b { font-family: var(--display); font-weight: 400; font-size: 22px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vs-side small { color: var(--muted); }
.vs-side.victor img { box-shadow: 0 0 0 4px var(--gold), 0 0 40px rgba(246,196,83,.8); }
@keyframes slideIn { from { transform: translateX(-60vw); } } @keyframes slideInR { from { transform: translateX(60vw); } }
.vs-mid { font-family: var(--display); font-size: 64px; color: var(--gold); text-shadow: 0 0 30px rgba(246,196,83,.8), 0 4px 0 #7a4a08; animation: slam .5s .35s both cubic-bezier(.2,1.6,.4,1); }
@keyframes slam { from { transform: scale(4); opacity: 0; } }
.dice { display: flex; gap: 14px; margin: 10px 0 4px; perspective: 600px; }
.die3 { width: 54px; height: 54px; } .cube { position: relative; width: 54px; height: 54px; transform-style: preserve-3d; transition: transform 1.4s cubic-bezier(.15,.85,.25,1); }
.face { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px; border-radius: 10px; background: linear-gradient(145deg, #ffffff, #e2ddd2); box-shadow: inset 0 0 0 1px #c9c2b2, inset -3px -3px 6px rgba(0,0,0,.15); backface-visibility: hidden; }
.face i { margin: 2px; border-radius: 50%; } .face i.p { background: radial-gradient(circle at 35% 35%, #555, #111); }
.f1 { transform: translateZ(27px); } .f6 { transform: rotateY(180deg) translateZ(27px); } .f2 { transform: rotateY(90deg) translateZ(27px); } .f5 { transform: rotateY(-90deg) translateZ(27px); } .f3 { transform: rotateX(90deg) translateZ(27px); } .f4 { transform: rotateX(-90deg) translateZ(27px); }
.mods { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; min-height: 22px; } .mods span { padding: 2px 8px; border-radius: 10px; background: #2a2148; font-size: 11px; font-weight: 800; color: var(--gold); opacity: 0; transform: translateY(8px); transition: .3s; } .mods span.in { opacity: 1; transform: none; }
.tot { font-family: var(--display); font-size: 48px; } .vs-side.victor .tot { color: var(--gold); }
.vs-result { grid-column: 1 / -1; text-align: center; padding: 14px; border-radius: 18px; background: rgba(10,11,17,.9); animation: pop .3s; } .vs-result h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 40px; } .vs-result.won h2 { color: var(--gold); } .vs-result.lost h2 { color: #ff6b7a; } .vs-result p { color: #ddd; }
@media (max-width: 760px) {
  .v4 .hud-profile { top: 8px; left: 8px; padding: 4px 12px 4px 4px; } .hp-avatar { width: 46px; height: 46px; } .hp-ring { width: 52px; height: 52px; left: 1px; top: 1px; } .hp-lv { left: 34px; top: 34px; min-width: 20px; height: 20px; font-size: 11px; }
  .hp-txt b { font-size: 15px; max-width: 150px; } .hp-txt small { max-width: 160px; font-size: 11px; } .hp-xp { width: 110px; }
  .hud-tools { top: 12px; right: 8px; } .hud-tools .round.sm { width: 36px; height: 36px; }
  .hud-res { top: 70px; left: 8px; right: 8px; transform: none; overflow-x: auto; scrollbar-width: none; } .hud-res::-webkit-scrollbar { display: none; } .res { height: 34px; font-size: 13px; padding-right: 10px; flex: none; } .res .ri { width: 26px; height: 26px; } .res .plus { width: 26px; height: 26px; }
  .top10 { display: none; }
  .chatbox { left: 8px; right: 8px; width: auto; bottom: 88px; height: 230px; } .chatbox.min { width: 150px; right: auto; }
  .roll-cta { bottom: 140px; } .roll-btn { height: 56px; padding: 0 22px 0 12px; } .roll-btn b { font-size: 19px; } .roll-chips { display: none; }
  body.v4 .chatbox:not(.min) ~ .roll-cta { display: none; }
  .hud-bottom { left: 6px; right: 6px; transform: none; justify-content: space-around; bottom: 6px; padding: 4px; }
  .hb { width: auto; flex: 1; } .hb-roll { flex: 1.2; }
  .gamemenu { right: 8px; left: 8px; width: auto; bottom: 84px; grid-template-columns: 1fr 1fr; }
  .v4 .sheet { bottom: 84px; max-height: 46dvh; }
  .vs { grid-template-columns: 1fr; gap: 6px; } .vs-mid { font-size: 40px; } .vs-side img { width: 84px; height: 63px; } .vs-side b { font-size: 18px; } .tot { font-size: 34px; } .die3, .cube { width: 44px; height: 44px; }
  .f1 { transform: translateZ(22px); } .f6 { transform: rotateY(180deg) translateZ(22px); } .f2 { transform: rotateY(90deg) translateZ(22px); } .f5 { transform: rotateY(-90deg) translateZ(22px); } .f3 { transform: rotateX(90deg) translateZ(22px); } .f4 { transform: rotateX(-90deg) translateZ(22px); }
  .vs-result h2 { font-size: 30px; } .duel-types { grid-template-columns: repeat(2, 1fr); }
}
.roll-btn b { white-space: nowrap; } .roll-btn small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
@media (max-width: 760px) { .roll-btn small { max-width: 190px; } .chatbox.min { width: 210px; } .cb-head button { padding: 0 8px; } }
@media (max-width: 760px) { .vs-scrim { place-items: start center; overflow: auto; padding-top: 16px; } .vs-side { gap: 2px; } .vs-side img { width: 72px; height: 54px; } .dice { margin: 4px 0 0; } .tot { font-size: 30px; } .vs-mid { font-size: 32px; } .vs-result { padding: 10px; } }

.gamemenu span.mb { width: 34px; height: 34px; display: grid; place-items: center; } .roll-chips button { display: inline-flex; align-items: center; gap: 5px; } .roll-chips button svg { flex: none; }

/* ---- badge icons (no emoji anywhere) ---- */
img.ic { width: 1.25em; height: 1.25em; vertical-align: -.28em; display: inline-block; flex: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); user-select: none; }
.res .ri img.ic { width: 26px; height: 26px; vertical-align: middle; }
.hud-bottom .hb > span img.ic { width: 30px; height: 30px; }
.dice-ico img.ic { width: 44px; height: 44px; }
.chip-war { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; background: rgba(196,18,43,.18); color: #ff9aa4; font-weight: 800; font-size: 13px; box-shadow: inset 0 0 0 1px rgba(255,59,74,.45); }
.boot-inner #bootLogo .logo-img { width: 150px; height: 150px; filter: drop-shadow(0 10px 30px rgba(155,92,255,.55)); animation: logoIn .9s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes logoIn { from { transform: scale(.6) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- guest: support your nation ---- */
.roll-cta.guest { gap: 10px; }
.roll-cta .g-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px; border-radius: 16px; background: rgba(14,9,36,.88); box-shadow: inset 0 0 0 1px rgba(168,117,255,.35), 0 10px 30px rgba(0,0,0,.4); backdrop-filter: blur(8px); }
.roll-cta .g-stats span { display: grid; justify-items: center; min-width: 72px; gap: 1px; }
.roll-cta .g-stats img.ic { width: 26px; height: 26px; }
.roll-cta .g-stats b { font-family: var(--display); font-weight: 400; font-size: 17px; color: #fff; line-height: 1.1; }
.roll-cta .g-stats small { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #b9a8e6; }
.support-btn { background: linear-gradient(180deg, #e4d2ff 0%, #a875ff 45%, #6a2ee0 100%); color: #fff; box-shadow: inset 0 -4px 0 rgba(40,10,90,.45), inset 0 2px 0 rgba(255,255,255,.6), 0 10px 30px rgba(155,92,255,.55), 0 0 0 3px #1c0b45; }
.support-btn b { text-shadow: 0 2px 0 rgba(30,0,70,.5); } .support-btn small { opacity: .9; }
.support-btn .sflag { width: 46px; height: 32px; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(0,0,0,.4); }
@media (max-width: 760px) { .roll-cta.guest { bottom: 140px; } .roll-cta .g-stats span { min-width: 58px; } .roll-cta .g-stats b { font-size: 14px; } }
body.v4 .chatbox:not(.min) ~ .roll-cta.guest { display: grid; }
/* events: Help */
.cb-ev { display: flex; align-items: center; gap: 6px; } .cb-ev span { flex: 1; min-width: 0; } .cb-ev img.evf { width: 18px; height: 13px; border-radius: 2px; }
.ev-help { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 11px; font-weight: 800; color: #062a14; background: linear-gradient(180deg, #b6ffd0, #3ccf74); box-shadow: inset 0 -2px 0 rgba(0,60,20,.35); }
.ev-help img.ic { width: 16px; height: 16px; } .ev-help.done { background: rgba(60,207,116,.2); color: #9df0b8; }
/* one-click harvest */
.harvest1 { display: grid; justify-items: center; gap: 14px; text-align: center; }
.harvest1 .field { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: 240px; height: 90px; padding: 10px; border-radius: 14px; background: linear-gradient(180deg, #3a1f6e, #1a0f3a); }
.harvest1 .field i { border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #ffe08a, #d98a14); transform-origin: bottom; transition: transform .5s cubic-bezier(.5,0,.3,1); }
.harvest1 .field.cut i { transform: scaleY(.15); } .harvest1 .field.cut i:nth-child(odd) { transition-delay: .08s; }
.harvest1 .hv-row { display: flex; gap: 22px; } .harvest1 .hv-row span { display: grid; justify-items: center; } .harvest1 .hv-row img.ic { width: 34px; height: 34px; }
.harvest1 .hv-row b { font-family: var(--display); font-weight: 400; font-size: 18px; } .harvest1 .hv-row small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #b9a8e6; font-weight: 800; }
.harvest1 .hv-go { min-width: 220px; justify-content: center; gap: 8px; } .harvest1.done .hv-big { animation: logoIn .6s both; }
.vs-result.draw h2 { color: #c9a6ff; }
/* touch: how to move the map */
#map2d, #globe canvas { touch-action: none; }
.map-hint { position: fixed; z-index: 60; left: 50%; top: 44%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 18px; background: rgba(14,9,36,.92); box-shadow: inset 0 0 0 1px rgba(168,117,255,.45), 0 16px 40px rgba(0,0,0,.5); pointer-events: none; transition: opacity .35s; }
.map-hint.out { opacity: 0; }
.map-hint .mh-t { display: grid; gap: 2px; } .map-hint b { font-family: var(--display); font-weight: 400; font-size: 18px; } .map-hint span { font-size: 13px; color: #d9c8ff; } .map-hint small { font-size: 11px; color: #a998d6; }
.mh-hand { position: relative; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle, rgba(168,117,255,.35), transparent 70%); }
.mh-hand i { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(255,255,255,.25); animation: mhDrag 1.6s ease-in-out infinite; }
@keyframes mhDrag { 0% { transform: translateX(-14px); } 50% { transform: translateX(14px); } 100% { transform: translateX(-14px); } }
/* resource bar: each resource its own colour (Rise-of-Kingdoms style) */
.hud-res .res { position: relative; padding-left: 40px !important; border-radius: 10px; background: linear-gradient(180deg, rgba(12,10,26,.92), rgba(28,22,50,.92)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 -2px 0 rgba(0,0,0,.4); }
.hud-res .res .ri { position: absolute; left: -4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; background: none !important; box-shadow: none !important; }
.hud-res .res img.resic { width: 38px; height: 38px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.hud-res .res b { font-family: var(--display); font-weight: 400; letter-spacing: .02em; }
.hud-res .res.money b { color: #ffe27a; } .hud-res .res.sold b { color: #ffb3ba; } .hud-res .res.pop b { color: #9fdcff; } .hud-res .res.power b { color: #d9b8ff; } .hud-res .res.gems b { color: #ff9ab4; }
.hud-res .res.money { box-shadow: inset 0 0 0 1px rgba(255,207,58,.35), inset 0 -2px 0 rgba(0,0,0,.4); } .hud-res .res.sold { box-shadow: inset 0 0 0 1px rgba(255,90,110,.35), inset 0 -2px 0 rgba(0,0,0,.4); }
.hud-res .res.pop { box-shadow: inset 0 0 0 1px rgba(79,182,255,.35), inset 0 -2px 0 rgba(0,0,0,.4); } .hud-res .res.power { box-shadow: inset 0 0 0 1px rgba(181,123,255,.4), inset 0 -2px 0 rgba(0,0,0,.4); }
.hud-res .res.gems { box-shadow: inset 0 0 0 1px rgba(255,59,107,.4), inset 0 -2px 0 rgba(0,0,0,.4); }
/* centre mission button */
.roll-btn.mission { min-width: 330px; padding-right: 22px; }
.roll-btn.mission .mtxt { display: grid; gap: 3px; flex: 1; min-width: 0; }
.roll-btn.mission b { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roll-btn.mission small em { font-style: normal; font-weight: 900; }
.mbar { position: relative; display: block; height: 10px; margin-right: 18px; border-radius: 6px; background: rgba(40,20,0,.35); box-shadow: inset 0 1px 2px rgba(0,0,0,.45); }
.mbar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(180deg, #8ff0a8, #22a656); box-shadow: 0 0 8px rgba(60,207,116,.6); transition: width .6s; }
.mbar img.resic { position: absolute; right: -20px; top: 50%; width: 30px; height: 30px; transform: translateY(-50%); filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.mlist { display: grid; gap: 10px; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(168,117,255,.25); text-align: left; }
.mrow .mtxt { display: grid; gap: 4px; flex: 1; } .mrow b { font-size: 15px; } .mrow small { color: #b9a8e6; font-size: 12px; } .mrow small em { color: #fff; font-style: normal; font-weight: 800; }
.mrow .mbar { background: rgba(255,255,255,.08); } .mrow.done { box-shadow: inset 0 0 0 1px rgba(60,207,116,.6); }
@media (max-width: 760px) { .roll-btn.mission { min-width: 0; width: calc(100vw - 32px); } .roll-btn.mission b { font-size: 16px; } .hud-res .res .ri { left: 0; } }
/* new rank */
.rank-pop { position: fixed; z-index: 120; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; width: min(340px, 90vw); padding: 26px 22px 20px; border-radius: 22px; text-align: center; background: radial-gradient(circle at 50% 20%, #3b1a7a, #140a34 70%); box-shadow: inset 0 0 0 2px rgba(255,207,58,.55), 0 30px 80px rgba(0,0,0,.6), 0 0 80px rgba(255,190,40,.25); animation: logoIn .55s cubic-bezier(.2,.9,.3,1.3) both; }
.rank-pop .rp-badge { animation: rpSpin 1.2s ease-out both; filter: drop-shadow(0 0 24px rgba(255,200,60,.7)); }
@keyframes rpSpin { from { transform: rotateY(540deg) scale(.4); } to { transform: none; } }
.rank-pop b { font-family: var(--display); font-weight: 400; font-size: 26px; color: #ffe27a; } .rank-pop span { color: #e9e2ff; } .rank-pop em { font-style: normal; font-weight: 900; color: #fff; } .rank-pop small { color: #9df0b8; font-weight: 700; }
.rank-pop.down b { color: #d9c8ff; }
/* badge detail */
.tg { cursor: pointer; } .badge-info { display: grid; justify-items: center; gap: 8px; text-align: center; } .badge-info b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.badge-info .bi-feat { padding: 8px 12px; border-radius: 10px; background: rgba(168,117,255,.15); color: #fff; font-weight: 700; }
.badge-info dl { display: grid; grid-template-columns: auto auto; gap: 4px 16px; margin: 6px 0 0; font-size: 13px; } .badge-info dt { color: #a998d6; text-align: right; } .badge-info dd { margin: 0; text-align: left; font-weight: 700; }
/* Total Power — separate identity element under the profile */
.hud-power { position: fixed; z-index: 20; top: 86px; left: 14px; display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 14px; background: linear-gradient(180deg, rgba(40,20,80,.95), rgba(16,10,36,.95)); box-shadow: inset 0 0 0 1px rgba(255,207,58,.45), 0 8px 20px rgba(0,0,0,.4); }
.hud-power .pw-ic img.resic { width: 34px; height: 34px; filter: drop-shadow(0 0 8px rgba(255,210,63,.6)); }
.hud-power .pw-ic { width: 34px; height: 34px; background-image: none !important; } .x-old { background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23ffd23f' stroke='%235a3204' stroke-width='1.2' d='M13 1L3 14h7l-1 9 11-14h-7z'/></svg>") center/contain no-repeat; filter: drop-shadow(0 0 8px rgba(255,210,63,.7)); }
.hud-power .pw-t, .hud-power .pw-w { display: grid; line-height: 1; text-align: left; }
.hud-power small { font-size: 10px; font-weight: 900; letter-spacing: .14em; color: #ffd23f; }
.hud-power .pw-t b { font-family: var(--display); font-weight: 400; font-size: 24px; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.hud-power .pw-w { padding-left: 10px; border-left: 1px solid rgba(255,255,255,.12); } .hud-power .pw-w small { color: #b9a8e6; } .hud-power .pw-w b { font-family: var(--display); font-weight: 400; font-size: 15px; color: #d9c8ff; }
.pw-float { position: absolute; left: 50%; top: 0; transform: translateX(-50%); font-family: var(--display); font-size: 18px; color: #9df0b8; text-shadow: 0 2px 0 #000; white-space: nowrap; animation: pwFloat 1.8s ease-out forwards; pointer-events: none; }
@keyframes pwFloat { from { opacity: 0; transform: translate(-50%, 10px); } 20% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -40px); } }
.pbig { display: grid; justify-items: center; margin-bottom: 10px; } .pbig small { font-size: 11px; font-weight: 900; letter-spacing: .16em; color: #ffd23f; } .pbig b { font-family: var(--display); font-weight: 400; font-size: 44px; }
.pbrow { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid rgba(255,255,255,.07); } .pbrow span { display: grid; flex: 1; } .pbrow small { color: #a998d6; font-size: 12px; } .pbrow em { font-style: normal; font-family: var(--display); font-size: 18px; }
.pweek { margin-top: 12px; padding: 12px; border-radius: 12px; background: rgba(168,117,255,.1); } .pweek div { display: flex; justify-content: space-between; align-items: baseline; } .pweek small { font-size: 11px; font-weight: 900; letter-spacing: .12em; color: #d9b8ff; } .pweek b { font-family: var(--display); font-weight: 400; font-size: 22px; } .pweek p { margin: 6px 0 0; font-size: 12px; color: #b9a8e6; }
@media (max-width: 760px) { .hud-power { top: 64px; left: 8px; padding: 4px 10px 4px 6px; } .hud-power .pw-t b { font-size: 18px; } .v4 .hud-res { top: 112px; } }
/* faster, simpler boot */
#boot { background: radial-gradient(600px 420px at 50% 42%, #2a1670 0%, #0b0820 70%) !important; }
.boot-earth { display: none !important; }
/* onboarding */
.welcome2 { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 40%, rgba(60,24,140,.85), rgba(6,4,18,.94)); animation: fadeIn .4s both; }
@keyframes fadeIn { from { opacity: 0; } }
.w2-card { display: grid; justify-items: center; gap: 10px; width: min(560px, 100%); text-align: center; }
.w2-flag { width: 96px; height: 64px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 3px #fff, 0 10px 40px rgba(155,92,255,.7); animation: logoIn .7s both; }
.w2-card h2 { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 7vw, 46px); color: #ffe27a; text-shadow: 0 3px 0 rgba(0,0,0,.5), 0 0 30px rgba(255,190,40,.5); }
.w2-card p { margin: 0; color: #e9e2ff; font-size: 16px; line-height: 1.5; }
.w2-sub { margin-top: 10px; font-size: 12px; font-weight: 900; letter-spacing: .2em; color: #b9a8e6; }
.w2-items { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; }
.w2-it { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(168,117,255,.3); opacity: 0; animation: w2In .5s var(--d) cubic-bezier(.2,.9,.3,1.3) forwards; }
.w2-it b { font-family: var(--display); font-weight: 400; font-size: 18px; } .w2-it small { font-size: 10px; font-weight: 800; color: #b9a8e6; text-transform: uppercase; letter-spacing: .05em; }
@keyframes w2In { from { opacity: 0; transform: translateY(16px) scale(.7); } to { opacity: 1; transform: none; } }
.w2-go { margin-top: 12px; min-width: 260px; justify-content: center; } .w2-skip { color: #a998d6; font-size: 13px; text-decoration: underline; }
.w2-fly { position: fixed; z-index: 140; transition: transform .8s cubic-bezier(.5,0,.3,1), opacity .8s; pointer-events: none; }
.res.bump { animation: bump .5s; } @keyframes bump { 40% { transform: scale(1.15); } }
@media (max-width: 560px) { .w2-items { grid-template-columns: repeat(3, 1fr); } }
#guide { position: fixed; z-index: 25; left: 50%; top: 140px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: min(560px, calc(100vw - 24px)); padding: 10px 12px; border-radius: 16px; background: linear-gradient(90deg, rgba(60,24,140,.96), rgba(20,12,48,.96)); box-shadow: inset 0 0 0 1px rgba(255,207,58,.5), 0 10px 30px rgba(0,0,0,.45); animation: logoIn .5s both; }
#guide .g-n { padding: 6px 8px; border-radius: 10px; background: #ffd23f; color: #2b1a00; font-family: var(--display); font-size: 12px; white-space: nowrap; }
#guide .g-t { display: grid; flex: 1; min-width: 0; } #guide .g-t b { font-family: var(--display); font-weight: 400; font-size: 15px; color: #ffe27a; } #guide .g-t span { font-weight: 800; font-size: 13px; } #guide .g-t small { font-size: 11px; color: #c9b8f0; }
#guide .g-x { width: 28px; height: 28px; opacity: .7; } #guide .g-x svg { width: 14px; height: 14px; }
@media (max-width: 760px) { #guide { top: 156px; } #guide .g-t small { display: none; } }
.tprev { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; } .tprev.big { grid-template-columns: repeat(4, 1fr); }
.tprev div { display: grid; gap: 2px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.05); text-align: center; } .tprev small { font-size: 9px; font-weight: 900; letter-spacing: .1em; color: #a998d6; } .tprev b { font-size: 14px; }
@media (max-width: 560px) { .tprev.big { grid-template-columns: repeat(2, 1fr); } }
/* soldiers / workers box under the resource chip */
#forcePop { position: fixed; z-index: 60; display: flex; align-items: flex-end; gap: 4px; width: min(360px, calc(100vw - 16px)); padding: 12px 14px 12px 4px; border-radius: 18px; background: linear-gradient(180deg, rgba(40,20,80,.97), rgba(14,9,34,.97)); box-shadow: inset 0 0 0 1px rgba(255,207,58,.45), 0 18px 40px rgba(0,0,0,.55); animation: logoIn .35s both; }
#forcePop .fp-art { width: 120px; height: 170px; object-fit: contain; object-position: bottom; flex: none; margin-top: -40px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.6)); }
#forcePop.work .fp-art { width: 140px; }
#forcePop .fp-body { flex: 1; min-width: 0; display: grid; gap: 6px; } #forcePop small { font-size: 10px; font-weight: 900; letter-spacing: .14em; color: #ffd23f; }
#forcePop .fp-n { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1; }
#forcePop .fp-rows { display: grid; gap: 3px; } #forcePop .fp-rows div { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; } #forcePop .fp-rows span { color: #b9a8e6; } #forcePop .fp-rows .loc b { color: #ffe27a; }
#forcePop .fp-act { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }

/* ===== round 9: layout safety ===== */
/* windows never collapse: the body takes its content height and scrolls only when the window is full */
.win > .win-body { flex: none; min-height: 0; max-height: calc(min(88dvh, 900px) - 76px); overflow: auto; }
.win:has(.win-tabs) > .win-body { max-height: calc(min(88dvh, 900px) - 124px); } .win:has(.win-foot) > .win-body { max-height: calc(min(88dvh, 900px) - 150px); }
@media (max-width: 760px) { .win > .win-body { max-height: calc(100dvh - 92px); } .win:has(.win-tabs) > .win-body { max-height: calc(100dvh - 140px); } }
.win { max-height: min(88dvh, 900px); }
@media (max-width: 760px) { .win { max-height: calc(100dvh - 16px); width: 100% !important; } .scrim { padding: 8px; } }
/* round flags everywhere (HTML); map flags are drawn round on the canvas */
img[src*="/assets/flags/"] { border-radius: 50% !important; object-fit: cover; aspect-ratio: 1 / 1; height: auto !important; box-shadow: 0 0 0 1.5px rgba(255,255,255,.75), 0 2px 6px rgba(0,0,0,.35); }
/* one thing at a time: modal windows hide the floating helpers */
body:has(.scrim) #midAttack, body:has(.scrim) #forcePop, body:has(.scrim) .gen-report, body:has(.scrim) #guide,
body:has(.wpanel) .sheet, body:has(.wpanel) #guide { display: none !important; }
/* leaderboards and lists: numbers line up */
.lb-row, .lbrow, .lb .row { font-variant-numeric: tabular-nums; }
/* tables (ranks, citizens): headers never break inside a word; on phones they shrink instead */
.win table th, .win table td { overflow-wrap: normal; } .win table th { white-space: nowrap !important; word-break: keep-all !important; overflow-wrap: normal !important; hyphens: none; }
.win table td.num, .win table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.win table td { vertical-align: middle; }
@media (max-width: 560px) {
  .win table th { font-size: 9.5px; letter-spacing: .02em; padding-left: 4px; padding-right: 4px; }
  .win table td { padding-left: 4px; padding-right: 4px; font-size: 13px; }
  .win table td img[src*="/assets/flags/"] { width: 26px !important; }
}
/* the emergency banner stays below the top bar, never on top of windows or the power box */
@media (max-width: 760px) { body:has(.scrim) .emergency, body:has(.scrim) #emerg { display: none !important; } }
/* the national emergency banner never covers windows, panels or the power box */
body:has(.scrim) .wemerg, body:has(.wpanel) .wemerg, body:has(#forcePop) .wemerg { display: none !important; }
@media (max-width: 760px) { .wemerg { top: 164px !important; } #guide { top: 230px; } }

/* ===== round 10 ===== */
.roll-cta.citizen-off { display: none !important; }
/* food chip */
.hud-res .res.food b { color: #ffe08a; } .hud-res .res.food { box-shadow: inset 0 0 0 1px rgba(255,207,58,.35), inset 0 -2px 0 rgba(0,0,0,.4); }
.hud-res .res .fph { font-style: normal; font-size: 10px; font-weight: 900; color: #9df0b8; margin-left: 4px; }
/* bottom nav: distinct illustrated icons + the battle button */
.hud-bottom .hb > span img.resic { width: 32px; height: 32px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.hud-bottom .hb-battle.live { background: radial-gradient(circle at 50% 35%, #ff7a86, #d41f37 60%, #7a0a18) !important; box-shadow: 0 0 0 3px #3a0510, 0 0 26px rgba(232,40,63,.7) !important; }
.hud-bottom .hb-battle.idle { background: radial-gradient(circle at 50% 35%, #9aa0b4, #5b6074 60%, #2d3040) !important; box-shadow: 0 0 0 3px #1c1e28 !important; }
.hud-bottom .hb-battle.idle img.ic { filter: grayscale(1) brightness(1.2); }
/* right panel: my nation */
.top10.nation { display: grid; gap: 8px; width: 290px; }
.np-front { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; border-radius: 12px; background: linear-gradient(90deg, rgba(212,31,55,.28), rgba(212,31,55,.08)); box-shadow: inset 0 0 0 1px rgba(255,90,110,.45); text-align: left; }
.np-front.idle { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.np-front img { width: 30px; height: 30px; } .np-front span { display: grid; flex: 1; min-width: 0; } .np-front small { font-size: 9.5px; font-weight: 900; letter-spacing: .12em; color: #ffb3ba; } .np-front.idle small { color: #a998d6; }
.np-front b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .np-front em { font-style: normal; font-size: 11px; color: #e9d2d6; }
.np-go { flex: none; height: 34px; padding: 0 12px; border-radius: 10px; font-family: var(--display); font-size: 13px; color: #fff; background: linear-gradient(180deg, #ff7a86, #d41f37); box-shadow: inset 0 -2px 0 rgba(0,0,0,.3); }
.np-go.def { background: linear-gradient(180deg, #8ff0ff, #1fb6e6); color: #04283a; }
.np-earn { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .np-earn > div { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.05); }
.np-earn span { display: grid; } .np-earn b { font-family: var(--display); font-weight: 400; font-size: 16px; } .np-earn small { font-size: 10px; color: #a998d6; }
.np-sec { font-size: 10px; font-weight: 900; letter-spacing: .14em; color: #b9a8e6; margin-top: 2px; }
.np-mis { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.04); text-align: left; } .np-mis span { display: grid; gap: 3px; flex: 1; min-width: 0; }
.np-mis b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .np-mis small { font-size: 10.5px; color: #a998d6; }
.np-bar { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; } .np-bar em { display: block; height: 100%; background: linear-gradient(90deg, #22a656, #8ff0a8); }
.np-terrs { display: flex; flex-wrap: wrap; gap: 4px; } .np-terrs button { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 13px; font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.06); }
.np-terrs .hpdot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; } .np-terrs .hpdot.war { background: #ff4d5e; box-shadow: 0 0 6px #ff4d5e; } .np-terrs .more { font-size: 11px; color: #a998d6; align-self: center; }
.hp-pw { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding: 0 6px; height: 18px; border-radius: 9px; background: rgba(255,210,63,.16); font-style: normal; font-size: 12px; font-weight: 900; color: #ffe27a; vertical-align: 2px; } .hp-pw img { width: 13px; height: 13px; }
/* rally invitations in chat */
.cb-rally { display: flex; align-items: center; gap: 8px; margin: 4px 0; padding: 8px; border-radius: 12px; background: linear-gradient(90deg, rgba(212,31,55,.3), rgba(60,24,140,.3)); box-shadow: inset 0 0 0 1px rgba(255,90,110,.5); }
.cb-rally.defend { background: linear-gradient(90deg, rgba(31,182,230,.25), rgba(60,24,140,.3)); box-shadow: inset 0 0 0 1px rgba(70,215,255,.5); }
.cr-vs { display: flex; align-items: center; gap: 4px; } .cr-vs img { width: 24px; height: 24px; } .cr-vs b { font-size: 11px; } .cr-vs span { font-size: 10px; font-weight: 900; color: #ffb3ba; }
.cr-t { display: grid; flex: 1; min-width: 0; } .cr-t small { font-size: 9.5px; font-weight: 900; letter-spacing: .1em; color: #ffd0d6; } .cr-t b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-go { flex: none; height: 30px; padding: 0 10px; border-radius: 15px; font-size: 11px; font-weight: 900; color: #2b1a00; background: linear-gradient(180deg, #ffe27a, #f0a81c); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
/* one-click collect in the nation panel */
.np-collect { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 12px; text-align: left; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.np-collect.ready { background: linear-gradient(180deg, #ffd56a, #e3961f); color: #2b1a00; box-shadow: 0 3px 0 #7a4c08, 0 8px 18px rgba(246,196,83,.3); }
.np-collect span { display: grid; min-width: 0; } .np-collect b { font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: .04em; }
.np-collect small { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.np-collect:disabled { filter: grayscale(.6); }
.np-dot { position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #ff3b4a; box-shadow: 0 0 0 2px #fff; animation: npPulse 1.2s infinite; }
@keyframes npPulse { 50% { transform: scale(1.3); } }
/* level-up celebration */
.rank-pop.lvl .lv-badge { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #ffe9a0, #e3961f 60%, #8a4f05); box-shadow: 0 0 0 4px rgba(255,255,255,.25), 0 0 40px rgba(255,200,60,.6); }
.rank-pop.lvl .lv-badge span { font-family: var(--display); font-size: 52px; color: #3a2300; text-shadow: 0 2px 0 rgba(255,255,255,.4); }
.lv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; margin: 6px 0 2px; }
.lv-r { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: rgba(255,255,255,.07); }
.lv-r b { font-family: var(--display); font-weight: 400; font-size: 16px !important; color: #fff !important; } .lv-r small { font-size: 10.5px !important; color: #cfc3f3 !important; font-weight: 700; }
/* nation level + capital building */
.np-lvl { display: flex; align-items: center; gap: 10px; padding: 9px 11px; margin: 6px 0; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.np-lvl > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 3px; } .np-lvl b { font-size: 13px; } .np-lvl small { font-size: 11px; color: #cfc3f3; }
.np-lv { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--display); font-size: 15px; color: #2b1a00; background: linear-gradient(180deg, #ffe08a, #e3961f); box-shadow: 0 2px 0 #7a4c08; }
.np-pct { font-style: normal; font-weight: 900; font-size: 12px; color: #6dffb0; }
.np-lvl.sh { margin: 10px 0 4px; }
.np-bld { display: grid; gap: 6px; padding: 10px 11px; margin: 6px 0; border-radius: 14px; background: linear-gradient(180deg, rgba(255,213,106,.12), rgba(255,255,255,.03)); box-shadow: inset 0 0 0 1px rgba(255,213,106,.25); }
.np-bld-h { display: flex; align-items: center; gap: 9px; } .np-bld-h > span:last-child { display: grid; } .np-bld-h b { font-size: 13px; } .np-bld-h small { font-size: 11px; color: #6dffb0; font-weight: 800; }
.np-bld-i { position: relative; } .np-bld-i i { position: absolute; right: -4px; bottom: -3px; min-width: 16px; height: 16px; border-radius: 8px; background: #7c5cff; color: #fff; font-style: normal; font-size: 10px; font-weight: 900; display: grid; place-items: center; }
.np-bld-n { font-size: 10.5px; color: #cfc3f3; text-align: right; margin-top: -4px; }
.np-bld-b { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .np-bld-b button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 30px; border-radius: 10px; font-size: 12px; font-weight: 900; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.np-bld-b button:hover { background: rgba(255,213,106,.2); }
.np-mis.ready { box-shadow: inset 0 0 0 1.5px #ffd56a; background: rgba(255,213,106,.1); } .np-mis.ready small { color: #ffd56a; font-weight: 900; }
.cb-rally.inchat { margin: 4px 0; }
/* army box: move buttons */
.fp-move { margin-top: 8px; } .fp-move small { font-size: 10px; font-weight: 900; letter-spacing: .1em; color: #ffd56a; }
.fp-move > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; max-height: 96px; overflow-y: auto; }
.fp-move button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 10px; font-size: 11.5px; font-weight: 800; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-move button:hover { background: rgba(124,92,255,.3); } .fp-move button.front { box-shadow: inset 0 0 0 1.5px #ff5a6e; background: rgba(255,59,74,.14); }
.fp-move button i { font-style: normal; font-size: 9px; font-weight: 900; padding: 1px 5px; border-radius: 6px; background: #ff3b4a; color: #fff; }

/* ===================================================================== soft glass boxes (one style everywhere)
   outer panels: deep translucent violet with blur; inner cards: lighter frosted tiles with a hairline edge */
:root {
  --gl-panel: linear-gradient(165deg, rgba(64,52,150,.42), rgba(26,18,74,.55) 55%, rgba(16,10,48,.62));
  --gl-card: linear-gradient(160deg, rgba(150,140,255,.14), rgba(90,70,200,.07) 60%, rgba(40,28,110,.10));
  --gl-line: rgba(200,190,255,.16);
  --gl-hi: inset 0 1px 0 rgba(255,255,255,.10);
}
#hudProfile, #hudPower, #chatbox, #top10, .wpanel, .win, #forcePop, #sheet, .hud-bottom, #gameMenu {
  background: var(--gl-panel) !important; backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 0 0 1px var(--gl-line), var(--gl-hi), 0 18px 44px rgba(8,4,32,.45) !important;
}
.np-mis, .np-earn > div, .np-lvl, .np-collect:not(.ready), .estats > div, .wstats > div, .arow, .bycountry .bc, .bl, .t10-row.me, .lv-r, .fp-move button, .np-bld-b button, .wtrans, .tforce > div, .wrow {
  background: var(--gl-card) !important; box-shadow: inset 0 0 0 1px var(--gl-line), var(--gl-hi) !important; border-radius: 14px;
}
.np-mis:hover, .arow:hover, .bl:hover, .wrow:hover { background: linear-gradient(160deg, rgba(170,160,255,.2), rgba(100,80,220,.12)) !important; }
.np-mis.ready { box-shadow: inset 0 0 0 1.5px #ffd56a, var(--gl-hi) !important; }
.bycountry .bc { box-shadow: inset 3px 0 0 #46d7ff, inset 0 0 0 1px var(--gl-line) !important; } .bycountry .bc.attack { box-shadow: inset 3px 0 0 #ff5a6e, inset 0 0 0 1px var(--gl-line) !important; }
.hud-res .res { background: linear-gradient(180deg, rgba(40,32,100,.62), rgba(20,14,56,.7)) !important; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
/* phones: no backdrop blur over the live map (keeps memory and frame rate low); slightly more solid glass instead */
@media (max-width: 760px), (pointer: coarse) {
  #hudProfile, #hudPower, #chatbox, #top10, .wpanel, .win, #forcePop, #sheet, .hud-bottom, #gameMenu, .hud-res .res { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  :root { --gl-panel: linear-gradient(165deg, rgba(58,46,138,.94), rgba(24,16,68,.96) 55%, rgba(14,9,44,.97)); }
}
