:root {
  --bg: #101217;
  --top: #1b1e25;
  --card: #20242d;
  --card2: #151820;
  --gold: #e9ba45;
  --muted: #abb6c5;
  --edge: #363d48;
  --white: #f4f5f7;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: #d8d9da;
  color: var(--white);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.app {
  max-width: 455px;
  margin: auto;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 35px #0003;
}
.top {
  background: var(--top);
  height: 52px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.16px;
  position: sticky;
  top: 0;
  z-index: 3;
}
.content {
  flex: 1;
  padding-bottom: 15px;
}
.nav {
  height: 70px;
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--top);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 5px 6px max(5px, env(safe-area-inset-bottom));
}
.nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  color: #a5acb9;
  border: 0;
  font-size: 11px;
  border-radius: 11px;
}
.nav button.active {
  background: #2d323b;
  color: var(--gold);
}
.nav svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1 {
  font-size: 27px;
  margin: 0 0 14px;
  line-height: 1.3;
}
h2 {
  font-size: 20px;
  margin: 0 0 5px;
}
h3 {
  font-size: 17px;
  margin: 0 0 5px;
}
.pad {
  padding: 14px 13px;
}
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 11px;
}
.label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.3px;
}
.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.muted {
  color: var(--muted);
}
.gold {
  color: var(--gold);
}
.titlegold {
  color: var(--gold);
  font-weight: 800;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.between {
  justify-content: space-between;
}
.flex {
  flex: 1;
  min-width: 0;
}
.small {
  font-size: 12px;
}
.med {
  font-size: 14px;
}
.val {
  font-weight: 800;
  color: var(--gold);
  font-size: 26px;
}
.avatar {
  height: 64px;
  width: 64px;
  border-radius: 50%;
  background: linear-gradient(160deg, #454c58, #292f38);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dbe0e7;
  font-weight: 800;
  font-size: 23px;
  flex: 0 0 auto;
  border: 1px solid #59616b;
}
.avatar.mini {
  width: 44px;
  height: 44px;
  font-size: 15px;
}
.hero {
  height: 160px;
  background: radial-gradient(
    ellipse at 50% 17%,
    #3c4450 0%,
    #292f39 38%,
    #1b2027 83%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}
.hero .avatar {
  height: 90px;
  width: 90px;
  font-size: 28px;
}
.hero-note {
  font-size: 12px;
  color: #aeb8c3;
}
.rankicon {
  width: 78px;
  height: 78px;
  object-fit: contain;
  flex: 0 0 auto;
}
.rankicon.mid {
  width: 69px;
  height: 69px;
}
.rankicon.small {
  width: 26px;
  height: 26px;
}
.rankicon.table {
  width: 75px;
  height: 75px;
}
.rankname {
  font-size: 21px;
  color: var(--gold);
  font-weight: 800;
}
.stars {
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 1px;
}
.divider {
  height: 1px;
  background: #434751;
  margin: 13px 0;
}
.goal {
  line-height: 1.5;
  font-size: 14px;
}
.progress {
  height: 5px;
  border-radius: 99px;
  background: #4c515a;
  overflow: hidden;
  margin-top: 10px;
}
.progress > div {
  height: 100%;
  background: var(--gold);
  border-radius: 99px;
}
.statgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.statgrid .metric {
  background: var(--card2);
  min-width: 0;
  min-height: 63px;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 4px;
}
.statgrid .metric .number {
  font-weight: 800;
  color: var(--gold);
  font-size: 15px;
}
.statgrid .metric .what {
  font-size: 10px;
  color: #d1d8e1;
}
.statgrid.boxes .metric {
  background: var(--card);
  min-height: 78px;
}
.statgrid.boxes .number {
  font-size: 22px;
  color: #fff;
}
.tabset {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  background: transparent;
  padding: 2px;
  border-radius: 15px;
  margin: 5px 0 14px;
}
.tabset button {
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: #979ca6;
  padding: 9px 6px;
  font-weight: 700;
  font-size: 12px;
}
.tabset button.active {
  background: #303136;
  color: #fff;
}
.btn {
  width: 100%;
  background: var(--gold);
  color: #18191c;
  border: 0;
  border-radius: 9px;
  padding: 12px 11px;
  font-weight: 750;
  font-size: 13px;
}
.btn.secondary {
  background: transparent;
  color: #c4cbd4;
  border: 1px solid #4a515d;
}
.btn.danger {
  background: transparent;
  color: #ef8787;
  border: 1px solid #99595a;
}
.btnrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.date {
  font-weight: 700;
  color: var(--gold);
  font-size: 12px;
  margin-bottom: 8px;
}
.field {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 5px;
}
.inp {
  width: 100%;
  background: #12171f;
  color: #f3f3f3;
  border: 1px solid #4a505b;
  border-radius: 9px;
  padding: 12px;
  outline: none;
  margin-bottom: 12px;
}
.inp:focus {
  border-color: var(--gold);
}
.ethics {
  padding: 12px;
  border-radius: 9px;
  background: #302f29;
  margin: 12px 0;
  line-height: 1.6;
  font-size: 13px;
}
.ethics b {
  display: block;
  color: var(--gold);
  margin-bottom: 6px;
}
.player {
  background: var(--card);
  padding: 9px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  margin-bottom: 8px;
  cursor: pointer;
}
.player.me {
  background: #322e24;
  border-color: #50452d;
}
.playerbody {
  display: flex;
  gap: 8px;
  align-items: center;
}
.order {
  width: 17px;
  flex: 0 0 17px;
  color: #bac1c9;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.player.me .order {
  color: var(--gold);
}
.player .who {
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 4px;
}
.rankline {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
  font-size: 11px;
  color: #eab94c;
}
.rankline.activity {
  color: #bcc5d0;
}
.right {
  text-align: right;
  min-width: 52px;
}
.right .value {
  color: var(--gold);
  font-size: 20px;
  font-weight: 800;
}
.right .sub {
  font-size: 11px;
  color: #bac3cd;
}
.rankrow {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ranktable {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.ranklevel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding-bottom: 2px;
}
.ranklevel .stars {
  font-size: 15px;
}
.hintline {
  font-size: 12px;
  color: #bdc5cf;
}
.rowstat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 9px 0;
  font-size: 13px;
}
.prof-hero {
  background: #252b35;
  text-align: center;
  padding: 21px 15px;
}
.prof-hero .avatar {
  margin: 0 auto 10px;
}
.actionrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.actionrow .btn {
  width: auto;
  min-width: 105px;
}
.owner {
  background: #2c291f;
  border: 1px solid #50432a;
}
.linebtn {
  border: 0;
  background: transparent;
  color: #c6cbd3;
  padding: 8px 0;
  text-align: left;
}
.testline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  padding: 11px;
  border-radius: 9px;
  margin-bottom: 7px;
}
.footnote {
  font-size: 11px;
  color: #8f9aaa;
  line-height: 1.6;
}
.timeicon {
  width: 17px;
  text-align: center;
  display: inline-block;
  color: #b7c1cf;
}
.chosen {
  border-color: var(--gold);
}
.card p {
  margin: 6px 0;
}
.avtext {
  font-size: 15px;
}
.nomargin {
  margin: 0;
}
.profile-stat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.profile-stat .metric {
  background: var(--card);
  border-radius: 11px;
  text-align: center;
  padding: 14px;
}
.profile-stat .number {
  font-size: 23px;
  color: var(--gold);
  font-weight: 800;
}
.profile-stat .what {
  font-size: 12px;
  color: #bec8d2;
  margin-top: 6px;
}
.upload-note {
  padding: 10px;
  border-radius: 7px;
  background: #181c23;
  color: #b8c2cf;
  font-size: 12px;
  line-height: 1.5;
}
.hidden {
  display: none;
}
@media (max-width: 470px) {
  html,
  body {
    background: var(--bg);
  }
  .app {
    max-width: none;
    box-shadow: none;
  }
}
@media (min-width: 471px) {
  .app {
    border-radius: 15px;
    overflow: clip;
    margin-top: 12px;
    margin-bottom: 12px;
    min-height: calc(100dvh - 24px);
  }
}
