/* =================== 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); }
.title-logo span { color: var(--green); text-shadow: 2px 0 0 #10300a, -2px 0 0 #10300a, 0 2px 0 #10300a, 0 -2px 0 #10300a, 3px 4px 0 #071404, 0 0 12px rgba(120, 214, 90, .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 #10300a, -1px 0 0 #10300a, 0 1px 0 #10300a, 0 -1px 0 #10300a, 2px 2px 0 #071404; }

/* 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; }
.form-msg { min-height: 9px; font-size: 7px; color: #ff8a7a; margin: -2px 0 4px; text-align: center; }
.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; }
.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; }

/* ---------- login ---------- */
.login .stage { left: 52%; right: 0; top: 0; bottom: 0; cursor: default; }
.login-col { position: absolute; left: 27%; top: 50%; transform: translate(-50%, -54%); width: 210px; display: flex; flex-direction: column; align-items: stretch; }
.brand { text-align: center; margin-bottom: 12px; }
.menu .login-card { position: static; }
.login-card .btn.wide { height: 17px; font-size: 9px; margin-top: 2px; }
.server-status { margin-top: 7px; text-align: center; font-size: 7px; color: var(--text); text-shadow: 1px 1px 0 #000; }
.server-status .dot { display: inline-block; width: 4px; height: 4px; margin-right: 4px; background: var(--green); box-shadow: 0 0 3px var(--green); vertical-align: 1px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 9px; }
.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, .7); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #3a2e22; }
.feature img { width: 16px; height: 16px; image-rendering: pixelated; }
.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, .92), rgba(14, 11, 9, .75)); box-shadow: 0 1px 0 var(--edge), 0 2px 0 #3a2e22; }
.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: 170px; }
.select .char-info { right: 14px; top: 50%; transform: translateY(-50%); width: 150px; }
.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; }
.compact-play .btn { padding: 0 14px; }
.char-row { display: grid; grid-template-columns: repeat(4, 104px); gap: 6px; }
.char-card { height: 44px; display: flex; align-items: center; gap: 5px; padding: 4px 4px 4px 6px; cursor: pointer; position: relative;
  background: rgba(20, 16, 13, .92); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #3a2e22; }
.char-card::before { content: ""; position: absolute; left: 1px; top: 1px; bottom: 1px; width: 2px; background: var(--emp, transparent); }
.char-card img { width: 32px; height: 32px; flex: none; box-shadow: 0 0 0 1px var(--edge); }
.char-card:hover { 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 */
.char-card.picked { box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold), 0 0 6px rgba(242, 196, 90, .35); background: rgba(42, 32, 20, .95); }
.char-card.empty { justify-content: center; opacity: .75; }
.char-card.empty:hover { opacity: 1; }
.cc-plus { width: 32px; height: 32px; line-height: 30px; text-align: center; font-size: 18px; color: var(--bronze-l); box-shadow: inset 0 0 0 1px #3a2e22; flex: none; }
.cc-text { min-width: 0; font-size: 7px; line-height: 1.3; }
.cc-name { font-size: 8px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-gs { white-space: nowrap; }

/* ---------- 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:hover { box-shadow: inset 0 0 0 1px var(--bronze-l); }
/* 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; }

/* 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, 104px); }
#ui.compact .select .stage { bottom: 144px; }
#ui.compact .compact-play { display: flex; }

#ui.compact .login-col { left: 50%; }
#ui.compact .login .stage { left: 0; }
#ui.compact .select .stage { right: 0; }
