.xy-account-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: auto;
  color: #f7edd3;
  background: #123f18 url("./assets/launcher/native/06/0662a401-5495-47d9-891e-4105363706ac.0be04.png") center / cover no-repeat;
  user-select: none;
}

.xy-account-gate[hidden] { display: none; }
.xy-auth-shell { width: min(410px, 100%); text-align: left; }
.xy-auth-brand { margin-bottom: 12px; text-align: center; text-shadow: 0 2px 2px rgba(0, 0, 0, .8); }
.xy-auth-brand strong { display: block; color: #ffd448; font-size: 34px; line-height: 1.15; }
.xy-auth-brand span { display: block; margin-top: 5px; color: #fff2c4; font-size: 13px; }

.xy-auth-panel {
  padding: 20px;
  background: #efe1c5;
  border: 4px solid #522619;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45), inset 0 0 0 2px #b87d38;
}

.xy-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 2px solid #713a24;
  border-radius: 4px;
  overflow: hidden;
}

.xy-auth-tabs button {
  min-height: 42px;
  color: #64331f;
  background: #d7bb8e;
  border: 0;
  border-right: 1px solid #8c5936;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}
.xy-auth-tabs button:last-child { border-right: 0; }
.xy-auth-tabs button.active { color: #fff4cf; background: #8d3f24; }

.xy-auth-form { display: grid; gap: 13px; }
.xy-auth-form[hidden] { display: none; }
.xy-auth-form label { display: grid; gap: 6px; color: #582c1c; font-size: 14px; font-weight: 700; }
.xy-auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: #352018;
  background: #fff9e9;
  border: 2px solid #a66d3c;
  border-radius: 4px;
  outline: none;
  font: 16px/1.2 "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
  user-select: text;
}
.xy-auth-form input:focus { border-color: #287051; box-shadow: 0 0 0 3px rgba(40, 112, 81, .16); }
.xy-auth-form .xy-auth-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 28px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.xy-auth-consent {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 28px;
  margin-top: 12px;
  cursor: pointer;
  color: #582c1c;
  font-size: 13px;
  font-weight: 700;
}
.xy-auth-form .xy-auth-remember input,
.xy-auth-consent input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid #8a5735;
  border-radius: 3px;
  box-shadow: none;
  accent-color: #287051;
  cursor: pointer;
}
.xy-auth-form .xy-auth-remember input:focus-visible,
.xy-auth-consent input:focus-visible {
  outline: 3px solid rgba(40, 112, 81, .24);
  outline-offset: 2px;
  box-shadow: none;
}
.xy-auth-command {
  min-height: 48px;
  margin-top: 4px;
  color: #40200f;
  background: #e5b72f;
  border: 2px solid #814215;
  border-radius: 4px;
  box-shadow: inset 0 -3px 0 rgba(126, 71, 16, .25);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}
.xy-auth-command:active { transform: translateY(1px); }
.xy-auth-command:disabled { opacity: .55; }
.xy-auth-message { min-height: 20px; margin: 12px 0 0; color: #664230; text-align: center; font-size: 13px; }
.xy-auth-message.error { color: #a21f1f; }
.xy-auth-message.success { color: #176042; }

#splash[data-xy-status] {
  z-index: 9000;
}
#splash[data-xy-status]::after {
  content: attr(data-xy-status);
  position: absolute;
  left: 50%;
  top: calc(80% + 24px);
  width: min(88%, 520px);
  transform: translateX(-50%);
  color: #fff2c4;
  font: 700 14px/1.6 "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 2px 4px #000;
}

.xy-boot-recovery {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: auto;
  color: #4a2718;
  background: rgba(12, 10, 8, .94);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
}
.xy-boot-recovery[hidden] { display: none; }
.xy-boot-recovery-panel {
  width: min(440px, 100%);
  padding: 22px;
  background: #efe1c5;
  border: 4px solid #522619;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .55), inset 0 0 0 2px #b87d38;
  text-align: left;
}
.xy-boot-recovery h1 { margin: 0 0 12px; color: #752e1e; font-size: 22px; line-height: 1.35; }
.xy-boot-recovery p { margin: 8px 0; color: #523426; font-size: 14px; line-height: 1.7; }
.xy-boot-recovery .xy-boot-recovery-status { color: #8c3a25; font-size: 12px; }
.xy-boot-recovery-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 12px; }
.xy-boot-recovery button {
  min-height: 46px;
  padding: 8px;
  color: #40200f;
  background: #e5b72f;
  border: 2px solid #814215;
  border-radius: 4px;
  box-shadow: inset 0 -3px 0 rgba(126, 71, 16, .25);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}
.xy-boot-recovery button.secondary { color: #f7edd3; background: #80432e; }
.xy-boot-recovery small { display: block; color: #765244; font-size: 12px; line-height: 1.6; }

@media (max-width: 430px) {
  .xy-boot-recovery-actions { grid-template-columns: 1fr; }
}

@media (max-height: 680px) {
  .xy-account-gate { place-items: start center; }
  .xy-auth-brand strong { font-size: 28px; }
  .xy-auth-panel { padding: 15px 18px; }
  .xy-auth-tabs { margin-bottom: 12px; }
  .xy-auth-form { gap: 9px; }
  .xy-auth-form input { min-height: 40px; }
}
