/* Shared entry screens. Keeps existing form names, IDs and JS hooks. */
body.hg-entry {
  box-sizing: border-box;
  min-height: 100vh;
  margin: 0;
  background-color: #061326;
  background-image: linear-gradient(90deg, rgba(4, 14, 28, .77), rgba(4, 14, 28, .44)), url("../assets/web/universe-ringed-planet-v1.jpg");
  background-position: center, 60% center;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #e9f4fa;
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.hg-entry *, body.hg-entry *::before, body.hg-entry *::after { box-sizing: inherit; }
body.hg-entry .hg-entry-page { text-align: center; }
body.hg-entry a { color: #abebef; text-underline-offset: 3px; }
body.hg-entry a:hover { color: #fff; }
body.hg-entry :is(a, button, input, select, summary):focus-visible {
  outline: 2px solid #8aeaf0;
  outline-offset: 3px;
}
body.hg-entry .hg-entry-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: clamp(28px, 10vh, 110px) 16px 40px;
}
body.hg-entry .hg-entry-card {
  width: min(100%, 460px);
  margin: 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(126, 187, 211, .34);
  border-radius: 20px;
  background: rgba(7, 23, 41, .94);
  box-shadow: 0 24px 76px rgba(0, 0, 0, .45);
  color: #e9f4fa;
  text-align: left;
}
body.hg-entry .hg-entry-heading { margin-bottom: 26px; }
body.hg-entry .hg-entry-kicker {
  color: #63d6e0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
body.hg-entry .hg-entry-heading h1 {
  width: auto;
  margin: 4px 0 0;
  border: 0;
  color: #fff;
  font-family: inherit;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-transform: none;
}
body.hg-entry .hg-entry-fields,
body.hg-entry .hg-register-fields { display: grid; gap: 7px 14px; }
body.hg-entry .hg-entry-fields label,
body.hg-entry .hg-form-field > label { color: #d6e8f1; font-size: 13px; font-weight: 700; }
body.hg-entry .hg-entry-fields input,
body.hg-entry .hg-form-field > :is(input, select),
body.hg-entry .hg-universe-controls > :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #52758e;
  border-radius: 9px;
  background: #102b43;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.3;
  text-align: left;
}
body.hg-entry .hg-entry-fields input:hover,
body.hg-entry .hg-form-field > :is(input, select):hover { background: #153650; }
body.hg-entry .hg-entry-submit {
  display: block;
  width: 100%;
  min-height: 46px;
  margin: 22px 0 0;
  padding: 10px 16px;
  border: 1px solid #55cbd4;
  border-radius: 9px;
  background: #55cbd4;
  color: #072032;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
}
body.hg-entry .hg-entry-submit:hover { background: #7ce6e9; }
body.hg-entry .hg-entry-submit:disabled { opacity: .6; cursor: wait; }
body.hg-entry .hg-entry-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(126, 187, 211, .23);
  font-size: 13px;
}
body.hg-entry .hg-entry-languages {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid rgba(126, 187, 211, .16);
  font-size: 22px;
  text-align: center;
}
body.hg-entry .hg-entry-credit { margin: 18px 0 0; color: #8ea9ba; font-size: 11px; text-align: center; }
body.hg-entry .hg-entry-credit a { color: inherit; }

/* Registration form and live universe selector. */
body.hg-entry .hg-register-layout { padding-top: clamp(20px, 5vh, 55px); }
body.hg-entry .hg-register-form { width: min(100%, 780px); --hg-info-width: min(684px, calc(100vw - 92px)); }
body.hg-entry .hg-register-form .hg-entry-heading { margin-bottom: 12px; }
body.hg-entry .hg-register-form .hg-entry-kicker a { color: #63d6e0; }
body.hg-entry .hg-register-message { min-height: 30px; margin-bottom: 12px; color: #ffaaaa; font-size: 13px; }
body.hg-entry .hg-universe-field { margin-bottom: 14px; }
body.hg-entry .hg-form-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
body.hg-entry .hg-universe-controls { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
body.hg-entry .hg-universe-controls > input { padding: 0; text-align: center; cursor: pointer; }
body.hg-entry .hg-universe-info {
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid rgba(126, 187, 211, .24);
  border-radius: 12px;
  background: rgba(16, 43, 67, .65);
}
body.hg-entry .hg-universe-viewport { width: 100%; overflow: hidden; container-type: inline-size; }
body.hg-entry #UniInfo_Holder { display: flex; width: max-content; }
body.hg-entry .UniInfo_Box { display: block; flex: 0 0 var(--hg-info-width); width: var(--hg-info-width); }
@supports (width: 1cqw) {
  body.hg-entry .UniInfo_Box { flex-basis: 100cqw; width: 100cqw; }
}
body.hg-entry .hg-universe-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 0;
  padding-right: 12px;
}
body.hg-entry .hg-universe-stats > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(126, 187, 211, .11);
  font-size: 12px;
}
body.hg-entry .hg-universe-stats dt { min-width: 0; color: #afc6d3; }
body.hg-entry .hg-universe-stats dd { min-width: 0; margin: 0; color: #eaf4fa; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
body.hg-entry .hg-register-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
body.hg-entry .hg-small-field > input { max-width: 110px; }
body.hg-entry .hg-rules-field { display: flex; align-items: flex-start; gap: 10px; margin-top: 23px; }
body.hg-entry .hg-rules-field > input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: #55cbd4; }
body.hg-entry .hg-rules-field label { font-size: 13px; }
body.hg-entry .hg-captcha-field { display: flex; justify-content: center; margin: 18px 0 0; }
body.hg-entry .BadInput { border-color: #e77079 !important; }

@media (max-width: 620px) {
  body.hg-entry { background-attachment: scroll; }
  body.hg-entry .hg-entry-layout { padding: 20px 12px 28px; }
  body.hg-entry .hg-entry-card { padding: 20px; }
  body.hg-entry .hg-universe-stats { grid-template-columns: minmax(0, 1fr); }
  body.hg-entry .hg-register-fields { grid-template-columns: minmax(0, 1fr); }
  body.hg-entry .hg-entry-links { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  body.hg-entry *, body.hg-entry *::before, body.hg-entry *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* Legacy content on entry-style pages (rules, battle reports): the same calm
 * cards, row lines and readable type as the game pages. Markup is unchanged. */
body.hg-entry .hg-entry-page > :is(table, center > table) :is(th, td, input, select, textarea) { font-family: inherit; font-size: 14px; }
body.hg-entry .hg-entry-page > :is(table, center > table) {
  max-width: calc(100% - 24px);
  margin: 24px auto;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(126, 187, 211, .3);
  border-radius: 14px;
  background: rgba(7, 23, 41, .94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
  text-align: left;
}
body.hg-entry .hg-entry-page > :is(table, center > table) > tbody > tr > :is(th, td) {
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid rgba(126, 187, 211, .14);
  background: transparent;
  color: #e9f4fa;
  font-weight: 400;
  line-height: 1.55;
}
body.hg-entry .hg-entry-page > :is(table, center > table) > tbody > tr > td.c {
  padding: 13px 16px;
  background: #143249;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
body.hg-entry .hg-entry-page > :is(table, center > table) > tbody > tr:first-child > :first-child { border-top-left-radius: 13px; }
body.hg-entry .hg-entry-page > :is(table, center > table) > tbody > tr:first-child > :last-child { border-top-right-radius: 13px; }
body.hg-entry .hg-entry-page > :is(table, center > table) > tbody > tr:last-child > :is(th, td) { border-bottom: 0; }
body.hg-entry .hg-entry-page > :is(table, center > table) > tbody > tr > :is(th, td):is(.pad3, .pad5) { padding: 10px 16px !important; }
body.hg-entry .hg-entry-page table table :is(th, td) { border-color: rgba(126, 187, 211, .18); background-color: rgba(16, 43, 67, .55); font-size: 13px; }
body.hg-entry .hg-entry-page > :is(table, center > table) a { font-weight: 600; }
body.hg-entry .hg-entry-page :is(.red, .orange, .lime) { font-weight: 650; }
body.hg-entry .hg-entry-page .red { color: #ff8f97 !important; }
body.hg-entry .hg-entry-page .orange { color: #ffc56e !important; }
body.hg-entry .hg-entry-page .lime { color: #74e0a6 !important; }
/* Rules: numbered paragraphs keep a readable number column on every width. */
body.hg-entry .hg-entry-page b.float { width: 3.6em; color: #63d6e0; }
body.hg-entry .hg-entry-page span.float { width: calc(100% - 3.6em - 8px); margin-bottom: 8px; }
body.hg-entry .hg-entry-page .padleft { padding: 10px 16px 10px 58px !important; }
body.hg-entry .hg-entry-page ul ul { padding-left: 22px; }
body.hg-entry .hg-entry-page li { margin: 3px 0; }
body.hg-entry .hg-entry-page .AcceptBox { padding: 10px 14px 10px 36px; border: 1px solid rgba(126, 187, 211, .3); border-radius: 10px; background-color: rgba(16, 43, 67, .75); background-position: 10px center; }
body.hg-entry .hg-entry-page > :is(table, center > table) :is(input[type="submit"], input[type="button"], button) {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid #55cbd4;
  border-radius: 9px;
  background: #176470;
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}
@media (max-width: 620px) {
  body.hg-entry .hg-entry-page > :is(table, center > table) { width: calc(100% - 16px) !important; margin: 12px auto; }
  body.hg-entry .hg-entry-page > :is(table, center > table) > tbody > tr > :is(th, td) { padding: 9px 12px; overflow-wrap: anywhere; }
  body.hg-entry .hg-entry-page .padleft { padding-left: 16px !important; }
  body.hg-entry .hg-entry-page b.float { float: none; display: block; width: auto; }
  body.hg-entry .hg-entry-page span.float { float: none; display: block; width: auto; }
}
body.hg-entry a.hg-entry-kicker { text-decoration: none; }
body.hg-entry .hg-entry-text { margin: -10px 0 20px; color: #c3d8e4; font-size: 14px; line-height: 1.55; }
