:root {
  --white: #f8fbff;
  --sky: #68b4df;
  --deep: #335568;
  --glass: rgba(54, 86, 104, 0.72);
  --line: rgba(255, 255, 255, 0.26);
  --muted: rgba(255, 255, 255, 0.72);
  --shadow: 0 28px 70px rgba(31, 70, 91, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: linear-gradient(180deg, #d8edf8, #edf7fc);
  display: grid;
  place-items: center;
  padding: 18px 10px;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  height: min(932px, 100vh - 36px);
  min-height: 760px;
  overflow: hidden;
  border-radius: 38px;
  background:
    linear-gradient(180deg, rgba(109, 185, 226, 0.9), rgba(75, 158, 206, 0.98)),
    var(--sky);
  box-shadow: var(--shadow);
}

.sky-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.72), transparent 15%),
    radial-gradient(circle at 48% 15%, rgba(255, 255, 255, 0.46), transparent 17%),
    radial-gradient(circle at 84% 8%, rgba(255, 255, 255, 0.44), transparent 15%);
  filter: blur(13px);
}

.cloud {
  position: absolute;
  display: block;
  width: 260px;
  height: 88px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  filter: blur(22px);
  animation: cloudDrift 16s ease-in-out infinite;
}

.cloud-one {
  left: -60px;
  top: 62px;
}

.cloud-two {
  right: -128px;
  top: 18px;
  animation-delay: -7s;
}

.cloud-three {
  left: 42px;
  top: 260px;
  opacity: 0.42;
  animation-delay: -11s;
}

.screen,
.bottom-tabs,
.add-sheet {
  position: relative;
  z-index: 1;
}

.screen {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(124px + env(safe-area-inset-bottom));
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.active {
  display: block;
}

h1,
h2,
p {
  margin-top: 0;
}

.page-title {
  padding: 8px 2px 18px;
}

.page-title p,
.section-heading p,
.profile-card p,
.timeline-hero p {
  margin: 0 0 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-title h1,
.profile-card h1,
.timeline-hero h1 {
  margin-bottom: 8px;
  font-size: 43px;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 4px 18px rgba(38, 88, 112, 0.18);
}

.page-title span,
.profile-card span,
.timeline-hero span {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  font-weight: 780;
  line-height: 1.5;
}

.home-overview,
.timeline-view {
  display: none;
}

.home-overview.active,
.timeline-view.active {
  display: block;
  animation: panelIn 240ms ease both;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  position: relative;
  min-height: 204px;
  overflow: hidden;
  padding: 15px;
  border-radius: 30px;
  text-align: left;
  background: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 18px 38px rgba(45, 88, 110, 0.14);
  backdrop-filter: blur(18px);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.category-card:active {
  transform: scale(0.98);
}

.category-card::before {
  content: "";
  position: absolute;
  right: -46px;
  top: -42px;
  width: 132px;
  height: 132px;
  border-radius: 42px;
  transform: rotate(16deg);
  background: rgba(255, 255, 255, 0.22);
}

.card-orbit {
  position: absolute;
  right: 17px;
  bottom: 82px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  box-shadow:
    0 0 0 12px rgba(255, 255, 255, 0.08),
    0 0 34px rgba(255, 255, 255, 0.35);
}

.category-card em {
  position: relative;
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.category-card strong {
  position: relative;
  display: block;
  margin-bottom: 8px;
  font-size: 31px;
  line-height: 1;
  letter-spacing: 0;
}

.category-card small {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.14);
}

.card-stats {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.card-stats span {
  min-height: 54px;
  padding: 8px;
  border-radius: 17px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.18);
}

.card-stats b {
  display: block;
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.climb {
  background: linear-gradient(145deg, rgba(255, 151, 100, 0.72), rgba(91, 172, 215, 0.36));
}

.ink {
  background: linear-gradient(145deg, rgba(72, 84, 91, 0.72), rgba(255, 255, 255, 0.2));
}

.health {
  background: linear-gradient(145deg, rgba(66, 218, 185, 0.72), rgba(76, 151, 214, 0.32));
}

.career {
  background: linear-gradient(145deg, rgba(107, 135, 234, 0.68), rgba(93, 191, 213, 0.32));
}

.reading {
  background: linear-gradient(145deg, rgba(239, 190, 92, 0.72), rgba(108, 181, 211, 0.34));
}

.travel {
  background: linear-gradient(145deg, rgba(117, 204, 240, 0.7), rgba(255, 255, 255, 0.2));
}

.back-button {
  min-height: 38px;
  margin: 0 0 14px;
  padding: 0 14px;
  border-radius: 999px;
  color: #3c708b;
  font-size: 14px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.86);
}

.timeline-hero,
.profile-card,
.badge-section {
  border-radius: 34px;
  background: var(--glass);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 22px 52px rgba(44, 86, 107, 0.18);
  backdrop-filter: blur(22px);
}

.timeline-hero {
  padding: 24px 22px;
}

.timeline-progress,
.level-bar {
  height: 9px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.timeline-progress i,
.level-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff1c0, #ff946c, #63e0c6);
}

.timeline-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.timeline-item.photo::after {
  content: "";
  grid-column: 2;
  width: 100%;
  height: 118px;
  margin-top: 10px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 52% 42%, rgba(255, 241, 214, 0.96) 0 10%, transparent 11%),
    linear-gradient(180deg, #d9c7af 0%, #7d6d5b 48%, #2f2f2b 100%);
}

.timeline-item.photo:has(img)::after {
  display: none;
}

.timeline-item img {
  display: block;
  width: 100%;
  max-height: 240px;
  margin-top: 10px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(37, 76, 96, 0.16);
}

.timeline-item time {
  padding-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
}

.timeline-item h2 {
  margin-bottom: 7px;
  font-size: 19px;
}

.timeline-item p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
}

.screen-mine {
  padding-top: max(24px, env(safe-area-inset-top));
}

.profile-card {
  padding: 25px 22px;
  text-align: center;
}

.avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  border-radius: 31px;
  background:
    radial-gradient(circle at 54% 38%, rgba(255, 241, 214, 0.96) 0 12%, transparent 13%),
    linear-gradient(160deg, #f8dfb7, #6f7f86);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.36);
}

.level-bar i {
  width: 72%;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 13px;
}

.profile-stats article {
  min-height: 88px;
  padding: 14px 9px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.profile-stats strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.profile-stats span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 900;
}

.badge-section {
  margin-top: 13px;
  padding: 19px 16px;
}

.section-heading {
  margin-bottom: 13px;
}

.section-heading h2 {
  font-size: 25px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.badge {
  min-height: 142px;
  padding: 13px;
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.14);
  opacity: 0.58;
}

.badge.unlocked {
  opacity: 1;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.12));
}

.badge span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  border-radius: 16px;
  color: #3b718b;
  font-size: 20px;
  font-weight: 950;
  background: linear-gradient(145deg, #fff7d8, #ffb66a);
}

.badge strong,
.badge em {
  display: block;
}

.badge strong {
  margin-bottom: 4px;
  font-size: 15px;
}

.badge em {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.4;
}

.mine-list {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}

.mine-list button {
  min-height: 56px;
  padding: 0 19px;
  border-radius: 22px;
  text-align: left;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.bottom-tabs {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: max(14px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr 86px 1fr;
  align-items: end;
  min-height: 84px;
  padding: 9px 15px;
  border-radius: 32px;
  background: rgba(48, 78, 94, 0.76);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 18px 38px rgba(34, 75, 96, 0.22);
  backdrop-filter: blur(22px);
}

.tab-button {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 62px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 900;
  background: transparent;
}

.tab-button.active {
  color: var(--white);
}

.tab-button em {
  font-style: normal;
}

.tab-home,
.tab-user {
  position: relative;
  display: block;
  width: 25px;
  height: 25px;
}

.tab-home {
  border: 3px solid currentColor;
  border-radius: 8px;
}

.tab-home::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -9px;
  width: 13px;
  height: 13px;
  border-left: 3px solid currentColor;
  border-top: 3px solid currentColor;
  transform: rotate(45deg);
}

.tab-user {
  border: 3px solid currentColor;
  border-radius: 50%;
}

.tab-user::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: -13px;
  height: 14px;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0 0 18px 18px;
}

.add-button {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: var(--white);
  font-size: 58px;
  font-weight: 300;
  line-height: 1;
  background: rgba(51, 75, 88, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 20px 36px rgba(42, 87, 110, 0.26);
}

.add-sheet {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  align-items: end;
  padding: 18px;
  background: rgba(35, 70, 88, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.add-sheet.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet-panel {
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 32px;
  background: rgba(55, 86, 103, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 24px 60px rgba(28, 67, 88, 0.3);
  backdrop-filter: blur(24px);
  transform: translateY(22px);
  transition: transform 180ms ease;
}

.add-sheet.open .sheet-panel {
  transform: translateY(0);
}

.sheet-handle {
  width: 48px;
  height: 6px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
}

.sheet-panel h2 {
  margin-bottom: 8px;
}

.sheet-panel p {
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 750;
}

.record-form {
  display: grid;
  gap: 10px;
}

.record-form label {
  display: grid;
  gap: 6px;
}

.record-form label span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 900;
}

.record-form input,
.record-form select,
.record-form textarea {
  width: 100%;
  border: 0;
  border-radius: 18px;
  color: #f8fbff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  outline: 0;
}

.record-form input,
.record-form select {
  min-height: 48px;
  padding: 0 14px;
}

.record-form textarea {
  resize: none;
  padding: 13px 14px;
  line-height: 1.45;
}

.record-form input::placeholder,
.record-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.54);
}

.photo-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-field strong {
  display: grid;
  min-height: 58px;
  place-items: center;
  border-radius: 20px;
  color: #3b718b;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.86);
}

.image-preview {
  display: none;
  min-height: 132px;
  overflow: hidden;
  border-radius: 22px;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.image-preview.active {
  display: block;
}

.form-actions {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 8px;
}

.form-actions button {
  min-height: 52px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 900;
}

.cancel-record {
  background: rgba(255, 255, 255, 0.2);
}

.save-record {
  color: #3b718b;
  background: rgba(255, 255, 255, 0.9);
}

@keyframes cloudDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(24px, 10px, 0);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 430px) {
  body {
    padding: 0;
  }

  .app-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    border-radius: 0;
  }

  .screen {
    padding-left: 14px;
    padding-right: 14px;
  }

  .category-grid {
    gap: 10px;
  }

  .category-card {
    min-height: 196px;
    padding: 13px;
    border-radius: 26px;
  }

  .category-card strong {
    font-size: 28px;
  }

  .page-title h1,
  .profile-card h1,
  .timeline-hero h1 {
    font-size: 39px;
  }
}
