/* The main menu's top band, Yer Empire (js/ui/home-empire.js), above the two worlds: a riveted brass-trimmed plate with
   the company, its numbers and the big way into The Works, then a row of everything else ye own. Trade magenta is its
   colour (money, the Works' pops), next to the World's amber and the Tabletop's green. One column on a phone. */
#empire { --he-mag: var(--wk-magenta, #ff3ac0); width: min(1100px, calc(100vw - 32px)); margin: 18px auto 4px; font-family: var(--f-ui); text-align: left; }
#empire:empty { display: none; }
#empire .he-title { margin: 0 0 10px; font: 400 26px/1 var(--f-head); color: var(--wk-brass); display: flex; align-items: center; gap: 10px; }
#empire .he-badge { font: 800 13px/1 var(--f-ui); letter-spacing: 1px; padding: 5px 8px 4px; border-radius: 6px; border: 2px solid var(--wk-ink); color: var(--wk-ink); background: linear-gradient(180deg, #ff8ad8, var(--he-mag)); box-shadow: 0 0 14px rgba(255, 58, 192, 0.55), 2px 2px 0 var(--wk-ink); }

/* the plate: company | numbers | the way in */
#empire .he-plate { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.6fr) 200px; gap: 16px; align-items: stretch; padding: 16px; border: 4px solid var(--wk-ink); border-radius: 16px;
  background: radial-gradient(70% 120% at 0 0, rgba(255, 58, 192, 0.14), transparent 60%), radial-gradient(50% 90% at 100% 100%, rgba(255, 154, 42, 0.14), transparent 70%), linear-gradient(170deg, #3a3040, #221c28);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 2px rgba(200, 144, 42, 0.35), 0 8px 0 var(--wk-ink), 0 0 40px rgba(255, 58, 192, 0.12); }
#empire .he-plate::before, #empire .he-plate::after { content: ""; position: absolute; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe4a0, #9a6414); box-shadow: 0 0 0 2px var(--wk-ink); }
#empire .he-plate::before { left: 8px; } #empire .he-plate::after { right: 8px; }

#empire .he-co { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 4px; border: 0; background: none; color: var(--wk-paper); text-align: left; cursor: pointer; border-radius: 12px; }
#empire .he-crest { flex: none; width: 88px; height: 88px; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--wk-ink); background: radial-gradient(circle at 50% 40%, #4a4050, #18141c); box-shadow: 0 0 0 3px #c8902a, 0 5px 0 var(--wk-ink), 0 0 26px rgba(255, 58, 192, 0.3); }
#empire .he-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#empire .he-name > b { font: 400 clamp(20px, 2.3vw, 28px)/1.05 var(--f-head); color: #fff4e0; text-shadow: 3px 3px 0 var(--wk-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#empire .he-name > small { font: 800 12px var(--f-ui); letter-spacing: 1.2px; color: var(--he-mag); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#empire .he-rank { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
#empire .he-rank .gi { width: 22px; height: 22px; }
#empire .he-rank i { font: 400 17px/1 var(--f-head); font-style: normal; color: var(--wk-brass); }
#empire .he-rank em { font: 700 12px var(--f-ui); font-style: normal; color: var(--wk-potion, #7aff2a); }

#empire .he-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#empire .he-stat { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 5px; min-width: 0; padding: 10px 12px; border: 3px solid var(--wk-ink); border-radius: 12px; background: rgba(10, 6, 18, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); overflow: hidden; }
#empire .he-lbl { font: 700 10px/1 var(--f-ui); letter-spacing: 2px; text-transform: uppercase; color: #a8987a; }
#empire .he-stat b { font: 400 25px/1 var(--f-head); color: #ffd27a; text-shadow: 0 2px 0 var(--wk-ink), 0 0 16px rgba(255, 154, 42, 0.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
#empire .he-stat small { font: 700 12px var(--f-ui); color: var(--he-mag); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#empire .he-value b { color: #f6dfff; text-shadow: 0 2px 0 var(--wk-ink), 0 0 16px rgba(255, 58, 192, 0.4); }
#empire .he-value small { color: var(--wk-potion, #7aff2a); }
#empire .he-salary b { color: var(--wk-paper); }
#empire .he-salary small { color: #a8a090; }
#empire .he-spark { position: absolute; right: 6px; top: 6px; width: 64px; height: 20px; opacity: 0.9; }
#empire .he-spark polyline { fill: none; stroke: var(--wk-potion, #7aff2a); stroke-width: 2; stroke-linejoin: round; }

/* the way in: the press itself on a hazard-striped button */
#empire .he-go { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; min-height: 150px; padding: 8px 10px 12px; border: 3px solid var(--wk-ink); border-radius: 14px; cursor: pointer; transform: rotate(1deg);
  background: radial-gradient(60% 50% at 50% 35%, rgba(255, 154, 42, 0.3), transparent 70%), repeating-linear-gradient(135deg, var(--wk-hazard, #f2b632) 0 14px, var(--wk-ink) 14px 22px); box-shadow: 0 6px 0 var(--wk-ink); }
#empire .he-press { position: absolute; left: 50%; top: 4px; bottom: 50px; aspect-ratio: 506 / 566; transform: translateX(-50%); background: url(/img/works/press-d/base.webp) center / contain no-repeat; filter: drop-shadow(0 4px 0 rgba(10, 6, 18, 0.8)); }
#empire .he-golbl { position: relative; font: 800 15px/1 var(--f-ui); letter-spacing: 1px; text-transform: uppercase; color: var(--wk-paper); background: var(--wk-well, #14161c); border: 2px solid var(--wk-ink); border-radius: 8px; padding: 11px 14px; white-space: nowrap; }
#empire .he-go:hover, #empire .he-tile:hover, #empire .he-co:hover { filter: brightness(1.1); }
#empire button:focus-visible, #empire button.padfocus { outline: 3px solid var(--wk-brass); outline-offset: 3px; }

/* what else ye own: a row of small flat tiles */
#empire .he-hold { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
#empire .he-tile { position: relative; display: flex; align-items: center; gap: 7px; min-height: 60px; padding: 7px; border: 3px solid var(--wk-ink); border-radius: 12px; cursor: pointer; text-align: left; color: var(--wk-paper);
  background: linear-gradient(90deg, var(--he-c), color-mix(in srgb, var(--he-c) 55%, #0e1016)); box-shadow: 0 5px 0 var(--wk-ink); }
#empire .he-tile:nth-child(even) { transform: rotate(-1deg); }
#empire .he-ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--wk-ink); border-radius: 9px; background: rgba(10, 6, 18, 0.55); }
#empire .he-ico .gi { width: 25px; height: 25px; }
#empire .he-cap { display: flex; flex-direction: column; min-width: 0; }
#empire .he-cap b { font: 400 14px/1.1 var(--f-head); text-shadow: 2px 2px 0 var(--wk-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#empire .he-cap small { font: 700 10.5px/1.2 var(--f-ui); color: #e8d8f0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#empire .he-tile .tb { position: absolute; top: -8px; right: -6px; font: 800 11px/1 var(--f-ui); color: var(--wk-ink); background: var(--he-mag); border: 2px solid var(--wk-ink); border-radius: 8px; padding: 3px 6px; }
#empire .he-tile .tb:empty { display: none; }
#empire .he-tile .tb.lock { background: var(--wk-paper); line-height: 0; padding: 3px; }
#empire .he-tile .tb .gi { width: 14px; height: 14px; }
#empire .he-tile.locked { filter: grayscale(0.8) brightness(0.7); }

/* a narrower screen: the way in drops under the numbers, the tiles wrap */
@media (max-width: 1000px) {
  #empire .he-plate { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #empire .he-go { grid-column: 1 / -1; min-height: 110px; flex-direction: row; justify-content: flex-end; padding-right: 18px; }
  #empire .he-press { left: 18px; top: 6px; bottom: 6px; transform: none; }
  #empire .he-hold { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* a phone: one column, the numbers in a row of three small wells, the tiles two across */
@media (max-width: 720px) {
  #empire { width: calc(100vw - 24px); margin-top: 12px; }
  #empire .he-title { font-size: 22px; }
  #empire .he-plate { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; }
  #empire .he-crest { width: 64px; height: 64px; } #empire .he-crest svg { width: 56px; height: 56px; }
  #empire .he-name > b { font-size: 22px; }
  #empire .he-stats { gap: 6px; }
  #empire .he-stat { padding: 8px; gap: 4px; }
  #empire .he-stat b { font-size: 16px; }
  #empire .he-stat small { font-size: 10px; white-space: normal; }
  #empire .he-lbl { font-size: 8.5px; letter-spacing: 1px; }
  #empire .he-spark { display: none; }
  #empire .he-go { grid-column: auto; min-height: 84px; transform: none; }
  #empire .he-press { left: 10px; }
  #empire .he-hold { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 6px; margin-top: 12px; }
  #empire .he-tile { flex-direction: column; justify-content: center; gap: 4px; min-height: 72px; padding: 6px 2px; text-align: center; }
  #empire .he-tile:nth-child(even) { transform: none; }
  #empire .he-cap { align-items: center; max-width: 100%; }
  #empire .he-cap b { font-size: 11px; max-width: 100%; }
  #empire .he-cap small { display: none; }
}
