:root {
  --stage1-accent: #2388df;
  --stage1-accent-strong: #176caf;
  --stage1-warm: #ffbd2e;
  --stage1-ink: #171a1f;
  --stage1-muted: #737984;
  --stage1-line: #e5e9ef;
  --stage1-surface: #ffffff;
  --stage1-bg: #edf4fb;
}

.stage1-menu-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
  object-fit: contain;
}

.stage1-menu-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .375rem;
  padding: .25rem 0;
  cursor: pointer;
}

/* Personal-center layout requested in the marked screenshots. */
body .page .top-content {
  min-height: 7.75rem;
}

body .page .profile-top-row {
  position: absolute;
  right: .75rem;
  width: auto !important;
  z-index: 4;
}

body .page .setting-btn {
  width: auto !important;
  min-width: 5.5rem;
  height: 2rem;
  padding: 0 .625rem;
  gap: .3125rem;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: .5rem;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 .125rem .5rem rgba(42, 79, 112, .08);
  backdrop-filter: blur(.5rem);
  -webkit-backdrop-filter: blur(.5rem);
}

.stage1-setting-label {
  color: #272b31;
  font-size: .75rem;
  line-height: 1;
  white-space: nowrap;
}

body .page .profile-row {
  align-items: flex-start !important;
  min-height: 5.25rem;
  padding-top: .125rem;
}

body .page .profile-left {
  display: grid !important;
  grid-template-columns: 3.75rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center !important;
  column-gap: .75rem !important;
  row-gap: .25rem !important;
}

body .page .profile-left > .avatar-wrap {
  grid-column: 1;
  grid-row: 1 / span 2;
}

body .page .profile-left > .name-row {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
}

body .page .profile-left > .uid {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}

body .page .profile-right {
  margin-top: 2.75rem !important;
}

body .page .uid-line {
  margin-top: .5rem !important;
}

body .page .more-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem 0 !important;
}

body .page .more-item {
  width: auto !important;
  min-width: 0;
}

body .page .more-icon-wrap {
  width: 1.5rem !important;
  height: 1.5rem !important;
}

body .page .more-label {
  width: 100%;
  min-height: 1.125rem;
  display: block !important;
  color: #666 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 15px;
  text-align: center !important;
  overflow-wrap: anywhere;
}

body .page .more-label > span {
  color: inherit !important;
  font: inherit !important;
  letter-spacing: 0 !important;
  line-height: inherit !important;
}

body .page .avatar-wrap[data-avatar-frame]:not([data-avatar-frame="none"]),
body .info-page .avatar-box[data-avatar-frame]:not([data-avatar-frame="none"]) {
  overflow: visible !important;
  background: #fff;
}

[data-avatar-frame="gold"] {
  border-color: #f0b323 !important;
  box-shadow: 0 0 0 .1875rem #fff2b8, 0 0 0 .3125rem #d89a12 !important;
}

[data-avatar-frame="rose"] {
  border-color: #f25f80 !important;
  box-shadow: 0 0 0 .1875rem #ffe0e7, 0 0 0 .3125rem #e3436b !important;
}

[data-avatar-frame="blue"] {
  border-color: #3595e6 !important;
  box-shadow: 0 0 0 .1875rem #dcedff, 0 0 0 .3125rem #1b72ba !important;
}

[data-avatar-frame="cosmic"] {
  border-color: #7659bf !important;
  box-shadow: 0 0 0 .1875rem #f3d8ff, 0 0 0 .3125rem #4f83d7 !important;
}

.stage1-route {
  position: fixed;
  inset: 0;
  z-index: 800000;
  overflow: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  background: var(--stage1-bg);
  color: var(--stage1-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

.stage1-route *,
.stage1-sheet * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.stage1-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(3.5rem + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) .75rem 0;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
  align-items: center;
  border-bottom: 1px solid var(--stage1-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(.75rem);
  -webkit-backdrop-filter: blur(.75rem);
}

.stage1-header__title {
  margin: 0;
  overflow: hidden;
  color: var(--stage1-ink);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage1-icon-button {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: .5rem;
  background: transparent;
  color: #30353c;
  font-size: 1.75rem;
  line-height: 1;
}

.stage1-main {
  width: min(100%, 32rem);
  min-height: calc(100dvh - 3.5rem);
  margin: 0 auto;
  padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom));
}

.stage1-panel {
  margin-bottom: .875rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: .5rem;
  background: var(--stage1-surface);
  box-shadow: 0 .1875rem .875rem rgba(36, 75, 108, .06);
}

.stage1-panel__title {
  margin: 0 0 .875rem;
  font-size: .9375rem;
  font-weight: 650;
}

.stage1-segmented {
  height: 2.75rem;
  padding: .1875rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .1875rem;
  border: 1px solid var(--stage1-line);
  border-radius: .5rem;
  background: #f3f6f9;
}

.stage1-segmented button {
  min-width: 0;
  border: 0;
  border-radius: .375rem;
  background: transparent;
  color: #68707b;
  font-size: .875rem;
}

.stage1-segmented button.is-active {
  background: #fff;
  color: var(--stage1-accent-strong);
  font-weight: 650;
  box-shadow: 0 .125rem .375rem rgba(34, 74, 107, .1);
}

.stage1-field {
  margin-top: .875rem;
}

.stage1-label {
  display: block;
  margin-bottom: .4375rem;
  color: #353a42;
  font-size: .8125rem;
  font-weight: 600;
}

.stage1-input,
.stage1-textarea {
  width: 100%;
  padding: .75rem;
  border: 1px solid #dce2e9;
  border-radius: .4375rem;
  outline: 0;
  background: #f8fafc;
  color: var(--stage1-ink);
  font: inherit;
  font-size: .875rem;
}

.stage1-input {
  height: 2.75rem;
}

.stage1-textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: 1.6;
}

.stage1-input:focus,
.stage1-textarea:focus {
  border-color: #72aee0;
  background: #fff;
  box-shadow: 0 0 0 .1875rem rgba(35, 136, 223, .1);
}

.stage1-upload-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .625rem;
}

.stage1-upload,
.stage1-upload-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: .4375rem;
}

.stage1-upload {
  border: 1px dashed #aeb9c5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: #66717d;
  font-size: .75rem;
}

.stage1-upload-thumb {
  position: relative;
  overflow: hidden;
  background: #eef2f6;
}

.stage1-upload-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.stage1-upload-remove {
  position: absolute;
  top: .25rem;
  right: .25rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 22, 27, .72);
  color: #fff;
  font-size: 1rem;
}

.stage1-primary-button,
.stage1-secondary-button {
  width: 100%;
  height: 3rem;
  padding: 0 1rem;
  border-radius: .5rem;
  font-size: .9375rem;
  font-weight: 650;
}

.stage1-primary-button {
  border: 1px solid var(--stage1-accent);
  background: var(--stage1-accent);
  color: #fff;
}

.stage1-primary-button:active {
  border-color: var(--stage1-accent-strong);
  background: var(--stage1-accent-strong);
}

.stage1-primary-button:disabled {
  opacity: .55;
}

.stage1-secondary-button {
  border: 1px solid #ced6df;
  background: #fff;
  color: #30363d;
}

.stage1-record {
  padding: .875rem 0;
  border-top: 1px solid #edf0f4;
}

.stage1-record:first-child {
  padding-top: 0;
  border-top: 0;
}

.stage1-record__meta {
  margin-bottom: .375rem;
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  color: var(--stage1-muted);
  font-size: .75rem;
}

.stage1-record__content,
.stage1-record__reply {
  margin: 0;
  color: #333942;
  font-size: .8125rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.stage1-record__reply {
  margin-top: .5rem;
  padding: .625rem;
  border-left: .1875rem solid var(--stage1-accent);
  background: #f2f8fd;
}

.stage1-empty,
.stage1-loading {
  min-height: 9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8a929d;
  font-size: .8125rem;
  text-align: center;
  line-height: 1.6;
}

.stage1-follow-list {
  display: grid;
  gap: .75rem;
}

.stage1-follow-card {
  padding: .875rem;
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  border: 1px solid var(--stage1-line);
  border-radius: .5rem;
  background: #fff;
  box-shadow: 0 .125rem .625rem rgba(36, 75, 108, .05);
}

.stage1-follow-card__avatar {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: .5rem;
  object-fit: cover;
  background: #edf1f5;
}

.stage1-follow-card__name {
  margin: 0;
  color: #1d2127;
  font-size: .9375rem;
  font-weight: 650;
}

.stage1-follow-card__meta {
  margin-top: .25rem;
  color: #65707c;
  font-size: .75rem;
}

.stage1-online {
  color: #16885e;
}

.stage1-follow-card__desc {
  max-width: 100%;
  margin-top: .375rem;
  display: -webkit-box;
  overflow: hidden;
  color: #7a828c;
  font-size: .75rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.stage1-card-actions {
  display: grid;
  gap: .4375rem;
}

.stage1-small-button {
  min-width: 3.5rem;
  height: 2rem;
  padding: 0 .625rem;
  border-radius: .375rem;
  font-size: .75rem;
  white-space: nowrap;
}

.stage1-small-button--primary {
  border: 1px solid var(--stage1-accent);
  background: var(--stage1-accent);
  color: #fff;
}

.stage1-small-button--plain {
  border: 1px solid #d5dce4;
  background: #fff;
  color: #606975;
}

.stage1-lucky-hero {
  margin: -1rem -1rem 1rem;
  padding: 1.25rem 1rem 1rem;
  background: #e5f3ff url('/h5/static/chou/bg.png') center / cover no-repeat;
  text-align: center;
}

.stage1-lucky-kicker {
  margin: 0;
  color: #5b6470;
  font-size: .8125rem;
}

.stage1-lucky-count {
  margin: .25rem 0 1rem;
  color: #173c5d;
  font-size: 1.125rem;
  font-weight: 700;
}

.stage1-wheel-wrap {
  position: relative;
  width: min(78vw, 19rem);
  aspect-ratio: 1;
  margin: 0 auto;
}

.stage1-wheel {
  position: absolute;
  inset: 0;
  border: .5rem solid #fff;
  border-radius: 50%;
  overflow: hidden;
  background: conic-gradient(#d9efff 0 60deg, #fff1c9 60deg 120deg, #e8e3ff 120deg 180deg, #d9f5e8 180deg 240deg, #ffe0e8 240deg 300deg, #e1ecf7 300deg 360deg);
  box-shadow: 0 .75rem 1.75rem rgba(33, 86, 126, .2), inset 0 0 0 .1875rem rgba(35, 136, 223, .25);
  transition: transform 4.2s cubic-bezier(.12, .72, .12, 1);
}

.stage1-wheel-label {
  --stage1-label-width: 5.25rem;
  position: absolute;
  top: 1.75rem;
  left: 50%;
  width: var(--stage1-label-width);
  min-height: 2.5rem;
  margin-left: calc(var(--stage1-label-width) / -2);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: #24425b;
  font-size: .6875rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  transform-origin: calc(var(--stage1-label-width) / 2) calc((min(78vw, 19rem) / 2) - 1.75rem);
}

.stage1-wheel-label__text {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  transform-origin: center center;
}

.stage1-wheel-pointer {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 4.75rem;
  height: 4.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent url('/h5/static/images/turnable_btn.png') center / contain no-repeat;
  color: transparent;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 .25rem .375rem rgba(87, 52, 18, .2));
}

.stage1-wheel-pointer:disabled {
  filter: grayscale(.7) drop-shadow(0 .25rem .375rem rgba(87, 52, 18, .15));
}

.stage1-draw-result {
  min-height: 2rem;
  margin: .875rem 0 0;
  color: #28506f;
  font-size: .875rem;
  font-weight: 600;
}

.stage1-draw-row {
  padding: .625rem 0;
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  border-top: 1px solid #edf0f4;
  color: #555e69;
  font-size: .8125rem;
}

.stage1-player-follow {
  position: absolute;
  top: .75rem;
  right: .9375rem;
  z-index: 12;
  min-width: 4.25rem;
  height: 2rem;
  padding: 0 .625rem;
  border: 1px solid #cfd8e2;
  border-radius: 1rem;
  background: rgba(255, 255, 255, .94);
  color: #4d5965;
  font-size: .75rem;
  box-shadow: 0 .125rem .5rem rgba(0, 0, 0, .08);
}

.stage1-player-follow.is-followed {
  border-color: #ed6b87;
  color: #d94368;
}

.stage1-sheet {
  position: fixed;
  inset: 0;
  z-index: 900000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(17, 22, 28, .52);
}

.stage1-sheet[hidden] {
  display: none !important;
}

.stage1-sheet__surface {
  width: min(100%, 32rem);
  max-height: 92dvh;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  overflow: auto;
  border-radius: .75rem .75rem 0 0;
  background: #fff;
  box-shadow: 0 -1rem 3rem rgba(0, 0, 0, .18);
}

.stage1-sheet__head {
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.stage1-sheet__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}

.stage1-sheet__close {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: .375rem;
  background: #f2f4f7;
  color: #59616b;
  font-size: 1.25rem;
}

.stage1-source-list {
  margin-top: .75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .625rem;
}

.stage1-source-button {
  min-width: 0;
  min-height: 4.5rem;
  padding: .625rem .375rem;
  border: 1px solid #dce2e9;
  border-radius: .5rem;
  background: #f8fafc;
  color: #3f4852;
  font-size: .75rem;
}

.stage1-source-button img {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 auto .375rem;
  display: block;
  object-fit: contain;
}

.stage1-frame-grid {
  margin-top: .75rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .5rem;
}

.stage1-frame-option {
  min-width: 0;
  padding: .4375rem .125rem;
  border: 1px solid transparent;
  border-radius: .4375rem;
  background: #f7f9fb;
  color: #68717c;
  font-size: .6875rem;
}

.stage1-frame-option.is-active {
  border-color: var(--stage1-accent);
  background: #edf7ff;
  color: var(--stage1-accent-strong);
}

.stage1-frame-swatch {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto .3125rem;
  display: block;
  border: .25rem solid #cfd6df;
  border-radius: 50%;
  background: #fff;
}

.stage1-frame-swatch--none {
  border-style: dashed;
}

.stage1-frame-swatch--gold {
  border-color: #e6aa1f;
  box-shadow: inset 0 0 0 .1875rem #fff2b8;
}

.stage1-frame-swatch--rose {
  border-color: #ed5b7d;
  box-shadow: inset 0 0 0 .1875rem #ffe0e7;
}

.stage1-frame-swatch--blue {
  border-color: #328edc;
  box-shadow: inset 0 0 0 .1875rem #dcedff;
}

.stage1-frame-swatch--cosmic {
  border-color: #6756b7;
  box-shadow: inset 0 0 0 .1875rem #f1ddff;
}

.stage1-crop-surface {
  width: min(100%, 32rem);
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  border-radius: .75rem .75rem 0 0;
  background: #161a1f;
  color: #fff;
}

.stage1-crop-stage {
  position: relative;
  width: min(100%, 22rem);
  aspect-ratio: 1;
  margin: .75rem auto;
  overflow: hidden;
  background: #090b0e;
  touch-action: none;
}

.stage1-crop-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.stage1-crop-stage::after {
  position: absolute;
  inset: 0;
  content: "";
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .16);
  pointer-events: none;
}

.stage1-crop-slider {
  width: 100%;
  margin: .75rem 0;
  accent-color: var(--stage1-accent);
}

.stage1-crop-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: .75rem;
}

.stage1-toast {
  position: fixed;
  left: 50%;
  bottom: calc(5rem + env(safe-area-inset-bottom));
  z-index: 1000001;
  max-width: min(88vw, 24rem);
  padding: .75rem 1rem;
  border-radius: .4375rem;
  background: rgba(24, 28, 34, .92);
  color: #fff;
  font-size: .8125rem;
  line-height: 1.45;
  text-align: center;
  transform: translateX(-50%);
}

@media (max-width: 22rem) {
  body .page .setting-btn {
    min-width: 4.75rem;
    padding: 0 .4375rem;
  }

  body .page .profile-left {
    grid-template-columns: 3.25rem minmax(0, 1fr);
    column-gap: .5rem !important;
  }

  body .page .avatar-wrap {
    width: 3.25rem !important;
    height: 3.25rem !important;
  }

  .stage1-follow-card {
    grid-template-columns: 3.5rem minmax(0, 1fr);
  }

  .stage1-follow-card__avatar {
    width: 3.5rem;
    height: 3.5rem;
  }

  .stage1-card-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }

  .stage1-frame-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage1-wheel {
    transition-duration: .01s;
  }
}
