#entry {
  z-index: 4;
  display: block;
  background: #10201e;
  padding: 0;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.entry-page {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  padding: max(24px, var(--top)) max(24px, var(--right)) max(24px, var(--bottom)) max(24px, var(--left));
}
#account-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  align-items: center;
  gap: 40px;
  padding-inline: max(var(--left), calc((100% - 1120px)/2), 36px) max(var(--right), calc((100% - 1120px)/2), 36px);
}
.entry-art {
  position: absolute;
  z-index: -1;
  inset: 0 30% 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  overflow: hidden;
  opacity: .68;
  mask-image: linear-gradient(90deg, #000 50%, transparent);
}
.entry-art span {
  aspect-ratio: 16 / 9;
  background: #1c312b url('./ClassPortraits.png') no-repeat;
  background-size: 400% 200%;
  background-position: var(--portrait-x, 0%) var(--portrait-y, 0%);
}
.entry-art span:nth-child(2) { --portrait-x: 33.333%; }
.entry-art span:nth-child(3) { --portrait-x: 66.667%; --portrait-y: 100%; }
.entry-art span:nth-child(4) { --portrait-x: 100%; --portrait-y: 100%; }
.entry-brand { align-self: end; padding-bottom: min(12vh, 80px); }
#title {
  color: #fff3dc;
  font: 700 78px/1.14 'Songti SC', SimSun, serif;
  text-shadow: 0 3px 18px #030c0b, 0 8px 36px #030c0b;
}
.account-form { position: relative; }
#entry #entry-modes { display: flex; gap: 12px; margin: 0 0 20px; border-bottom: 1px solid #71908670; }
#entry #entry-modes button {
  flex: 1;
  background: transparent;
  color: #b9c9bd;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  min-height: 44px;
  font-size: 16px;
}
#entry #entry-modes [aria-pressed=true] { color: #ffe4ad; border-color: #dabe87; }
#entry #social-gm { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
#entry #social-gm label, #entry .name { display: grid; gap: 6px; font-size: 13px; color: #d8e2d7; }
#entry #social-gm input, #entry .name input {
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #70928781;
  border-radius: 5px;
  background: #081514ea;
  color: #fff2d9;
  font-size: 16px;
}
#entry .primary { min-height: 44px; }
#entry .primary:hover:not(:disabled) { background: #f3d7a0; }
#character-screen { display: grid; align-content: center; }
.character-head, .character-body { width: min(100%, 920px); margin-inline: auto; }
.character-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #79988a75; }
#character-title { margin: 0; font: 700 34px/1.1 'Songti SC', SimSun, serif; color: #ffedca; }
#account-switch { display: inline-flex; gap: 6px; align-items: center; border: 1px solid #79988a85; border-radius: 5px; background: #162a26; min-height: 40px; padding: 0 10px; font-size: 13px; }
#account-switch img { width: 17px; height: 17px; filter: invert(88%); }
.character-body { display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); align-items: center; gap: 28px; }
.character-art { position: relative; margin: 0; width: 100%; max-width: 420px; aspect-ratio: 1; overflow: hidden; border: 1px solid #9d865d; border-radius: 5px; background: #172924; }
#character-portrait { position: absolute; inset: 0; background: url('./ClassPortraits.png') no-repeat; background-size: 400% 225%; }
#character-caption { position: absolute; inset: auto 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; padding: 18px 15px 10px; background: linear-gradient(transparent, #061210f0 42%); }
#preview-role { font: 700 28px/1.15 'Songti SC', SimSun, serif; color: #ffedca; }
#preview-style { color: #e3e8d8; font-size: 13px; }
#entry .option { min-height: 69px; padding-block: 6px; }
#entry .option small { color: #e7dbbc; }
#entry .identity { margin-block: 13px; }
#entry .gender span { min-height: 44px; }
#entry .save-note { color: #b9c9bd; font-size: 12px; }
#saved-name { display: block; color: #ffe7b5; font-size: 26px; overflow-wrap: anywhere; }
#saved-meta { margin: 8px 0 18px; }
@media (max-width: 670px) and (orientation: portrait) {
  #account-screen { grid-template-columns: minmax(0, 410px); justify-content: center; align-content: center; gap: 22px; padding-inline: max(var(--left), 22px) max(var(--right), 22px); }
  #title { font-size: 54px; }
  .entry-brand { padding-bottom: 0; }
  .entry-art { inset: 0 0 auto; height: 52%; mask-image: linear-gradient(#000 25%, transparent); }
  .character-body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .character-art { width: min(100%, 220px); justify-self: center; }
}
@media (max-height: 470px) and (orientation: landscape) {
  .entry-page { padding-block: var(--top) var(--bottom); }
  #title { font-size: 52px; }
  #account-screen { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 17px; padding-inline: max(var(--left), 17px) max(var(--right), 17px); }
  #entry #entry-modes { margin-bottom: 8px; }
  #entry #social-gm { gap: 8px; }
  .character-body { grid-template-columns: minmax(115px, 32fr) minmax(0, 68fr); gap: 15px; }
  .character-art { width: min(100%, max(108px, calc(100dvh - 95px))); justify-self: center; }
  .character-head { margin-bottom: 8px; padding-bottom: 6px; }
  #character-title { font-size: 27px; }
  #entry .option { min-height: 57px; }
  #entry .identity { margin-block: 8px; }
}
@media (max-width: 350px) {
  #entry .option small { white-space: normal; text-align: center; }
  #title { font-size: 46px; }
}
