/* =================== menus (login / select / create) =================== */
.menu { position: absolute; inset: 0; overflow: hidden; }
.menu-bg { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 65% at 50% 52%, rgba(0, 0, 0, 0) 0%, rgba(8, 5, 3, .35) 60%, rgba(8, 5, 3, .82) 100%),
    linear-gradient(rgba(8, 5, 3, .55), rgba(8, 5, 3, 0) 18%, rgba(8, 5, 3, 0) 75%, rgba(8, 5, 3, .7)); }
.embers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.embers i { position: absolute; bottom: -4px; width: 2px; height: 2px; background: #ffb547; box-shadow: 0 0 2px #ff8a1f;
  animation: ember linear infinite; opacity: 0; }
@keyframes ember { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 50% { transform: translate(10px, -50vh); }
  90% { opacity: .5; } 100% { transform: translate(-6px, -100vh); opacity: 0; } }
.menu .win { position: absolute; }
.menu .win-body { padding: 6px; }
.menu-footer { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 6px; color: var(--dim); opacity: .7; }

.title-logo { font-family: var(--num); font-size-adjust: none; font-size: 24px; color: var(--gold); letter-spacing: 1px; line-height: 1;
  text-shadow: 2px 0 0 #3a1c08, -2px 0 0 #3a1c08, 0 2px 0 #3a1c08, 0 -2px 0 #3a1c08, 3px 4px 0 #120a04, 0 0 12px rgba(242, 196, 90, .35); }
/* "Idle" in the red of the logo (assets/ui/logo.webp: gold "Project", red "Idle") */
.title-logo span { color: #ff5a32; text-shadow: 2px 0 0 #3a0c06, -2px 0 0 #3a0c06, 0 2px 0 #3a0c06, 0 -2px 0 #3a0c06, 3px 4px 0 #140403, 0 0 12px rgba(255, 90, 50, .35); }
.title-logo.small { font-size: 10px; text-shadow: 1px 0 0 #3a1c08, -1px 0 0 #3a1c08, 0 1px 0 #3a1c08, 0 -1px 0 #3a1c08, 2px 2px 0 #120a04; }
.title-logo.small span { text-shadow: 1px 0 0 #3a0c06, -1px 0 0 #3a0c06, 0 1px 0 #3a0c06, 0 -1px 0 #3a0c06, 2px 2px 0 #140403; }

/* form building blocks */
.field { display: flex; flex-direction: column; gap: 2px; margin: 0 0 6px; text-align: left; }
.field label { color: var(--gold); font-size: 7px; }
.menu input { width: 100%; height: 14px !important; font-size: 8px !important; padding: 1px 4px !important; }
/* (no negative margin: the text sat on the frame line of the field above it, user 03.11.2026) */
.form-msg { min-height: 9px; font-size: 7px; line-height: 9px; color: #ff8a7a; margin: 0 0 4px; text-align: center; }
.create-panel .form-msg { margin-top: 3px; }
/* the registration: closed beta (only with a Werbecode) or closed (server/referral.js, ui/menu.js regApply) */
.reg-note { margin: 0 0 6px; padding: 3px 4px; font-size: 7px; line-height: 8px; text-align: center; color: var(--gold);
  background: rgba(20, 15, 11, .8); box-shadow: inset 0 0 0 1px #4a3a24; }
.reg-note.red { color: #ff8a7a; box-shadow: inset 0 0 0 1px rgba(226, 70, 58, .45); }
.login-card .field.closed { display: none; }
/* a new password saved over a reset link (ui/pwreset.js): the login says so in green */
.form-msg.ok { color: #9fe08a; }
.login-card .form-msg:empty { display: none; }
/* the reset form: the account name only to read, "Zum Login" under the main button */
#ui .login-card .pwreset .pr-user { color: var(--gold); opacity: .85; pointer-events: none; }
#ui .login-card .pwreset .btn.pr-back { margin-top: 5px; }
#ui .login-card .field input[autocomplete="off"] { letter-spacing: 1px; text-transform: uppercase; }
#ui .login-card .field input[autocomplete="off"]::placeholder { letter-spacing: 0; text-transform: none; }
.btn.wide { width: 100%; }
.btn.big { height: 18px; font-size: 9px; }
.btn.danger { color: #ffb0a6; background: linear-gradient(#4a2420, #2e1714); box-shadow: 0 0 0 1px var(--edge), inset 0 1px 0 #7a3a30, inset 0 -1px 0 #1c0d0b; }
.btn.danger:hover { background: linear-gradient(#5e2c26, #3a1d19); color: #fff; }
.btn.square { min-width: 14px; width: 14px; height: 14px; padding: 0; }
.btn-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 6px; margin-top: 2px; }
.btn-row .btn { height: 16px; min-width: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; margin-bottom: 6px; box-shadow: 0 0 0 1px var(--edge); }
.seg-btn { height: 14px; line-height: 14px; text-align: center; font-size: 8px; color: var(--dim); cursor: pointer;
  background: linear-gradient(#211a15, #17120e); box-shadow: inset 0 0 0 1px #33281d; }
.seg-btn:hover { color: var(--text); }
.seg-btn.on { color: #fff6dc; background: linear-gradient(#6a4c24, #4a3418); box-shadow: inset 0 0 0 1px var(--gold-d), inset 0 1px 0 #c89a4a; }
.win > .seg { margin: 0; box-shadow: none; }
.win > .seg .seg-btn { height: 15px; line-height: 15px; }
html.touch #ui .login-card > .seg .seg-btn {
  display: grid; place-items: center; min-height: calc(44px / var(--px)); line-height: 1.1;
}
.gap4 { height: 4px; }
.gap6 { height: 6px; }
.para { font-size: 7px; line-height: 1.35; margin: 2px 0 5px; }
.info-row { display: flex; justify-content: space-between; gap: 6px; font-size: 8px; padding: 2px 0; border-bottom: 1px solid #2a2119; }

/* ---------- life of the menus (ui/menufx.js, Nutzer 28.10.2026: Login "hingeklatscht, langweilig") ---------- */
/* the size of the screen decides the layout of the login (container queries in art pixels, see below) */
.menu { container: menu / size; }
/* sparks, smoke, the fire's light, fireflies, haze: a canvas in art pixels behind the vignette */
.menu-fx { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }

/* the logo of the game (tools/art/gen_login_logo.py): floats a little, a warm halo breathes behind it, a light runs over
   it now and then, the eyes of dragon and golem glow, the sun glints */
.logo-art { position: relative; width: min(186px, 36cqh); aspect-ratio: 600 / 594; margin: 0 auto; animation: logo-float 7s ease-in-out infinite; }
.logo-art img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: auto; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .65)); }
.logo-halo { position: absolute; inset: 6% 2% 16%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 168, 70, .34), rgba(255, 110, 40, .12) 62%, rgba(255, 110, 40, 0));
  animation: logo-halo 4.6s ease-in-out infinite; }
.logo-sweep { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  -webkit-mask: url(../assets/ui/logo.webp) 0 0 / 100% 100% no-repeat; mask: url(../assets/ui/logo.webp) 0 0 / 100% 100% no-repeat;
  background: linear-gradient(105deg, rgba(255, 240, 200, 0) 44%, rgba(255, 240, 200, .5) 50%, rgba(255, 240, 200, 0) 56%) 150% 0 / 300% 100% no-repeat;
  animation: logo-sweep 8s ease-in-out infinite 1.2s; }
.logo-art .glow { position: absolute; pointer-events: none; transform: translate(-50%, -50%); }
.logo-art .eye { width: 9px; height: 9px; border-radius: 50%; animation: eye 3.4s ease-in-out infinite; }
.logo-art .eye.red { background: radial-gradient(closest-side, rgba(255, 236, 160, .95), rgba(255, 120, 40, .55) 45%, rgba(255, 60, 20, 0)); }
.logo-art .eye.blue { background: radial-gradient(closest-side, rgba(220, 250, 255, .95), rgba(80, 200, 255, .55) 45%, rgba(40, 140, 255, 0)); }
.logo-art .star { width: 9px; height: 9px; opacity: 0; animation: star 6.4s ease-in-out infinite;
  background: radial-gradient(closest-side, #fff, rgba(255, 244, 210, .7) 30%, rgba(255, 244, 210, 0) 60%),
    linear-gradient(rgba(255, 250, 230, .9), rgba(255, 250, 230, .9)) center / 1px 100% no-repeat,
    linear-gradient(rgba(255, 250, 230, .9), rgba(255, 250, 230, .9)) center / 100% 1px no-repeat; }
@keyframes logo-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes logo-halo { 0%, 100% { opacity: .7; scale: 1; } 50% { opacity: 1; scale: 1.04; } }
@keyframes logo-sweep { 0%, 55% { background-position: 150% 0; } 85%, 100% { background-position: -50% 0; } }
@keyframes eye { 0%, 100% { opacity: .35; scale: .8; } 50% { opacity: 1; scale: 1.15; } }
@keyframes star { 0%, 72%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(0deg); }
  82% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(45deg); } 92% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(90deg); } }

/* a light running round a frame: over the bronze line of .win (1 px inside), only the ring of the box shows */
@property --run { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.frame-run { position: absolute; inset: 0; padding: 1px; pointer-events: none; z-index: 3;
  background: conic-gradient(from var(--run), rgba(255, 214, 120, 0) 0turn, rgba(255, 214, 120, 0) .7turn, rgba(255, 214, 120, .35) .8turn,
    #fff0c0 .86turn, rgba(255, 214, 120, .35) .92turn, rgba(255, 214, 120, 0) .99turn);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: frame-run 6s linear infinite; }
@keyframes frame-run { to { --run: 360deg; } }
/* gold rivets on the corners of the big panels */
.login-card::after, .select .char-info::after, .create-panel::after, .create .class-info::after { content: ''; position: absolute; inset: -2px; pointer-events: none; z-index: 4;
  background: linear-gradient(#fff3c4, #fff3c4) 1px 1px / 1px 1px, linear-gradient(#fff3c4, #fff3c4) calc(100% - 1px) 1px / 1px 1px,
    linear-gradient(#fff3c4, #fff3c4) 1px calc(100% - 1px) / 1px 1px, linear-gradient(#fff3c4, #fff3c4) calc(100% - 1px) calc(100% - 1px) / 1px 1px,
    linear-gradient(var(--gold-d), var(--gold-d)) 0 0 / 3px 3px, linear-gradient(var(--gold-d), var(--gold-d)) 100% 0 / 3px 3px,
    linear-gradient(var(--gold-d), var(--gold-d)) 0 100% / 3px 3px, linear-gradient(var(--gold-d), var(--gold-d)) 100% 100% / 3px 3px;
  background-repeat: no-repeat; filter: drop-shadow(0 0 0 var(--edge)); }

/* a glint running over the big buttons now and then */
.btn.shine { position: relative; overflow: hidden; }
.btn.shine::after { content: ''; position: absolute; inset: 0; pointer-events: none; transform: translateX(-120%) skewX(-20deg);
  background: linear-gradient(90deg, rgba(255, 248, 220, 0) calc(50% - 7px), rgba(255, 248, 220, .55), rgba(255, 248, 220, 0) calc(50% + 7px)); animation: btn-shine 4.8s ease-in-out infinite 1.5s; }
@keyframes btn-shine { 0%, 72% { transform: translateX(-120%) skewX(-20deg); } 100% { transform: translateX(120%) skewX(-20deg); } }

/* the parts fly in the first time a screen comes up (Menu.screen: class intro) */
@keyframes rise { from { opacity: 0; translate: 0 7px; } to { opacity: 1; translate: 0 0; } }
@keyframes from-left { from { opacity: 0; translate: -12px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes from-right { from { opacity: 0; translate: 12px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes logo-in { 0% { opacity: 0; scale: .92; filter: brightness(2.4); } 55% { opacity: 1; filter: brightness(1.4); } 100% { scale: 1; filter: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.menu.intro .brand { animation: logo-in 1s cubic-bezier(.2, .8, .2, 1) both; }
.menu.intro .login-card { animation: rise .55s .25s ease-out both; }
.menu.intro .login-status { animation: rise .55s .4s ease-out both; }
.menu.intro .feature { animation: rise .5s ease-out both; }
.menu.intro .feature:nth-child(1) { animation-delay: .5s; }
.menu.intro .feature:nth-child(2) { animation-delay: .6s; }
.menu.intro .feature:nth-child(3) { animation-delay: .7s; }
.menu.intro .menu-lang, .menu.intro .menu-footer { animation: fade-in .8s .5s both; }

/* ---------- login ---------- */
/* the camp (its fire in the middle of the stage) between the column of the login and the community on the right */
.login .stage { left: 44%; right: 186px; top: 0; bottom: 0; cursor: default; }
/* the community (Menu.login): trailer, Discord, TikTok, YouTube - links of the team (admin page Server -> Community) */
.login-side { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 162px; display: flex; flex-direction: column; gap: 5px; }
.login-side a, .login-mini a { text-decoration: none; color: var(--text); }
.side-head { display: flex; align-items: center; gap: 5px; font-size: 9px; color: var(--gold); text-shadow: 1px 1px 0 var(--ink), 0 0 6px rgba(242, 196, 90, .3); }
.side-head::before, .side-head::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(176, 138, 62, 0), var(--gold-d)); }
.side-head::after { background: linear-gradient(90deg, var(--gold-d), rgba(176, 138, 62, 0)); }
/* the trailer: picture of the fight with a pulsing play button, opens the trailer page */
.trailer { position: relative; display: block; height: 92px; overflow: hidden; background: #000; cursor: pointer;
  box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--bronze), 0 2px 0 1px rgba(0, 0, 0, .45); }
.trailer img { position: absolute; left: 1px; top: 1px; width: calc(100% - 2px); height: calc(100% - 2px); object-fit: cover; image-rendering: auto;
  filter: saturate(1.05) brightness(.82); transition: filter .2s, scale .4s ease-out; }
.trailer:hover img { filter: saturate(1.15) brightness(1); scale: 1.04; }
.trailer::after { content: ''; position: absolute; left: 1px; right: 1px; bottom: 1px; height: 24px; pointer-events: none;
  background: linear-gradient(rgba(8, 5, 3, 0), rgba(8, 5, 3, .85)); }
.play { position: absolute; left: 50%; top: 44%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle, rgba(40, 26, 12, .9) 60%, rgba(40, 26, 12, .6)); box-shadow: 0 0 0 1px var(--gold), 0 0 6px rgba(242, 196, 90, .45); }
.play::before { content: ''; position: absolute; left: 9px; top: 6px; border-style: solid; border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent var(--gold); }
.play::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 1px var(--gold); animation: ping 2.2s ease-out infinite; }
.trailer:hover .play { box-shadow: 0 0 0 1px #fff0c0, 0 0 9px rgba(242, 196, 90, .7); }
.tr-label { position: absolute; left: 5px; bottom: 3px; z-index: 1; font-size: 8px; color: var(--gold); text-shadow: 1px 1px 0 var(--ink); }
/* a platform: its icon, name, one line why, the button; glows in the colour of the platform */
.social { position: relative; display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 5px 0 5px; cursor: pointer;
  background: linear-gradient(rgba(26, 20, 15, .92), rgba(14, 11, 9, .92)); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #3a2e22;
  transition: transform .15s ease-out, box-shadow .15s, background .15s; }
.social.discord { --brand: #5865f2; }
.social.tiktok { --brand: #25f4ee; }
.social::before { content: ''; position: absolute; left: 1px; top: 1px; bottom: 1px; width: 2px; background: var(--brand); }
.social:hover { transform: translateX(-2px); background: linear-gradient(rgba(36, 28, 20, .95), rgba(20, 15, 11, .95));
  box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px color-mix(in srgb, var(--brand) 70%, #000), 0 0 7px color-mix(in srgb, var(--brand) 45%, transparent); }
.soc-ic { width: 16px; height: 16px; flex: none; margin-left: 2px; }
.social:hover .soc-ic { animation: hop .5s step-end; }
.soc-t { flex: 1; min-width: 0; }
.soc-n { font-size: 8px; color: var(--gold); line-height: 9px; }
.soc-d { font-size: 6px; line-height: 7px; color: var(--dim); }
.social .btn { min-width: 0; padding: 0 5px; }
/* The whole social link takes the tap. Its inset label fits inside the row. */
html.touch #ui .menu.login .social {
  min-height: max(28px, calc(44px / var(--px))); height: auto; padding-block: 3px;
}
html.touch #ui .menu.login .social .btn {
  height: auto; min-height: 0; padding: 2px 4px; line-height: 1.15;
}
html.touch #ui .menu.login .login-mini .mini { min-height: calc(44px / var(--px)); }
.social:hover .btn { background: linear-gradient(#5c4934, #3d3124); color: #fff; }
.menu.intro .login-side > * { animation: from-right .5s ease-out both; }
.menu.intro .login-side > :nth-child(2) { animation-delay: .35s; }
.menu.intro .login-side > :nth-child(3) { animation-delay: .45s; }
.menu.intro .login-side > :nth-child(4) { animation-delay: .55s; }
.menu.intro .login-side > :nth-child(5) { animation-delay: .65s; }
.menu.intro .login-side > :first-child { animation-delay: .25s; }
/* the Discord tab at the left edge (ui/discord.js) is not needed here: the column has it (user 28.10.2026); in the
   creation it would cover the class picks of the left panel */
#ui:has(> .menu.login) #discord, #ui:has(> .menu.create) #discord { display: none; }
/* narrow screens: no room right of the camp - a row of small links under the status instead */
.login-mini { display: none; }
#ui.compact .login-side { display: none; }
#ui.compact .login-mini { display: flex; justify-content: center; gap: 3px; margin-top: 5px; }
.login-mini .mini { position: relative; display: flex; align-items: center; gap: 3px; height: 14px; padding: 0 5px 0 2px; font-size: 7px;
  background: rgba(14, 11, 9, .8); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #3a2e22; }
.login-mini .mini:hover { box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--bronze-l); }
.login-mini img { width: 12px; height: 12px; image-rendering: auto; }
.login-mini .play { position: relative; left: auto; top: auto; margin: 0; width: 12px; height: 12px; }
.login-mini .play::before { left: 4px; top: 3px; border-width: 3px 0 3px 5px; }
.login-mini .play::after { display: none; }
html.touch #ui.compact .login-mini .mini { height: 20px; padding: 0 7px 0 4px; }
.login-col { position: absolute; left: 27%; top: 50%; transform: translate(-50%, -50%); width: 210px; display: flex; flex-direction: column; align-items: stretch; }
.brand { margin: -6px 0 2px; }
.login-main { display: flex; flex-direction: column; align-items: stretch; }
.menu .login-card { position: relative; }
.login-card .btn.wide { height: 17px; font-size: 9px; margin-top: 2px; }
/* short screens (laptops with a big UI, phones held sideways): the logo next to the card */
@container menu (max-height: 440px) {
  .login-col { flex-direction: row; align-items: center; gap: 14px; width: auto; left: max(27%, 216px); }
  .brand { margin: 0; }
  .logo-art { width: min(186px, 64cqh); }
  .login-main { width: 210px; }
}
@container menu (max-height: 300px) { .login .features { display: none; } }
/* bot protection box (ui/botcheck.js): shield, title + percent, bronze bar; green with a tick when done */
.botcheck { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 6px; margin: 0 0 6px;
  background: rgba(14, 11, 9, .7); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #3a2e22; }
.bc-icon { flex: none; width: 12px; height: 12px; background: var(--ic-shield) center / 12px no-repeat; image-rendering: pixelated; }
.botcheck.done .bc-icon { filter: drop-shadow(0 0 2px rgba(120, 214, 90, .45)); }
.bc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bc-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; height: 7px; font-size: 7px; line-height: 7px; white-space: nowrap; }
.bc-title { color: var(--gold); overflow: hidden; text-overflow: ellipsis; }
.bc-state { display: flex; align-items: center; gap: 2px; color: var(--dim); text-shadow: var(--ol); }
.botcheck.done .bc-state { color: var(--green); }
.bc-tick { width: 7px; height: 7px; background: var(--ic-tick) center / 7px no-repeat; image-rendering: pixelated; }
.bc-bar { height: 3px; background: #17120e; box-shadow: inset 0 0 0 1px #2a2119; }
.bc-bar i { display: block; height: 100%; width: 0; background: linear-gradient(var(--bronze-l), var(--bronze)); transition: width .2s linear; }
.botcheck.done .bc-bar i { background: linear-gradient(#9be27e, #4f9a3a); }
.login-status { margin-top: 7px; }
#ui .login-actions { width: 100%; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
#ui .login-actions .btn { width: 100%; margin: 0; }
#ui .login-rules { color: var(--gold); }
#ui .rules-screen { display: grid; place-items: center; }
#ui .rules-screen .rules-gate { position: relative; width: min(310px, 90%); }
#ui .rules-gate .win-body { display: grid; gap: 6px; padding: 6px; }
#ui .rules-gate .rule-text { height: min(160px, calc(49vh / var(--px))); overscroll-behavior: contain; background: rgba(12, 10, 8, .65); }
#ui .rules-hint { text-align: center; color: var(--gold); }
html.touch #ui .rules-screen .rules-gate { --finger: calc(44px / var(--px)); width: min(calc(560px / var(--px)), 92%); }
html.touch #ui .rules-screen .win-title { min-height: calc(28px / var(--px)); height: auto; padding: 3px 5px; justify-content: center; font-size: max(10px, calc(17px / var(--px))); }
html.touch #ui .rules-gate .rule-text { font-size: max(9px, calc(15px / var(--px))); line-height: 1.2; }
html.touch #ui .rules-gate :is(.rules-hint, .btn) { font-size: max(9px, calc(14px / var(--px))); }
#ui .dlg.game-rules { width: min(310px, 85%); }
#ui .dlg.game-rules .rule-text { height: min(148px, calc(54vh / (var(--px) * var(--wz)))); }
#ui .game-rules .rule-text { overflow-y: auto; overflow-wrap: anywhere; white-space: pre-wrap; text-align: left; padding: 3px 5px; }
html.touch #ui .login-card .login-actions.eq-btns { grid-auto-flow: row; }
html.touch #ui .login-rules { min-height: calc(44px / var(--px)); }
html.touch #ui .dlg.game-rules .btn { min-height: calc(44px / (var(--px) * var(--wz))); }
.server-status { text-align: center; font-size: 7px; color: var(--text); text-shadow: 1px 1px 0 #000; }
.server-status .dot { position: relative; display: inline-block; width: 4px; height: 4px; margin-right: 4px; background: var(--green); box-shadow: 0 0 3px var(--green); vertical-align: 1px; }
.server-status .dot::after { content: ''; position: absolute; inset: 0; box-shadow: 0 0 0 1px var(--green); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { scale: 1; opacity: .9; } 100% { scale: 3; opacity: 0; } }
/* the running events (server hello): icon, kind + strength, time left; hover = what it does */
.login-events { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: 5px; }
.login-events:empty { display: none; }
.ev-chip { display: flex; align-items: center; gap: 3px; height: 18px; padding: 0 6px 0 1px; font-size: 7px; white-space: nowrap;
  background: linear-gradient(90deg, rgba(92, 62, 22, .92), rgba(36, 26, 14, .92)); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold-d);
  animation: chip-glow 2.8s ease-in-out infinite; }
.ev-chip img { width: 16px; height: 16px; }
.ev-line { color: var(--gold); text-shadow: 1px 1px 0 var(--ink); }
.ev-left { color: var(--dim); }
@keyframes chip-glow { 0%, 100% { box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold-d); }
  50% { box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold), 0 0 5px rgba(242, 196, 90, .35); } }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.feature { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 5px 3px; font-size: 6px;
  background: rgba(14, 11, 9, .74); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #3a2e22; transition: transform .15s ease-out, box-shadow .15s, background .15s; }
.feature:hover { transform: translateY(-1px); background: rgba(30, 23, 16, .86);
  box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--bronze-l), 0 0 6px rgba(242, 196, 90, .25); }
/* the icons hop a pixel, one after the other (whole art pixels, so they stay crisp) */
.feature img { width: 16px; height: 16px; image-rendering: pixelated; animation: hop 3.6s step-end infinite; }
.feature:nth-child(2) img { animation-delay: -1.2s; }
.feature:nth-child(3) img { animation-delay: -2.4s; }
@keyframes hop { 0% { translate: 0 0; } 8% { translate: 0 -1px; } 16% { translate: 0 0; } }
.feature .gold { font-size: 7px; margin-bottom: 1px; }

/* ---------- character select ---------- */
.topbar { position: absolute; left: 0; right: 0; top: 0; height: 22px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px;
  background: linear-gradient(rgba(14, 11, 9, .94), rgba(14, 11, 9, .78)); box-shadow: 0 1px 0 var(--edge), 0 2px 0 #3a2e22, 0 3px 0 rgba(176, 138, 62, .25); }
.topbar-right { display: flex; align-items: center; gap: 4px; font-size: 8px; }
.topbar-right .btn { margin-left: 6px; }
.topbar-right a.btn { text-decoration: none; }
.stage { position: absolute; left: 0; right: 0; top: 26px; bottom: 74px; cursor: grab; }
.select .stage { right: 176px; }
.select .char-info { right: 14px; top: 50%; transform: translateY(-50%); width: 158px; padding: 2px; }
.menu.intro .char-info { animation: from-right .6s .3s ease-out both; }
.char-row-wrap { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.compact-play { display: none; gap: 6px; }
.compact-play > .btn, .compact-play > .btn.primary { height: 18px; font-size: 9px; padding: 0 12px; }
.char-row { display: grid; grid-template-columns: repeat(4, 116px); gap: 6px; }
.char-card { height: 48px; display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 7px; cursor: pointer; position: relative;
  background: linear-gradient(rgba(26, 20, 15, .94), rgba(16, 12, 10, .94)); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #3a2e22;
  transition: transform .18s ease-out, box-shadow .18s, background .18s; }
.char-card::before { content: ""; position: absolute; left: 1px; top: 1px; bottom: 1px; width: 2px; background: var(--emp, transparent); }
.char-card .frame-run { display: none; }
.cc-face { position: relative; flex: none; width: 34px; height: 34px; padding: 1px; background: #0f0c0a;
  box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px color-mix(in srgb, var(--emp, var(--bronze)) 70%, #000); }
.cc-face img { display: block; width: 32px; height: 32px; }
/* the level on the corner of the face, like the number on a slot */
.cc-lv { white-space: nowrap; position: absolute; right: -4px; bottom: -3px; min-width: 13px; height: 9px; padding: 0 2px; font-size: 7px; line-height: 9px; text-align: center;
  color: #fff6dc; background: linear-gradient(#6a4c24, #3e2c14); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold-d); text-shadow: var(--ol); }
.char-card:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--bronze-l); }
/* selected state is .picked: .sel is the dropdown box of game.css. Lifted, a light runs round it, its glow breathes */
.char-card.picked { transform: translateY(-3px); background: linear-gradient(rgba(58, 43, 24, .96), rgba(34, 26, 16, .96));
  box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold), 0 0 7px rgba(242, 196, 90, .4); animation: picked-glow 2.6s ease-in-out infinite; }
.char-card.picked .frame-run { display: block; }
.char-card.picked .cc-face { box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold), 0 0 5px color-mix(in srgb, var(--emp, var(--gold)) 60%, transparent); }
@keyframes picked-glow { 0%, 100% { box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold), 0 0 5px rgba(242, 196, 90, .3); }
  50% { box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold), 0 0 9px rgba(242, 196, 90, .55); } }
.char-card.empty { justify-content: center; background: rgba(14, 11, 9, .6); }
.char-card.empty .cc-text { color: var(--dim); }
.char-card.empty:hover { background: rgba(30, 23, 16, .8); }
.char-card.empty:hover .cc-text { color: var(--text); }
.cc-plus { width: 30px; height: 30px; line-height: 28px; text-align: center; font-size: 18px; color: var(--bronze-l); box-shadow: inset 0 0 0 1px #3a2e22; flex: none;
  animation: plus-pulse 2.8s ease-in-out infinite; }
.char-card.empty:hover .cc-plus { color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-d); animation: none; }
@keyframes plus-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.cc-text { min-width: 0; font-size: 7px; line-height: 1.3; }
.cc-name { font-size: 9px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 1px 1px 0 var(--ink); }
.cc-job { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-gs { white-space: nowrap; }
.cc-gd { color: #9cd2ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the character collecting offline EXP (ui/menu.js select, server/idle.js pending): a ribbon over the top of the face with
   the time so far, turquoise while it runs, gold when full */
.cc-off { position: absolute; top: -4px; left: -4px; z-index: 2; display: flex; align-items: center; gap: 2px; height: 10px; padding: 0 3px 0 1px;
  font-size: 7px; line-height: 10px; color: #6ad8c8; background: #0f0c0a; box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #2f6f66; }
.cc-off img { width: 8px; height: 8px; }
.cc-off:not(.full) img { animation: off-pulse 2s ease-in-out infinite; }
.cc-off.full { color: var(--gold); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold-d); }
@keyframes off-pulse { 50% { opacity: .5; } }
/* the name change bought in the Itemshop (ui/menu.js): a field and its button in the sheet */
.cs-rename { display: flex; flex-direction: column; gap: 3px; padding: 3px; font-size: 7px; line-height: 1.3; background: rgba(15, 12, 10, .6); box-shadow: inset 0 0 0 1px #6d5636; }
.cs-rename-in { height: 13px; padding: 0 3px; font: inherit; font-size: 8px; color: var(--text); background: #0d0a08; border: 0; box-shadow: inset 0 0 0 1px #4a3a2a; }
html.touch .cs-rename-in { height: 20px; }
.cs-off { display: flex; gap: 4px; align-items: flex-start; margin-top: 4px; padding: 3px; font-size: 7px; line-height: 1.3;
  background: rgba(15, 12, 10, .6); box-shadow: inset 0 0 0 1px #3a2e22; }
.cs-off img { width: 12px; height: 12px; flex: none; }
.cs-off-t { color: var(--gold); font-size: 8px; }
.cs-off.run .cs-off-t { color: #6ad8c8; }
/* the playtime: long in ro/pl with many days, then it wraps to the right edge instead of running over */
.cs-ptl { flex: none; }
.cs-pt { min-width: 0; text-align: right; }
.menu.intro .char-card { animation: rise .5s ease-out both; }
.menu.intro .char-card:nth-child(2) { animation-delay: .08s; }
.menu.intro .char-card:nth-child(3) { animation-delay: .16s; }
.menu.intro .char-card:nth-child(4) { animation-delay: .24s; }
.menu.intro .char-card.picked { animation: rise .5s ease-out both, picked-glow 2.6s .5s ease-in-out infinite; }

/* the sheet of the chosen hero (Menu.select): face, name, class, empire, EXP bar, values; fades in at every pick */
.cs-head { position: relative; display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 7px; margin-bottom: 1px;
  background: linear-gradient(rgba(66, 50, 30, .95), rgba(34, 26, 18, .95)); box-shadow: inset 0 1px 0 #6a5236, 0 1px 0 var(--edge); animation: fade-in .3s ease-out both; }
.cs-head::before { content: ""; position: absolute; left: 1px; top: 1px; bottom: 1px; width: 2px; background: var(--emp); }
.cs-face { flex: none; width: 34px; height: 34px; padding: 1px; background: #0f0c0a; box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold-d); }
.cs-face img { display: block; width: 32px; height: 32px; }
.cs-id { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cs-name { font-size: 11px; line-height: 11px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 1px 1px 0 var(--ink), 0 0 6px rgba(242, 196, 90, .35); }
.cs-sub { font-size: 7px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-emp { display: flex; align-items: center; gap: 3px; font-size: 7px; color: var(--emp); white-space: nowrap; }
.cs-emp i { width: 4px; height: 4px; flex: none; background: var(--emp); box-shadow: 0 0 0 1px var(--edge); rotate: 45deg; }
.cs-in > * { animation: rise .35s ease-out both; }
.cs-in > :nth-child(2) { animation-delay: .04s; }
.cs-in > :nth-child(3) { animation-delay: .08s; }
.cs-in > :nth-child(4) { animation-delay: .12s; }
.cs-in > :nth-child(n + 5) { animation-delay: .16s; }
.cs-exp { margin: 0 0 3px; }
.cs-exp-l { display: flex; justify-content: space-between; font-size: 7px; }
.cs-bar { position: relative; height: 5px; margin-top: 2px; overflow: hidden; background: #17120e; box-shadow: inset 0 0 0 1px #2a2119; }
.cs-bar i { display: block; height: 100%; min-width: 1px; background: linear-gradient(#ffe08a 0 1px, #e0a83a 1px, #a8761e); }
.cs-bar::after { content: ''; position: absolute; top: 0; bottom: 0; left: -16px; width: 12px; background: linear-gradient(90deg, rgba(255, 250, 230, 0), rgba(255, 250, 230, .45), rgba(255, 250, 230, 0));
  animation: bar-glint 3.6s ease-in-out infinite; }
@keyframes bar-glint { 0%, 60% { left: -16px; } 100% { left: calc(100% + 4px); } }

/* ---------- character creation ---------- */
.create-panel { left: 14px; top: 50%; transform: translateY(-50%); width: 216px; }
.create .class-info { right: 14px; top: 50%; transform: translateY(-50%); width: 150px; }
.create .stage { left: 236px; right: 170px; top: 0; bottom: 0; }
.step { display: flex; align-items: center; gap: 4px; font-size: 8px; color: var(--gold); margin: 0 0 4px; }
.step:not(:first-child) { margin-top: 7px; }
.step-n { width: 10px; height: 10px; line-height: 10px; text-align: center; font-size: 7px; color: #fff6dc; background: #6a4c24; box-shadow: inset 0 0 0 1px var(--gold-d); }
.pick-row { display: grid; gap: 4px; }
.pick-row.cols3 { grid-template-columns: repeat(3, 1fr); }
.pick-row.cols4 { grid-template-columns: repeat(4, 1fr); }
.pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px 3px; cursor: pointer;
  background: rgba(10, 8, 6, .6); box-shadow: inset 0 0 0 1px #33281d; }
.pick img { width: 30px; height: 30px; image-rendering: pixelated; box-shadow: 0 0 0 1px var(--edge); }
.pick-row.cols3 .pick img { width: 34px; height: 34px; }
.pick-name { font-size: 7px; white-space: nowrap; }
.pick { transition: background .15s, box-shadow .15s; }
.pick:hover { box-shadow: inset 0 0 0 1px var(--bronze-l); background: rgba(30, 23, 16, .8); }
.pick img { transition: filter .15s; }
.pick:not(.locked):hover img { filter: brightness(1.15); }
.menu.intro .create-panel { animation: from-left .6s .1s ease-out both; }
.menu.intro .class-info { animation: from-right .6s .25s ease-out both; }
/* closed empire: dark grey flag with a lock, the hover text says why */
.pick.locked { cursor: default; position: relative; }
.pick.locked:hover { box-shadow: inset 0 0 0 1px #33281d; }
.pick.locked img { filter: grayscale(1) brightness(.45); }
.pick.locked .pick-name { color: var(--dim) !important; }
.pick.locked::after { content: ''; position: absolute; left: 50%; top: 15px; width: 12px; height: 12px; transform: translateX(-50%);
  background: var(--ic-lock) center / 12px 12px no-repeat; }
.pick.picked { background: rgba(42, 32, 20, .9); box-shadow: inset 0 0 0 1px var(--emp, var(--gold)), 0 0 5px rgba(242, 196, 90, .3); }
.stepper { display: grid; grid-template-columns: 14px 1fr 14px; gap: 4px; align-items: center; margin-top: -2px; }
.stepper-label { height: 14px; line-height: 14px; text-align: center; font-size: 8px; background: #0f0c0a; box-shadow: inset 0 0 0 1px #33281d; }
.attr { display: grid; grid-template-columns: 52px 1fr; align-items: center; font-size: 7px; margin: 2px 0; }
.attr-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; height: 6px; }
.attr-bar i { background: #1d1712; box-shadow: inset 0 0 0 1px #2e251c; }
.attr-bar i.on { background: linear-gradient(#ffe08a 0 1px, #e0a83a 1px); box-shadow: none; }
/* a new class: its bars fill box after box */
.cs-in .attr-bar i.on { animation: box-on .25s calc(var(--i) * 50ms + .1s) ease-out both; }
@keyframes box-on { from { opacity: 0; filter: brightness(2); } to { opacity: 1; filter: none; } }


/* small screens */
#ui.compact .create .class-info, #ui.compact .select .char-info { display: none; }
#ui.compact .create .stage { right: 0; }
#ui.compact .char-row { grid-template-columns: repeat(2, 116px); }
#ui.compact .select .stage { bottom: 144px; }
#ui.compact .compact-play { display: grid; max-width: calc(100% - 16px); }

#ui.compact .login-col { left: 50%; }
#ui.compact .login .stage { left: 0; right: 0; }
#ui.compact .select .stage { right: 0; }

/* language choice (ui/lang.js): top right on the login, in the top bar of the selection, in the ESC menu */
.menu-lang { position: absolute; top: 6px; right: 6px; z-index: 5; }
.lang-sel { min-width: 56px; }
.topbar-right .lang-sel { margin-left: 6px; }
.lang-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.lang-row .lang-k { color: var(--gold); font-size: 7px; }
