#registration-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 16px;
  box-sizing: border-box;
  background: #2d3926 url('assets/backgrounds/edge-panorama-1920.webp') center / cover no-repeat;
  overflow: auto;
}

#registration-screen[open] { display: grid; place-items: safe center; }
html[data-mobile-game] #registration-screen { background-image: url('assets/backgrounds/edge-panorama-960.webp'); }

.registration-card {
  display: grid;
  gap: 9px;
  width: min(100%, 420px);
  box-sizing: border-box;
  padding: clamp(20px, 4vmin, 38px);
  color: #432919;
  background: url('assets/cardboard/dialogue-paper.webp') center / 100% 100% no-repeat;
  filter: drop-shadow(0 10px 22px #26160876);
  line-height: 1.35;
}

.registration-card h1 { margin: 0 0 9px; color: #663f25; font: bold clamp(32px, 6vmin, 50px)/1.12 Georgia, serif; }
.registration-card label { font-weight: 800; }
.registration-card input[type='text'] {
  min-width: 0;
  border: 1px solid #9b7150;
  border-radius: 5px;
  padding: 10px 12px;
  background: #fff1d1;
  color: inherit;
  font: inherit;
  font-size: max(16px, 1em);
}

.registration-card :is(input, button):focus-visible { outline: 2px solid #294c38; outline-offset: 3px; }
.registration-card p { margin: 0; font-size: .86rem; }
#registration-error { color: #801f15; font-weight: 750; }
#registration-error:empty { display: none; }
.registration-card button {
  min-height: 42px;
  margin-top: 6px;
  border: 1px solid #294c38;
  border-radius: 5px;
  background: #315543;
  color: #fff0cf;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.registration-card button:disabled { opacity: .76; cursor: wait; }
.registration-card[hidden] { display: none; }

.registration-create {
  width: min(100%, 1120px, calc(100dvh * 1.45));
  grid-template-columns: minmax(0, 1.24fr) minmax(0, .81fr);
  grid-template-areas: 'controls preview' 'actions preview';
  align-items: stretch;
  gap: clamp(6px, 1.35vmin, 14px) clamp(20px, 3.9vw, 56px);
  padding: clamp(20px, 4.1vw, 58px);
  border: clamp(4px, .65vw, 9px) solid transparent;
  border-radius: 10px 7px 13px 7px;
  box-shadow: inset 0 0 0 2px #ffd588, inset 0 0 24px #77461d68, 0 8px 18px #2b170ca0;
  background: url('assets/cardboard/paper-grain.webp') center / 360px auto repeat padding-box,
    #704724 url('assets/techniques/reference/frame-wood.webp') left center / 34px auto repeat border-box;
  position: relative;
}
.registration-create::before {
  content: '';
  position: absolute;
  inset: 7px;
  pointer-events: none;
  border: 1px dashed #884723b2;
  border-radius: 5px 8px 4px 7px;
}
.registration-controls { grid-area: controls; display: grid; min-width: 0; align-content: start; gap: clamp(6px, 1.35vmin, 14px); }
.registration-actions { grid-area: actions; display: grid; gap: 4px; }
.registration-create h1 {
  margin: 0 0 .1em;
  color: #672f16;
  font-size: clamp(40px, 7.8vmin, 84px);
  line-height: 1;
}
.registration-controls > label, .registration-create legend {
  color: #532c16;
  font: 700 clamp(15px, 2.7vmin, 26px)/1.08 Georgia, serif;
}
.registration-controls > input[type='text'] {
  width: 100%;
  background: #fff0ca;
  font-family: Georgia, serif;
  font-size: clamp(17px, 3vmin, 31px);
  min-height: 44px;
}
#registration-hint { color: #65472e; margin-top: -.35em; }
.registration-create fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.registration-create legend { padding: 0; margin-bottom: .43em; }
.registration-create input[type='radio'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.registration-gender, .registration-looks, .registration-fitting { display: grid; min-width: 0; }
.registration-gender { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; border-bottom: 1px solid #915d37; }
.registration-gender label, .registration-looks label, .registration-fitting label { min-width: 0; cursor: pointer; }
.registration-gender label > span, .registration-look-card, .registration-fitting label > span {
  display: grid;
  place-items: center;
  border: 1px solid #a56b3c;
  border-radius: 5px;
  color: #532c16;
  background: #f3cf95 url('assets/cardboard/paper-grain.webp') center / 265px auto;
  text-align: center;
}
.registration-gender label > span {
  min-height: 36px;
  padding: .35em .4em;
  border-radius: 7px 7px 0 0;
  font: 700 clamp(14px, 2.5vmin, 25px)/1.05 Georgia, serif;
}
.registration-gender input:checked + span,
.registration-fitting input:checked + span { color: #fff2c9; background: #4a5a31 url('assets/cardboard/cloth-grain.webp') center / 230px auto; background-blend-mode: multiply; }
.registration-looks {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(3px, .7vw, 9px);
  margin-top: clamp(5px, 1.5vmin, 17px);
}
.registration-look-card {
  aspect-ratio: 1;
  padding: 2px;
  background-color: #e8b775;
  overflow: hidden;
}
.registration-look-card img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.registration-looks input:checked + span {
  border-color: #586237;
  box-shadow: inset 0 0 0 2px #ffe5ae, 0 0 0 2px #60723a;
  background-color: #ffe5b3;
}
.registration-premium-looks:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(4px, .65vw, 8px);
  margin-top: clamp(6px, 1.2vmin, 12px);
}
.registration-card .registration-premium-card {
  position: relative;
  display: grid;
  grid-template-columns: clamp(28px, 5vmin, 49px) minmax(0, 1fr) clamp(15px, 3vmin, 28px);
  align-items: center;
  gap: clamp(3px, .6vmin, 7px);
  min-height: 0;
  margin: 0;
  padding: 3px 5px;
  border-color: #a87850;
  color: #533421;
  background: #e7c697 url('assets/cardboard/paper-grain.webp') center / 250px auto;
  text-align: left;
  font: 700 clamp(10px, 1.75vmin, 17px)/1.12 Georgia, serif;
}
.registration-premium-card:hover { filter: brightness(1.06); }
.registration-card .registration-premium-card[aria-pressed='true'] {
  border-color: #79573c;
  box-shadow: inset 0 0 0 2px #ffe9ba, 0 0 0 2px #9a7049;
}
.registration-premium-card img { display: block; width: 100%; object-fit: contain; }
.registration-premium-thumb { aspect-ratio: 1; }
.registration-create[data-premium-preview] .registration-looks input:checked + span {
  box-shadow: none;
  border-color: #a56b3c;
  background-color: #e8b775;
}
.registration-create input[type='radio']:focus-visible + span { outline: 2px solid #294c38; outline-offset: 2px; }
.registration-create label:hover > span { filter: brightness(1.05); }
.registration-create fieldset:disabled label { cursor: wait; }
.registration-actions button {
  min-height: clamp(42px, 7vmin, 70px);
  padding: .3em .6em .38em;
  font: 700 clamp(19px, 4vmin, 38px)/1 Georgia, serif;
  color: #ffe8b2;
  background: #526236 url('assets/cardboard/cloth-grain.webp') center / 240px auto;
  background-blend-mode: multiply;
  border: 1px solid #465333;
  border-radius: 7px;
  box-shadow: inset 0 0 0 2px #cfb2787a, 0 2px 3px #7248226e;
}
.registration-create[data-premium-preview] .registration-actions button {
  background-color: #695d49;
  border-color: #66513f;
  cursor: not-allowed;
}
.registration-preview { grid-area: preview; min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: clamp(6px, 1.4vmin, 14px); }
#registration-preview-doll {
  position: relative;
  min-height: clamp(200px, 40vmin, 440px);
  display: grid;
  place-items: stretch;
  background: radial-gradient(ellipse at 50% 57%, #ffe3a9 13%, #dfa96154 51%, transparent 71%);
}
#registration-preview-doll .doll-portrait {
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  container-type: size;
}
#registration-preview-doll .doll-stencil {
  align-self: center;
  width: min(68cqw, calc(87cqh * 291 / 580));
  height: auto;
  max-width: none;
  aspect-ratio: 291 / 580;
}
.registration-reference-figure {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: clamp(4px, 1.5vmin, 16px);
  object-fit: contain;
  filter: drop-shadow(2px 4px 2px #51362348);
}
.registration-create[data-premium-preview] .registration-premium-info {
  padding: clamp(5px, 1.2vmin, 13px) 6px;
  border: 1px solid #946840;
  border-radius: 6px;
  background: #60452e url('assets/cardboard/cloth-grain.webp') center / 220px auto;
  background-blend-mode: multiply;
  color: #fff0ca;
  text-align: center;
}
#registration-premium-name {
  margin: 0 0 .3em;
  font: 700 clamp(13px, 2.45vmin, 25px)/1.08 Georgia, serif;
}
#registration-premium-note { font: 650 clamp(10px, 1.8vmin, 17px)/1.22 system-ui, sans-serif; }
#registration-fitting {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: .45em;
  border: 1px dashed #9e653c;
  border-radius: 6px;
}
#registration-fitting[hidden] { display: none; }
.registration-create[data-premium-preview] #registration-fitting { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.registration-fitting legend { margin: 0; padding-inline: .25em; }
.registration-fitting label > span {
  min-height: 100%;
  padding: .2em .12em .31em;
  gap: 2px;
  font: 700 clamp(10px, 1.65vmin, 16px)/1.05 Georgia, serif;
}
.registration-create[data-premium-preview] .registration-fitting label > span {
  font-size: clamp(10px, 1.3vmin, 13px);
  overflow-wrap: anywhere;
}
.registration-fitting img { width: clamp(21px, 5vmin, 48px); height: clamp(21px, 5vmin, 48px); object-fit: contain; }

@media (max-height: 600px) and (orientation: landscape) {
  #registration-screen { padding: 8px; }
  .registration-create { width: min(100%, 750px); gap: 5px 14px; padding: 14px 19px; }
  .registration-create::before { inset: 4px; }
  .registration-controls { gap: 5px; }
  .registration-create h1 { font-size: clamp(30px, 9vmin, 48px); }
  .registration-controls > input[type='text'] { min-height: 35px; padding: 5px 8px; }
  .registration-actions button { min-height: 35px; margin-top: 2px; }
  .registration-gender label > span { min-height: 31px; }
  .registration-look-card { aspect-ratio: 1.14; max-height: 83px; }
  .registration-card .registration-premium-card { min-height: 36px; }
  #registration-preview-doll { min-height: clamp(116px, 38vmin, 196px); }
}

@media (max-width: 520px) and (orientation: landscape) {
  #registration-fitting { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 4px; }
  .registration-create[data-premium-preview] #registration-fitting { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .registration-fitting label > span {
    grid-template-columns: 15px minmax(0, auto);
    justify-content: center;
    min-height: 24px;
    padding: 1px 2px;
    font-size: 10px;
  }
  .registration-fitting img { width: 14px; height: 14px; }
  .registration-create[data-premium-preview] .registration-fitting label > span {
    grid-template-columns: minmax(0, 1fr);
  }
  .registration-create[data-premium-preview] .registration-fitting label img { display: none; }
  .registration-card .registration-premium-card {
    grid-template-columns: 25px minmax(0, 1fr);
    padding: 3px;
  }
  .registration-premium-card img.registration-premium-lock {
    position: absolute;
    left: 2px;
    bottom: 2px;
    width: 14px;
    height: 14px;
  }
  .registration-create[data-premium-preview] .registration-actions button { font-size: 16px; }
}

@media (max-height: 365px) and (orientation: landscape) {
  #registration-screen { padding: 5px; }
  .registration-create { padding: 8px 12px; gap: 4px 11px; }
  .registration-controls { gap: 3px; }
  .registration-create h1 { margin: 0; font-size: clamp(25px, 8vmin, 34px); }
  .registration-controls > label, .registration-create legend { font-size: 13px; }
  .registration-controls > input[type='text'] { min-height: 30px; padding-block: 4px; line-height: 1.1; }
  #registration-hint { margin: 0; font-size: .7rem; line-height: 1.2; }
  .registration-gender label > span { min-height: 27px; }
  .registration-look-card { height: 43px; aspect-ratio: auto; }
  .registration-premium-looks:not([hidden]) { margin-top: 5px; }
  .registration-card .registration-premium-card { min-height: 31px; }
  .registration-actions button { min-height: 31px; }
}

@media (max-height: 265px) and (orientation: landscape) {
  .registration-create { padding: 6px 10px; gap: 2px 9px; }
  .registration-controls, .registration-actions { gap: 2px; }
  .registration-create h1 { font-size: 24px; }
  .registration-create legend { margin-bottom: 2px; }
  .registration-gender label > span { min-height: 23px; }
  .registration-look-card { height: 35px; }
  .registration-create .registration-actions button { min-height: 27px; margin-top: 2px; padding-block: 3px; font-size: 16px; }
  .registration-preview { gap: 3px; }
  #registration-preview-doll { min-height: 86px; }
  #registration-fitting { gap: 3px; padding: 3px; }
  .registration-fitting img { width: 15px; height: 15px; }
}

@media (max-width: 640px) and (orientation: portrait) {
  .registration-create { width: min(100%, 460px); grid-template-columns: 1fr; grid-template-areas: 'controls' 'preview' 'actions'; gap: 13px; padding: 20px; }
  .registration-create h1 { font-size: clamp(36px, 10vw, 56px); }
  #registration-preview-doll { min-height: clamp(150px, 48vw, 260px); }
}

@media (orientation: portrait) and (max-width: 640px) and (max-height: 660px) {
  #registration-screen { padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .registration-create { gap: 8px; padding: 13px; }
  .registration-create h1 { font-size: clamp(30px, 9vw, 38px); }
  .registration-controls { gap: 5px; }
  .registration-look-card { max-height: 58px; }
  .registration-preview { gap: 4px; }
  #registration-preview-doll { min-height: clamp(110px, 21dvh, 138px); }
}

@media (orientation: portrait) {
  html[data-mobile-game] #registration-screen {
    padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right));
    padding-block: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-bottom));
  }
  html[data-mobile-game] .registration-create { width: min(100%, 460px); }
  html[data-mobile-game] .registration-create :is(.registration-gender label > span, .registration-fitting label > span) { min-height: 44px; }
  html[data-mobile-game] .registration-card button { min-height: 44px; }
}

@media (orientation: landscape) and (min-height: 300px) {
  html[data-mobile-game] .registration-card button,
  html[data-mobile-game] .registration-create :is(.registration-gender label > span, .registration-controls > input[type='text']) { min-height: 44px; }
}

#registration-screen[open][data-account-entry] {
  padding: 0;
  overflow: hidden;
  background: #31231a;
}

.account-entry {
  --account-width: max(100%, calc(100dvh * 1487 / 1058));
  position: relative;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  align-items: center;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  color: #49230f;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.account-composition {
  position: relative;
  width: var(--account-width);
  aspect-ratio: 1487 / 1058;
  container-type: inline-size;
}

.account-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.account-logo {
  position: absolute;
  inset: 26.4% auto auto 8.5%;
  display: grid;
  place-items: center;
  width: 31.8%;
  height: 7.3%;
  margin: 0;
  color: #712b13;
  font: 950 4.65cqw/.94 "Arial Black", "Segoe UI Black", system-ui, sans-serif;
  letter-spacing: -.055em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-1.6deg) scaleX(.78);
}

.account-entry-heading {
  position: absolute;
  top: 39.45%;
  left: 8.9%;
  width: 30.25%;
  margin: 0;
  font-size: 3.02cqw;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.account-entry-heading::after {
  display: block;
  width: 72%;
  margin: .58cqw auto 0;
  border-top: .25cqw solid #a84927;
  border-radius: 50%;
  content: "";
  transform: rotate(.4deg);
}

#account-form {
  position: absolute;
  top: 48.1%;
  left: 9.55%;
  width: 29%;
}

.account-fields { display: grid; gap: 1.58cqw; }
.account-fields input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 4.35cqw;
  border: .17cqw solid #55280f;
  border-radius: .92cqw;
  padding: 0 1.28cqw;
  font: inherit;
  font-size: max(16px, 1.75cqw);
  color: #48230f;
  background: #ffe6b629;
}
.account-fields input::placeholder { color: #774325; opacity: 1; }
.account-fields input[aria-invalid='true'] { border-color: #a92b1c; box-shadow: inset 0 0 0 1px #a92b1c; }
.account-entry :is(input, button, a):focus-visible { outline: 2px solid #175861; outline-offset: 2px; }

.account-submit {
  width: 106%;
  height: 6.8cqw;
  margin: 1.87cqw -3% 0;
  padding: 0;
  border: 0;
  border-radius: 1.3cqw;
  color: #fff2c6;
  background: url('assets/entry/button-cloth.webp') center 49% / 105% 186% no-repeat;
  text-shadow: 0 1px 4px #322a11;
  font-size: max(16px, 2.36cqw);
  font-weight: 800;
}
.account-submit:enabled:hover, .account-news-sign:hover { filter: brightness(1.1); }
.account-submit:disabled { opacity: .72; }
.account-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  column-gap: .6cqw;
  margin-top: 1.45cqw;
  font-size: max(14px, 1.72cqw);
  line-height: 1.1;
}
.account-switch a {
  display: inline-flex;
  align-items: center;
  color: inherit;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: .19em;
}
#account-error {
  margin: .48cqw 0 0;
  color: #73281a;
  font-size: max(12px, 1.10cqw);
  font-weight: 700;
  line-height: 1.16;
  text-align: center;
  overflow-wrap: anywhere;
}
#account-error:empty { display: none; }

.account-news-sign {
  position: absolute;
  right: max(3.65%, env(safe-area-inset-right));
  bottom: max(5.25%, env(safe-area-inset-bottom));
  max-width: calc(100% - 2rem);
  min-height: 44px;
  padding: .55em 1em;
  border: 2px solid #b16a35;
  border-radius: 5px;
  background: #583013 url('assets/entry/wood-grain.webp') repeat;
  box-shadow: inset 0 0 0 2px #542610, 0 4px 6px #38200e75;
  color: #fff2cf;
  font-size: clamp(14px, 1.48vw, 22px);
  font-weight: 750;
  text-shadow: 0 1px 3px #311707;
}

#account-news {
  inset: 0 4vw 0 auto;
  width: min(700px, 58vw);
  max-width: calc(100dvw - 16px);
  max-height: calc(100dvh - 8px);
  margin: auto 0;
  padding: 0;
  border: 0;
  color: #422310;
  background: transparent;
}
#account-news::backdrop { background: #2313094a; }
.account-bulletin-paper {
  box-sizing: border-box;
  aspect-ratio: 3 / 2;
  padding: min(6.1vw, 82px) 12% min(5.2vw, 70px);
  background: url('assets/entry/news-board.webp') center / 100% 100% no-repeat;
}
.account-bulletin header { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.account-bulletin h2 { margin: 0; color: #743218; font: 800 clamp(20px, 3.05vw, 42px)/1.02 Georgia, serif; }
.account-news-close {
  display: block;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: url('assets/entry/close-stud.webp') center / contain no-repeat;
}
.account-bulletin-tabs { display: flex; gap: .35em; margin-top: .48rem; border-bottom: 2px solid #9e613a; }
.account-bulletin-tabs button {
  min-height: 36px;
  border: 1px solid #a16b42;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  padding: .28em .82em .38em;
  color: #562a14;
  background: #edbe81 url('assets/entry/paper-grain.webp') center / 340px auto;
  font-size: clamp(14px, 1.38vw, 19px);
  font-weight: 750;
}
.account-bulletin-tabs button[aria-selected='true'] {
  color: #fff5d7;
  border-color: #23463c;
  background: #324a3c url('assets/entry/button-cloth.webp') center / 120% 480% no-repeat;
}
.account-bulletin :is(button, [tabindex]):focus-visible { outline: 2px solid #175861; outline-offset: 2px; }
.account-bulletin [role='tabpanel'] { font-size: clamp(14px, 1.34vw, 18px); line-height: 1.27; }
.account-bulletin h3 { margin: 0; color: #6b2f15; font-size: 1.1em; line-height: 1.17; }
.account-bulletin p { margin: .3em 0 0; }
.account-notice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .58em; padding: .55em 0; }
.account-notice + .account-notice { border-top: 1px dashed #9a623b; }
.account-notice img { width: 2.7em; height: 2.7em; object-fit: contain; }

.registration-card .registration-account-name { font: 700 clamp(15px, 2.7vmin, 25px)/1.15 Georgia, serif; overflow-wrap: anywhere; }
.registration-actions .registration-back {
  justify-self: start;
  min-height: 36px;
  margin-top: 0;
  padding: .2em .4em;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: #67381e;
  font: 700 clamp(14px, 2.4vmin, 17px)/1.15 Georgia, serif;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.registration-create[data-premium-preview] .registration-actions .registration-back { background: transparent; cursor: pointer; }
#hero-profile .profile-frame-heading #account-logout {
  inset: 10% auto auto 4%;
  width: auto;
  min-height: 34px;
  aspect-ratio: auto;
  padding: .3em .65em;
  border: 1px solid #e0b06c8c;
  border-radius: 4px;
  background: #522813a6;
  color: #ffe8bd;
  font: 700 clamp(13px, 2cqw, 18px)/1.1 Georgia, serif;
}
#account-logout-screen:not([open]) { display: none; }
#account-logout-screen { border: 0; max-width: calc(100dvw - 24px); }
#account-logout-screen::backdrop { background: #2413099e; }
#account-logout-screen h2 { margin: 0; color: #663f25; font: 700 clamp(20px, 4.5vmin, 35px)/1.12 Georgia, serif; }
#account-logout-screen form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#account-logout-confirm { background: #784031; border-color: #612c1e; }
#account-logout-status:empty, #registration-ban-status:empty { display: none; }

@media (min-aspect-ratio: 2 / 1) {
  .account-composition { transform: translateY(-2dvh); }
}

@media (max-width: 760px) {
  #account-news { inset: 0; margin: auto; width: min(calc(100dvw - 12px), 550px); }
  .account-bulletin-paper { aspect-ratio: auto; min-height: 365px; padding: clamp(46px, 9vw, 62px) 12% clamp(56px, 8vw, 72px); }
}

@media (max-width: 640px) and (orientation: portrait) {
  .account-entry { --account-width: clamp(223dvw, calc(100dvh * 1487 / 1058), 310dvw); }
  .account-composition { height: 100%; margin-left: min(0px, calc(50dvw - var(--account-width) * .242)); }
  .account-fields input { min-height: 44px; }
  .account-submit { min-height: 48px; }
  .account-switch a { min-height: 36px; }
  .account-news-sign { right: max(1rem, env(safe-area-inset-right)); bottom: max(13px, env(safe-area-inset-bottom)); }
}

@media (max-height: 540px) and (orientation: landscape) {
  .account-fields input { min-height: 36px; font-size: clamp(16px, 2cqw, 20px); }
  .account-switch a { min-height: 28px; }
  #account-news { inset: 0; margin: auto; width: min(80vw, 610px); }
  .account-bulletin-paper { aspect-ratio: auto; min-height: 0; padding: 9dvh 11%; }
  .account-bulletin h2 { font-size: clamp(20px, 3.05vw, 29px); }
  .account-bulletin-tabs { margin-top: 3px; }
  .account-bulletin-tabs button { min-height: 31px; }
  #hero-profile .profile-frame-heading #account-logout { inset: 0 auto auto 4%; min-height: 31px; }
}

@media (max-height: 300px) and (orientation: landscape) {
  .account-composition { transform: translateY(-10dvh); }
  .account-logo { top: 27.4%; }
  .account-entry-heading { top: 38%; }
  #account-form { top: 46%; }
  .account-fields { gap: 5px; }
  .account-fields input { height: 32px; min-height: 32px; }
  .account-submit { height: 36px; margin-top: 3px; }
  .account-switch { margin-top: 0; }
  .account-switch a { min-height: 24px; }
  #account-error {
    position: absolute;
    top: 0;
    left: calc(100% + 24px);
    width: min(39cqw, 240px);
    margin: 0;
    padding: .5em .7em;
    border: 1px solid #774325;
    border-radius: 5px;
    background: #ffe2af url('assets/entry/paper-grain.webp') center / 340px auto;
    text-align: left;
  }
  .account-bulletin-paper { padding-block: 8dvh; }
  .account-bulletin [role='tabpanel'] { font-size: 12px; }
  .account-news-close { width: 33px; height: 33px; }
  .account-notice { padding-block: .35em; }
  html[data-mobile-game] #hero-profile .profile-frame-heading #account-logout { top: 0; min-height: 27px; }
}

@media (max-height: 300px) and (min-aspect-ratio: 5 / 2) {
  .account-composition { height: calc(100dvh + 40px); transform: translateY(-19px); }
  .account-logo { font-size: clamp(22px, 11dvh, 37px); }
  .account-entry-heading { font-size: clamp(16px, 7dvh, 24px); }
}
