.ag-account {
  width: min(29rem, calc(100% - 2rem));
  max-height: min(45rem, calc(100% - 2rem));
  margin: auto;
  padding: 0;
  overflow: auto;
  color: #1b1732;
  background: #fff;
  border: 1px solid #e3dafb;
  border-radius: 1.45rem;
  box-shadow: 0 1.4rem 5rem #1c0a4666;
}

.ag-account::backdrop { background: #191030b3; }
.ag-account [hidden] { display: none !important; }

.ag-account-head {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: 1rem 1.2rem;
  background: #f2edff;
  border-bottom: 1px solid #e6ddfa;
}

.ag-account h2, .ag-account h3, .ag-account p { margin: 0; }
.ag-account h2 { font-size: 1.22rem; line-height: 1.2; overflow-wrap: anywhere; }
.ag-account h3 { margin-block-end: .6rem; font-size: 1.03rem; }
.ag-account p { line-height: 1.45; }

.ag-account-body { padding: 1.15rem 1.2rem 1.3rem; }
.ag-account section > p { margin-block-end: .85rem; color: #52486b; }
.ag-account form { display: grid; gap: .7rem; }
.ag-account form + button { margin-block-start: .75rem; }
.ag-account label { display: grid; gap: .28rem; font-weight: 700; font-size: .88rem; }

.ag-account input {
  min-width: 0;
  width: 100%;
  min-height: 2.8rem;
  padding: .58rem .7rem;
  border: 1px solid #d2c7ee;
  border-radius: .65rem;
  background: #fbfaff;
  font: inherit;
  font-size: 1rem;
  color: inherit;
}

.ag-account button {
  min-height: 2.75rem;
  padding: .5rem .7rem;
  border: 1px solid #e4daf8;
  border-radius: .65rem;
  color: #5530bc;
  background: #f5f0ff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.ag-account button:hover { background: #ece3fd; }
.ag-account button:disabled { opacity: .6; cursor: wait; }
.ag-account :is(button, input):focus-visible { outline: 2px solid #6a3fe0; outline-offset: 3px; }
.ag-account button[data-account-close] { flex: 0 0 2.75rem; padding: 0; font-size: 1.5rem; font-weight: 500; }
.ag-account button.ag-account-primary { color: #fff; border-color: #6034da; background: #683fe0; }
.ag-account button.ag-account-primary:hover { background: #5830c9; }
.ag-account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-block-start: .8rem; }
.ag-account-note { color: #605479; font-size: .85rem; }
.ag-account [data-account-guest] { margin-block-end: .85rem; }
.ag-account .ag-account-status { margin-block-end: .85rem; color: #4c2fb2; font-size: .9rem; }
.ag-account .ag-account-error { color: #982a55; }
.ag-account .ag-recovery-key { color: #4926ab; background: #f4efff; font-family: monospace; font-size: clamp(.72rem, 3vw, .98rem); }

.ag-mode-progress { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-block-end: 1.25rem; }
.ag-mode-stat {
  display: grid;
  gap: .25rem;
  padding: .72rem;
  border: 1px solid #e8ddf9;
  border-radius: .75rem;
  background: #f6f1ff;
}
.ag-mode-stat:nth-child(2) { background: #fff0f7; border-color: #f8dbe9; }
.ag-mode-stat:nth-child(3) { background: #f4fbdc; border-color: #e6efbd; }
.ag-mode-stat:nth-child(4) { background: #edfaff; border-color: #d3eef9; }
.ag-mode-stat span { font-size: .84rem; font-weight: 750; }
.ag-mode-stat strong { font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.ag-mode-stat small { color: #594f70; font-size: .75rem; }

.ag-recent-rounds { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.ag-recent-rounds li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem .65rem;
  padding-block-end: .4rem;
  color: #544765;
  border-bottom: 1px solid #eee7f9;
  font-size: .84rem;
}
