:root {
  --page: #ffffff;
  --bg: #f5f8f8;
  --line: #e5e5e5;
  --ink: #303030;
  --muted: #919191;
  --green: #2bc34a;
  --soft-green: #55bd65;
  --blue: #35a7d6;
  --red: #ef4e4b;
  --wood: #20b33e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #eef2f2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.phone {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 96px;
  overflow-x: hidden;
  background: var(--page);
}

.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  padding: 10px 32px 0 38px;
  color: #000;
  background: #fff;
  font-size: 24px;
  font-weight: 800;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 9px;
}

.signal {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 28px;
  height: 21px;
}

.signal i {
  display: block;
  width: 5px;
  border-radius: 2px;
  background: #000;
}

.signal i:nth-child(1) {
  height: 8px;
}

.signal i:nth-child(2) {
  height: 12px;
}

.signal i:nth-child(3) {
  height: 16px;
}

.signal i:nth-child(4) {
  height: 21px;
}

.wifi {
  width: 25px;
  height: 18px;
  border: 5px solid #000;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
}

.battery {
  min-width: 34px;
  height: 22px;
  padding-top: 1px;
  border-radius: 7px;
  color: #fff;
  background: #000;
  font-size: 14px;
  text-align: center;
}

.archive-top {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 16px;
  align-items: center;
  padding: 26px 16px 13px 108px;
  background: #fff;
}

.seg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 208px;
  padding: 4px;
  border-radius: 7px;
  background: #e9e9e9;
}

.seg-tabs button {
  height: 39px;
  border: 0;
  border-radius: 6px;
  color: #262626;
  background: transparent;
  font-size: 21px;
  white-space: nowrap;
}

.seg-tabs button.active {
  background: #fff;
}

.manage-btn {
  border: 0;
  color: #333;
  background: transparent;
  font-size: 21px;
}

.search-block {
  padding: 12px 10px 0;
  background: #fff;
}

.search-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 54px;
  height: 44px;
  overflow: hidden;
  border-radius: 9px;
  background: #f7f7f7;
}

.search-row input {
  min-width: 0;
  border: 0;
  padding: 0 8px 0 43px;
  outline: none;
  color: #999;
  background: transparent;
  font-size: 20px;
}

.search-row button {
  margin: 6px;
  border: 1px solid #60d470;
  border-radius: 8px;
  color: #777;
  background: #fff;
  font-size: 15px;
}

.search-icon {
  position: absolute;
  top: 11px;
  left: 16px;
  width: 19px;
  height: 19px;
  border: 3px solid #dedede;
  border-radius: 50%;
}

.search-icon::after {
  position: absolute;
  right: -8px;
  bottom: -5px;
  width: 10px;
  height: 3px;
  border-radius: 3px;
  background: #dedede;
  content: "";
  transform: rotate(45deg);
}

.category-row {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-row::-webkit-scrollbar {
  display: none;
}

.category-row button {
  position: relative;
  flex: 0 0 auto;
  height: 35px;
  border: 0;
  color: #666;
  background: transparent;
  font-size: 21px;
}

.category-row button.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--green);
  content: "";
}

.category-row .edit-category {
  height: 31px;
  padding: 0 14px;
  border: 1px solid #60d470;
  border-radius: 8px;
  font-size: 15px;
}

.case-list {
  border-top: 1px solid var(--line);
  background: #fff;
}

.case-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 98px 80px;
  gap: 11px;
  align-items: center;
  min-height: 78px;
  padding: 11px 16px 11px 20px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: #fff;
  text-decoration: none;
}

.case-row.manage {
  background: #fff;
}

.avatar {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  color: #333;
  background: #dadada;
  font-size: 21px;
}

.case-name {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 20px;
  line-height: 1.25;
}

.case-name span {
  color: #8b8b8b;
  font-size: 14px;
}

.case-birth {
  margin-top: 4px;
  color: #888;
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
}

.pillar-mini {
  display: grid;
  gap: 2px;
  justify-items: start;
}

.pillar-mini div {
  display: flex;
  gap: 11px;
  font-size: 19px;
  line-height: 1.12;
}

.fire {
  color: var(--red);
}

.water {
  color: var(--blue);
}

.wood {
  color: var(--wood);
}

.earth {
  color: #a97937;
}

.metal {
  color: #d89b24;
}

.enter-manage {
  color: #252525;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
}

.total-count {
  display: grid;
  place-items: center;
  height: 68px;
  border-bottom: 1px solid var(--line);
  color: #333;
  background: var(--bg);
  font-size: 19px;
}

.alpha-index {
  position: fixed;
  top: 492px;
  right: calc(50% - min(50vw, 215px) + 8px);
  display: grid;
  gap: 4px;
  color: #777;
  font-size: 16px;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  right: 50%;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(100vw, 430px);
  height: 86px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  transform: translateX(50%);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 4px;
  border: 0;
  color: #3b3b3b;
  background: transparent;
  font-size: 18px;
}

.bottom-nav button.active {
  color: #5bad4d;
}

.nav-icon {
  position: relative;
  display: block;
  width: 27px;
  height: 27px;
  color: currentColor;
}

.nav-icon.plate {
  border: 3px solid currentColor;
  border-radius: 50%;
}

.nav-icon.record {
  border: 3px solid currentColor;
  border-radius: 3px;
}

.nav-icon.record::before,
.nav-icon.record::after {
  position: absolute;
  left: 6px;
  width: 10px;
  height: 2px;
  background: currentColor;
  content: "";
}

.nav-icon.record::before {
  top: 7px;
}

.nav-icon.record::after {
  top: 15px;
}

.nav-icon.setting::before,
.nav-icon.setting::after {
  position: absolute;
  left: 2px;
  width: 23px;
  height: 3px;
  background: currentColor;
  content: "";
}

.nav-icon.setting::before {
  top: 8px;
}

.nav-icon.setting::after {
  top: 18px;
}

.nav-icon.tutorial {
  border: 3px solid currentColor;
  border-radius: 3px;
}

.nav-icon.tutorial::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 11px;
  width: 2px;
  background: currentColor;
  content: "";
}

@media (max-width: 360px) {
  .archive-top {
    padding-left: 64px;
  }

  .case-row {
    grid-template-columns: 42px minmax(0, 1fr) 80px 68px;
    padding-left: 12px;
  }

  .pillar-mini div {
    gap: 7px;
    font-size: 17px;
  }

  .enter-manage {
    font-size: 16px;
  }
}
