body.account-arrival {
  background: #302a23 url('./place-previews/room-4-1.webp') center / cover no-repeat fixed;
}
body.account-arrival #main-area { visibility: hidden; }
#account-panel {
  --account-ink: #233d28;
  --account-brass: #a98049;
  --account-paper: #f6e6c6;
  --account-serif: 'Songti SC', 'Noto Serif SC', SimSun, serif;
  position: fixed;
  inset: 0;
  width: min(94vw, 37rem);
  max-width: none;
  max-height: 94dvh;
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 16px;
  color: var(--account-ink);
  background: transparent;
  box-shadow: 0 18px 64px #1c120bad;
  font: 15px/1.5 system-ui, sans-serif;
}
#account-panel[data-mode="signin"], #account-panel[data-mode="logout"] { width: min(93vw, 29rem); }
#account-panel::backdrop { background: #1e190f89; backdrop-filter: blur(3px); }
.account-ticket, .account-book {
  position: relative;
  padding: 24px clamp(16px, 4vw, 32px);
  border: 3px double var(--account-brass);
  border-radius: 16px;
  background: url('./assets/handbook/paper.webp') repeat, linear-gradient(145deg, #fbefcf, #efdbb7);
  box-shadow: inset 0 0 20px #a3724035;
}
.account-book {
  border: 5px double #b28a50;
  outline: 4px solid #354632;
  outline-offset: -5px;
  border-radius: 16px;
}
#account-panel h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 18px;
  width: fit-content;
  font: 800 clamp(1.65rem, 6vw, 2.35rem)/1.2 var(--account-serif);
  letter-spacing: .08em;
}
#account-panel .account-ticket h1 {
  padding: 9px 22px;
  margin-bottom: 16px;
  color: #fff0d2;
  border: 3px double #cdac70;
  border-radius: 10px;
  background: linear-gradient(180deg, #3f5734, #263b25);
  box-shadow: 0 3px 8px #41271056;
}
.account-emblem {
  width: 30px;
  height: 30px;
  padding: 4px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.account-ticket .account-emblem { filter: invert(91%) sepia(29%) saturate(513%) hue-rotate(336deg); }
.account-book .account-emblem { color: #963c2a; filter: sepia(1) saturate(420%) hue-rotate(325deg); }
.account-subtitle, .account-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  margin: 0 auto 17px;
  font: 700 17px/1.3 var(--account-serif);
}
.account-subtitle::before, .account-subtitle::after,
.account-note::before, .account-note::after {
  content: '';
  width: 1.45em;
  height: 1px;
  background: #9e835b;
}
.account-note { margin: 14px auto 8px; font-size: 13px; color: #62553c; }
#account-panel form { display: grid; gap: 11px; }
.account-row {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  align-items: center;
  gap: 7px 12px;
  min-width: 0;
}
.account-tag {
  display: block;
  align-self: start;
  padding: 7px 2px;
  border: 3px double #ad9569;
  border-radius: 7px;
  background: #ead8ad;
  text-align: center;
  white-space: nowrap;
  font: 800 16px/1.2 var(--account-serif);
}
#account-panel :is(input:not([type="radio"], [type="checkbox"]), select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #ad9569;
  border-radius: 7px;
  font: inherit;
  color: #322c20;
  background: #fff9e96e;
}
#account-panel :is(button, input, select, textarea, summary):focus-visible {
  outline: 2px solid #426a4d;
  outline-offset: 2px;
}
#account-panel input { accent-color: #345a38; }
#account-panel textarea {
  resize: vertical;
  background: repeating-linear-gradient(transparent 0 21px, #d1b98a99 21px 22.5px) 0 7px / 100% 100%, #fff9e96e;
}
.account-phone, .account-code, .account-region, .account-genders {
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.account-phone {
  gap: 0;
  border: 1px solid #ad9569;
  border-radius: 7px;
  background: #fff9e96e;
}
.account-phone > span { padding: 0 8px; border-right: 1px solid #b59d78a6; }
#account-panel .account-phone input { border: 0; background: none; min-height: 38px; }
#account-panel button {
  min-height: 40px;
  padding: 5px 10px;
  border: 1px solid #9b8355;
  border-radius: 7px;
  background: #f6eaca;
  color: var(--account-ink);
  font: 700 14px/1.3 system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
#account-panel button:hover:enabled { filter: brightness(1.07); }
#account-panel button:disabled { opacity: .57; cursor: default; }
#account-panel .account-primary {
  min-height: 45px;
  border: 3px double #c7a469;
  border-radius: 9px;
  color: #fff0ce;
  background: linear-gradient(#405a37, #284126);
  box-shadow: 0 2px 5px #624b2d4d;
  font: 800 22px/1.3 var(--account-serif);
  letter-spacing: .05em;
}
#account-panel .account-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 2px double #dab781;
  border-radius: 50%;
  background: #344b2e;
  min-height: 34px;
  width: 34px;
  padding: 0;
  color: #ffefcc;
  font-size: 21px;
}
.account-region-note {
  grid-column: 2;
  margin-top: -4px;
  font-size: 12px;
  color: #66573a;
}
.account-pin {
  display: inline-grid;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  place-items: center;
  background: #596237;
  border-radius: 50% 50% 50% 0;
  transform: translateY(-1px) rotate(-45deg);
}
.account-pin::after {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f6eaca;
}
.account-genders { gap: 20px; }
.account-genders label { display: flex; min-height: 38px; align-items: center; gap: 5px; cursor: pointer; }
.account-genders input { width: 16px; height: 16px; }
.account-roster {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}
.account-roster > p { grid-column: 1/-1; margin: 0; color: #66573a; }
.account-avatar { position: relative; min-width: 0; display: block; cursor: pointer; }
.account-avatar > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.account-avatar > span {
  position: relative;
  display: block;
  overflow: hidden;
  border: 2px solid #c9aa73;
  border-radius: 7px;
  color: #34432b;
  background: #ead6b0;
  box-shadow: 0 2px 3px #62441f3d;
  text-align: center;
}
.account-avatar img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.account-avatar b { display: block; font-size: 11px; padding: 2px 0; white-space: nowrap; }
.account-avatar input:checked + span { border-color: #355837; background: #d4dfbe; }
.account-avatar input:checked + span::after {
  content: '✓';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #355837;
  color: #fff4db;
  font: bold 13px/17px system-ui;
}
.account-avatar input:focus-visible + span { outline: 2px solid #49704b; outline-offset: 2px; }
.account-feedback { margin: 0; min-height: 1em; font-size: 13px; color: #315b3c; }
.account-feedback:empty { display: none; }
.account-feedback.is-error { color: #852e22; }
.account-recovery {
  border-top: 1px solid #b8956080;
  padding-top: 8px;
  color: #5f543b;
  font-size: 13px;
}
.account-recovery summary { cursor: pointer; width: fit-content; margin: auto; }
.account-recovery label { display: block; margin: 7px 0 3px; }
.account-recovery .account-carry { display: flex; gap: 6px; align-items: center; }
#account-panel .account-text { justify-self: center; background: transparent; border: 0; text-decoration: underline; }
.account-logout p { margin: 6px 0 18px; text-align: center; }

@media (max-width: 480px) {
  .account-ticket, .account-book { padding: 18px 14px; }
  #account-panel form { gap: 8px; }
  .account-row { grid-template-columns: 4rem minmax(0, 1fr); column-gap: 8px; }
  .account-tag { font-size: 14px; }
  .account-look { grid-template-columns: 1fr; justify-items: start; }
  .account-look .account-tag { padding-inline: 8px; }
  .account-roster { width: 100%; }
  #account-panel :is(input:not([type="radio"], [type="checkbox"]), select, textarea) { font-size: 16px; }
}
