.game-dialog {
  width: 560px;
  max-width: calc(100% - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: auto;
  background: transparent;
  color: #3c4041;
  font-family: var(--body);
  box-shadow: none;
}
.game-dialog::backdrop { background: #07111bb3; backdrop-filter: none; }
.dialog-heading {
  display: flex;
  align-items: center;
  width: 248px;
  height: 51px;
  padding: 0 26px 2px;
  background: url("/ui/popup-tab.png") left center / 100% 100% no-repeat;
  color: #fff;
  font: 400 26px/1 var(--display);
  text-shadow: 0 1px 2px #171a1b;
}
.dialog-sheet {
  border: 1px solid #ffffffb3;
  border-radius: 0;
  background: linear-gradient(#f1f1f1eb, #e4e4e4ed), url("/art/title-ensemble.webp") center 42% / cover no-repeat;
  box-shadow: inset 0 0 0 2px #ffffff5e, 0 8px 25px #0003;
}
.dialog-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 77px;
  margin: 0;
  padding: 15px 24px;
  border-top: 2px solid #fffffff0;
  border-bottom: 1px solid #b4b5b7;
  background: linear-gradient(#ffffffe0, #ffffffa3);
  box-shadow: 0 3px 3px #0002;
  color: #3d4041;
  font: 400 38px/1.1 var(--display);
  text-align: center;
  overflow-wrap: anywhere;
}
.dialog-copy { padding: 26px 28px 30px; }
.dialog-copy p, .dialog-copy ul { font-size: 13px; line-height: 1.8; color: #45494b; }
.dialog-copy ul { padding-left: 19px; margin: 20px 0 0; }
.dialog-copy li + li { margin-top: 12px; }
.dialog-copy .dialog-note { margin-top: 18px; font-size: 11px; color: #5c6061; }
.dialog-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 93px;
  padding: 12px 20px;
  border-top: 1px solid #aaaeb0;
  background: linear-gradient(#ffffffad, #f2f2f299);
  box-shadow: 0 -2px 3px #0002, inset 0 1px #fff;
}
.dialog-close {
  display: block;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("/ui/popup-close.png") center / 100% 100% no-repeat;
  font-size: 0;
  cursor: pointer;
}
.game-dialog .pill-button {
  display: block;
  width: 220px;
  max-width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 12px 18px;
  margin: 10px auto 0;
  border: 1px solid #2877a3;
  border-radius: 16px;
  background: #3189b9;
  color: #fff;
  font: 400 17px/1.3 var(--body);
  text-shadow: 0 1px 2px #183d58;
  text-align: center;
  cursor: pointer;
}
.dialog-close:hover, .game-dialog .pill-button:hover { filter: brightness(1.08); }
.game-dialog button:focus-visible, .game-dialog input:focus-visible { outline: 2px solid #175e91; outline-offset: 3px; }
.game-dialog a:focus-visible { outline: 2px solid #175e91; outline-offset: 3px; }
.download-copy [hidden] { display: none !important; }
.download-copy > p { margin: 0 0 16px; }
#download-status:empty { display: none; }
.download-option { padding: 20px 0; border-top: 1px solid #bfc6c3; }
.download-option h3 { margin: 0 0 10px; font-size: 17px; font-weight: 400; }
.download-option p { margin: 8px 0; overflow-wrap: anywhere; }
.download-option .download-details, .download-option details { font-size: 11px; line-height: 1.7; }
.download-option summary { cursor: pointer; }
.download-option code { display: block; margin-top: 6px; overflow-wrap: anywhere; user-select: all; }
.download-option .pill-button { text-decoration: none; box-sizing: border-box; }
.download-option button:disabled { background: #737b7f; border-color: #626b70; text-shadow: none; cursor: not-allowed; filter: none; }
.account-copy { padding: 28px 50px 32px; }
.account-copy form { display: grid; gap: 12px; }
.account-copy [hidden] { display: none !important; }
.account-copy label { font-size: 13px; color: #414649; }
.account-copy input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #8f9598;
  border-radius: 0;
  background: #ffffffcf;
  box-shadow: inset 0 2px 3px #00000014, 0 1px #fff;
  color: #343a3e;
  font: 16px/1.4 Arial, sans-serif;
}
.download-button {
  border: 1px solid #2877a3;
  border-radius: 16px;
  background: #3189b9;
  box-shadow: none;
  padding: 13px 16px;
  color: #fff;
  text-shadow: 0 1px 2px #183d58;
}
.download-button:hover { background: #267ca9; transform: none; }
.download-button small { color: #fff; }
.game-nav { gap: 18px; }
.game-nav a {
  min-width: 96px;
  padding: 8px 18px 9px;
  text-align: center;
  background: none;
}
.game-nav a:after { bottom: 3px; left: 18px; right: 28px; }
.game-nav .account-button {
  padding: 9px 16px;
  border: 1px solid #b7c5c1;
  border-radius: 16px;
  background: #fff;
}
.game-nav .account-button:hover { background: #f1f5f2; }
@media (max-width: 600px) {
  .game-nav { gap: 10px; }
  .game-nav a { min-width: 0; padding: 6px 10px 7px; }
  .game-nav .account-button { padding: 9px 12px; font-size: 11px; }
  .download-button { padding: 12px 10px; }
}
@media (max-width: 360px) {
  .game-nav { gap: 8px; }
  .game-nav a { padding-left: 7px; padding-right: 7px; }
  .game-nav .account-button { padding: 9px 11px; font-size: 10px; }
  .download-button { padding: 12px 8px; }
}
.account-copy .account-help { font-size: 11px; margin: 0; text-align: center; }
.account-text-button { border: 0; background: none; padding: 5px 0; text-decoration: underline; font: 11px/1.5 var(--body); cursor: pointer; color: #4e5559; text-align: center; }
.account-copy button:disabled { opacity: .55; cursor: wait; }
#account-status:not(:empty) { margin: 0 0 18px; font-size: 12px; line-height: 1.7; text-align: center; color: #56504a; }
#account-status:empty { display: none; }
#account-signed-in p { text-align: center; }
#account-signed-in p + p { margin-top: 8px; font-size: 11px; }
#account-signed-in > .account-text-button { display: block; margin: 16px auto; }
#account-slot-selector { border: 0; margin: 0 0 20px; padding: 0; }
#account-slot-selector legend { margin-bottom: 12px; font-size: 13px; color: #555; }
#account-save-list { display: grid; gap: 0; }
.account-copy .save-slot { display: flex; gap: 12px; align-items: center; padding: 13px 4px; border-bottom: 1px solid #c6cdca; cursor: pointer; }
.account-copy .save-slot span { display: grid; gap: 5px; }
.account-copy .save-slot strong { font-weight: 400; font-size: 14px; }
.account-copy .save-slot small { font-size: 11px; color: #666; }
.account-copy input[type="radio"], .account-copy input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; padding: 0; margin: 0; box-shadow: none; accent-color: #b88426; }
.save-slot input:checked + span strong { color: #a26d15; }
#account-add-existing { margin: 18px 0; }
#account-add-existing summary { padding: 10px 0; cursor: pointer; font-size: 13px; }
#account-new-form { margin: 20px 0; padding: 16px 0; border-top: 1px solid #c6cdca; border-bottom: 1px solid #c6cdca; }
.account-copy .save-confirm { display: flex; align-items: center; gap: 10px; font-size: 12px; }
#account-recovery-result { display: grid; gap: 10px; margin-top: 22px; }
#account-recovery-result input { font: 13px/1.5 monospace; }
.memory-stages { grid-template-columns: 1fr 1fr; gap: 0 32px; }
.memory-stage { border: 0; border-bottom: 1px solid #d1d8d1; min-height: 148px; padding: 24px 0; background: transparent; box-shadow: none; gap: 20px; }
.memory-stage::before { display: none; }
.memory-stage:hover { transform: none; background: #fff7e650; }
.chapter-number { display: grid; place-items: center; flex: 0 0 54px; height: 62px; margin-top: 14px; border-top: 3px solid #d7a33d; border-bottom: 1px solid #d7a33d; color: #a87522; font-size: 32px; background: #fff6df; }
.chapter-copy small { align-self: flex-start; padding: 3px 9px; background: #f2b748; color: #4c381e; font-size: 10px; }
.chapter-copy strong { font-size: 28px; }
.memory-stage.is-active { border-bottom-color: #c6932c; }
@media (max-width: 600px) {
  .memory-stages { grid-template-columns: 1fr; gap: 0; }
  .memory-stage { min-height: 138px; padding: 22px 0; gap: 16px; }
  .chapter-number { flex-basis: 46px; height: 56px; }
  .chapter-copy strong { font-size: 27px; }
}
@media (max-width: 600px) {
  .dialog-heading { width: 210px; height: 43px; padding-left: 22px; font-size: 24px; }
  .dialog-title { min-height: 69px; padding: 14px 18px; font-size: 34px; }
  .dialog-copy { padding: 22px 22px 26px; }
  .dialog-copy p, .dialog-copy ul { font-size: 12px; line-height: 1.75; }
  .dialog-actions { min-height: 86px; padding: 10px 18px; }
  .dialog-close { flex-basis: 60px; width: 60px; height: 60px; }
  .account-copy { padding: 24px 24px 28px; }
}
@media (max-width: 360px) {
  .dialog-copy { padding-left: 18px; padding-right: 18px; }
  .dialog-title { font-size: 30px; }
}
