:root {
  color-scheme: light;
  --ink: #19171a;
  --muted: #817a7b;
  --subtle: #b5adaa;
  --paper: #f7f3ef;
  --surface: #fffdfa;
  --surface-soft: rgba(255, 255, 255, 0.76);
  --line: rgba(38, 33, 30, 0.1);
  --brand: #9d3f55;
  --brand-soft: #f4d8dc;
  --rose: #e96f81;
  --violet: #8e6bd8;
  --gold: #d8943c;
  --green: #5f9475;
  --sky: #64c9ff;
  --shadow: 0 20px 60px rgba(50, 43, 37, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--ink);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body.is-dialog-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
  opacity: 0.62;
}

.app-viewport {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.mobile-shell,
.login-screen {
  width: min(100%, 430px);
  height: min(100svh - 24px, 932px);
  min-height: 680px;
}

.mobile-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(42, 37, 34, 0.08);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-shell.is-auth-hidden {
  display: none;
}

.tab-panel {
  position: absolute;
  inset: 0;
  display: none;
  min-height: 0;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.tab-panel.is-active {
  display: block;
}

.panel-scroll {
  height: 100%;
  overflow: auto;
  padding: 16px 18px 18px;
  scrollbar-width: none;
}

.panel-scroll::-webkit-scrollbar {
  display: none;
}

.game-screen {
  padding: 20px 18px 34px;
  background: linear-gradient(180deg, #fffdfa 0%, #faf8f4 100%);
}

.comic-screen {
  background: linear-gradient(180deg, #fffdfb 0%, #faf7f2 100%);
}

.home-screen {
  padding: 0 0 34px;
  background: #fff;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  margin-bottom: 18px;
  color: #111;
  font-size: 13px;
  font-weight: 760;
}

.status-icons {
  font-size: 11px;
  letter-spacing: 0;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-title-row h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 860;
}

.game-screen__header {
  margin: -4px 0 18px;
}

.game-screen__hero-image {
  display: block;
  width: 100%;
  height: 168px;
  border-radius: 18px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 16px 34px rgba(31, 41, 55, 0.08);
}

.comic-screen .game-screen__hero-image {
  object-position: center 20%;
}

.game-feature-card.comic-book-card {
  position: relative;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 251, 245, 0.98), rgba(255, 255, 255, 0.94)),
    repeating-linear-gradient(180deg, rgba(198, 178, 150, 0.05) 0 2px, transparent 2px 8px);
  box-shadow:
    0 18px 34px rgba(59, 44, 34, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.game-feature-card.comic-book-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid rgba(104, 87, 71, 0.1);
  pointer-events: none;
}

.comic-book-card__cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px 22px 22px 18px;
  background: #1c1a1e;
  box-shadow:
    inset 8px 0 0 rgba(255, 255, 255, 0.12),
    0 16px 30px rgba(30, 26, 35, 0.2);
}

.comic-book-card__cover::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03));
  z-index: 1;
}

.comic-book-card__cover img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  object-position: center top;
}

.comic-book-card__volume,
.comic-book-card__pages {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  color: #fffaf2;
  background: rgba(19, 17, 20, 0.74);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.comic-book-card__volume {
  top: 10px;
  left: 14px;
}

.comic-book-card__pages {
  right: 10px;
  bottom: 10px;
}

.comic-book-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 6px 2px 6px 0;
}

.comic-book-card__label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: #9a6249;
  background: rgba(240, 227, 212, 0.8);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.comic-book-card__body h2 {
  margin: 0;
  color: #26212a;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 860;
}

.comic-book-card__body p {
  margin: 0;
  color: #8a7f76;
  font-size: 12px;
  line-height: 1.4;
}

.comic-book-card__open {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: #5f4f98;
  font-size: 13px;
  font-weight: 780;
}

.comic-book-card__open::after {
  content: "›";
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #7c73bd;
  box-shadow: 0 8px 18px rgba(124, 115, 189, 0.24);
  font-size: 16px;
  line-height: 1;
}

.game-feature-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(40, 44, 52, 0.08);
  border-radius: 18px;
  color: inherit;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 36px rgba(31, 41, 55, 0.08);
  text-decoration: none;
}

.game-feature-card__media {
  display: grid;
  place-items: center;
}

.game-feature-card__icon-wrap {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff8ef, #edf8e4);
}

.game-feature-card__icon-wrap img {
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.comic-feature-card__icon-wrap {
  overflow: hidden;
  background: linear-gradient(180deg, #f7f5ff, #f1effa);
}

.comic-feature-card__icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-feature-card__content {
  min-width: 0;
}

.game-feature-card__heading {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.game-feature-card__heading h2 {
  flex: none;
  margin: 0;
  color: #1f2023;
  font-size: 18px;
  font-weight: 840;
  letter-spacing: 0;
  white-space: nowrap;
}

.game-feature-card__heading span {
  flex: none;
  padding: 3px 7px;
  border-radius: 999px;
  color: #5f9475;
  background: #edf7ed;
  font-size: 11px;
  font-weight: 760;
}

.game-feature-card__content p {
  margin: 7px 0 0;
  overflow: hidden;
  color: #8f8881;
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.game-tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #68726a;
  background: #f4f5ef;
  font-size: 11px;
  font-weight: 760;
}

.game-feature-card__action {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #a83f5a;
  box-shadow: 0 10px 20px rgba(168, 63, 90, 0.24);
}

.comic-feature-card__action {
  background: #776fb7;
  box-shadow: 0 10px 20px rgba(119, 111, 183, 0.24);
}

.game-feature-card__action-arrow {
  display: inline-grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #fff;
  font-size: 24px;
  font-weight: 760;
  line-height: 1;
}

.game-shelf {
  display: grid;
  gap: 14px;
}

.game-shelf__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.game-shelf__heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 860;
}

.game-shelf__heading span {
  color: #aaa29c;
  font-size: 13px;
  font-weight: 700;
}

.game-shelf__grid {
  display: grid;
  gap: 12px;
}

.game-mini-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(238, 230, 218, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 24px rgba(61, 45, 31, 0.05);
}

.game-mini-card--overcooked {
  border-color: rgba(246, 209, 170, 0.7);
  background:
    radial-gradient(circle at right top, rgba(255, 230, 200, 0.5), transparent 38%),
    linear-gradient(135deg, rgba(255, 252, 246, 0.94), rgba(255, 247, 238, 0.88));
}

.game-mini-card--ittakes {
  border-color: rgba(202, 202, 246, 0.78);
  background:
    radial-gradient(circle at right top, rgba(218, 227, 255, 0.54), transparent 38%),
    linear-gradient(135deg, rgba(251, 250, 255, 0.95), rgba(242, 245, 255, 0.88));
}

.game-mini-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #6aab70;
  background: linear-gradient(180deg, #f4faee, #ecf6df);
  font-size: 22px;
}

.game-mini-card__icon.is-cover {
  overflow: hidden;
  padding: 0;
  background: #f3efe8;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.56),
    0 8px 14px rgba(36, 28, 22, 0.12);
}

.game-mini-card__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-mini-card__copy {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.game-mini-card__copy h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.game-mini-card__copy p {
  margin: 6px 0 0;
  color: #8f8881;
  font-size: 13px;
  line-height: 1.5;
}

.game-mini-card__badge {
  display: inline-flex;
  align-items: center;
  align-self: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #7d6c55;
  background: rgba(244, 235, 220, 0.95);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.game-mini-card--overcooked .game-mini-card__icon.is-cover {
  background: #2a1e17;
  box-shadow:
    inset 0 0 0 1px rgba(255, 243, 227, 0.16),
    0 8px 14px rgba(121, 67, 28, 0.16);
}

.game-mini-card--overcooked .game-mini-card__copy h3 {
  color: #7d3f1d;
}

.game-mini-card--overcooked .game-mini-card__copy p {
  color: #99755a;
}

.game-mini-card--overcooked .game-mini-card__badge {
  color: #8d532f;
  background: rgba(255, 233, 208, 0.96);
}

.game-mini-card--ittakes .game-mini-card__icon.is-cover {
  background: #1b1d32;
  box-shadow:
    inset 0 0 0 1px rgba(239, 241, 255, 0.15),
    0 8px 14px rgba(74, 76, 151, 0.16);
}

.game-mini-card--ittakes .game-mini-card__copy h3 {
  color: #4752a5;
}

.game-mini-card--ittakes .game-mini-card__copy p {
  color: #7480a2;
}

.game-mini-card--ittakes .game-mini-card__badge {
  color: #5764ae;
  background: rgba(229, 234, 255, 0.96);
}

.title-actions {
  display: flex;
  gap: 10px;
}

.icon-action {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #282427;
  background: rgba(255, 255, 255, 0.68);
}

.icon-action.is-muted {
  border-color: rgba(154, 58, 81, 0.16);
  color: #9a3a51;
  background: rgba(255, 238, 241, 0.9);
  font-size: 13px;
  font-weight: 800;
}

.hero-card {
  position: relative;
  min-height: 258px;
  overflow: hidden;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.hero-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-card::after {
  position: absolute;
  inset: 0 0 -1px;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 22%, rgba(255, 255, 255, 0.18) 56%, #fff 96%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.54), transparent 48%);
}

.hero-card::before {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 86px;
  content: "";
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 78%);
  pointer-events: none;
}

.hero-card__overlay {
  position: relative;
  z-index: 2;
  min-height: 258px;
  padding: 28px 24px 20px;
}

.hero-greeting {
  color: #27303a;
}

.hero-greeting p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 880;
  letter-spacing: -0.04em;
}

.hero-greeting p span {
  color: #ff6d77;
  font-size: 25px;
}

.hero-card__overlay time {
  display: none;
}

.insight-panel {
  position: relative;
  margin: 8px 18px 0;
}

.insight-heading {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 4px;
}

.insight-heading h2 {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #172033;
  font-size: 22px;
  font-weight: 880;
  letter-spacing: 0;
}

.insight-heading h2::before {
  display: block;
  width: 10px;
  height: 24px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(180deg, #7fc16d, #64b5ff);
  box-shadow: 0 8px 18px rgba(101, 181, 142, 0.26);
}

.insight-heading h2::after {
  display: block;
  width: 54px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, rgba(127, 193, 109, 0.55), rgba(127, 193, 109, 0));
}

.insight-heading h2 span {
  background: linear-gradient(120deg, #1c2735, #527f62 68%, #64b5ff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

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

.insight-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
  padding: 14px 14px 12px;
  border: 1px solid rgba(32, 39, 52, 0.04);
  border-radius: 24px;
  color: #2a3038;
  background: #fff;
  box-shadow: 0 18px 42px rgba(31, 41, 55, 0.08);
  text-align: left;
}

.insight-card::after {
  position: absolute;
  inset: auto -22px -38px auto;
  width: 108px;
  height: 108px;
  content: "";
  border-radius: 50%;
  background: currentColor;
  opacity: 0.05;
}

.insight-card--training { color: #6fbf82; }
.insight-card--time { color: #9c88ee; }
.insight-card--mood { color: #ffae42; }
.insight-card--comic { color: #5aa7ff; }
.insight-card--calendar { color: #5aa7ff; }

.insight-title {
  position: relative;
  display: block;
  width: 100%;
  min-height: 22px;
  color: #4c535f;
  font-size: 12px;
  font-weight: 820;
  align-self: start;
  justify-self: start;
  text-align: left;
}

.insight-title i {
  position: absolute;
  top: 50%;
  right: 0;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: currentColor;
  font-style: normal;
  font-size: 12px;
  transform: translateY(-50%);
}

.insight-title__text {
  display: block;
  padding-left: 0;
}

.insight-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 8px;
  color: #252b33;
}

.insight-value strong {
  font-size: 29px;
  line-height: 0.96;
}

.insight-value small {
  color: #8d949e;
  font-size: 14px;
}

.insight-value--text strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-value--calendar strong {
  font-size: 38px;
}

.insight-trend {
  display: block;
  margin-top: 5px;
  color: currentColor;
  font-size: 11px;
  font-weight: 820;
}

.sparkline,
.mood-spark {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  width: 100%;
  height: 36px;
  align-self: end;
  margin-top: 4px;
}

.sparkline path,
.mood-spark path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.sparkline {
  overflow: visible;
}

.sparkline::after {
  position: absolute;
  inset: 24px 0 auto;
  height: 36px;
  content: "";
  background: linear-gradient(180deg, currentColor, transparent);
  opacity: 0.08;
}

.mini-bars {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  display: grid;
  height: 36px;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 10px;
  align-self: end;
  margin-top: 4px;
}

.mini-bars i {
  display: block;
  border-radius: 9px 9px 3px 3px;
  background: linear-gradient(180deg, rgba(156, 136, 238, 0.68), rgba(156, 136, 238, 0.18));
}

.mini-bars i:nth-child(1) { height: 48%; }
.mini-bars i:nth-child(2) { height: 64%; }
.mini-bars i:nth-child(3) { height: 86%; }
.mini-bars i:nth-child(4) { height: 94%; }

.mood-spark svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mood-spark i {
  position: absolute;
  top: 20px;
  left: var(--progress, 85%);
  display: block;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border: 3px solid currentColor;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(255, 174, 66, 0.12);
}

.mini-pages {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  display: grid;
  height: 38px;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-self: end;
  margin-top: 4px;
}

.mini-pages i {
  display: block;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(90, 167, 255, 0.7), rgba(90, 167, 255, 0.16));
  transform: rotate(-4deg);
}

.mini-pages i:nth-child(2) {
  transform: translateY(-7px) rotate(4deg);
}

.mini-calendar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  align-self: end;
  margin-top: 4px;
}

.mini-calendar span {
  display: grid;
  min-height: 25px;
  place-items: center;
  border-radius: 8px;
  color: #7d8795;
  background: rgba(90, 167, 255, 0.1);
  font-size: 10px;
  font-weight: 820;
}

.mini-calendar span.is-done {
  color: #4f8fc7;
  background: rgba(90, 167, 255, 0.22);
}

.mini-calendar span.is-today {
  color: #fff;
  background: linear-gradient(145deg, #64b5ff, #4f7cff);
  box-shadow: 0 8px 16px rgba(79, 124, 255, 0.2);
}

.moments-block {
  position: relative;
  margin: 34px 0 0;
  padding: 0 18px 18px;
  background: #fff;
}

.moments-hero {
  position: relative;
  margin: 0 -4px 10px;
}

.moments-hero > img {
  display: block;
  width: 100%;
  height: auto;
}

.moments-publisher {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 84px;
  gap: 10px;
  margin: 10px 0 20px;
  padding: 12px;
  border: 1px solid rgba(225, 166, 92, 0.22);
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(255, 248, 238, 0.92), rgba(255, 255, 255, 0.86)),
    #fff;
  box-shadow: 0 14px 34px rgba(154, 104, 48, 0.12);
}

.moments-publisher::before {
  position: absolute;
  inset: 8px;
  content: "";
  border: 1px dashed rgba(225, 166, 92, 0.18);
  border-radius: 19px;
  pointer-events: none;
}

.moments-publisher__icon {
  display: grid;
  width: 58px;
  height: 52px;
  place-items: center;
}

.moments-publisher__icon img {
  display: block;
  width: 64px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(80, 101, 78, 0.12));
}

.moments-publisher__item {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 8px;
  padding: 9px 6px;
  border-radius: 18px;
  color: #36323a;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(37, 32, 30, 0.04);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.moments-publisher__item:active {
  transform: scale(0.97);
}

.moments-publisher__item strong {
  color: #36323a;
  font-size: 13px;
  font-weight: 820;
}

.moments-publisher__item:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(37, 32, 30, 0.06),
    0 10px 22px rgba(154, 104, 48, 0.1);
}

@keyframes softPulse {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.52;
  }

  50% {
    transform: scale(1.16);
    opacity: 0.9;
  }
}

@keyframes ringDrift {
  to {
    transform: rotate(360deg);
  }
}

@keyframes waveRise {
  0%,
  100% {
    transform: scaleY(0.78);
  }

  50% {
    transform: scaleY(1.08);
  }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: -34px;
  padding: 0 6px;
}

.soft-card,
.section-block,
.checkin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: 0 12px 30px rgba(42, 34, 31, 0.08);
  backdrop-filter: blur(18px);
}

.mini-metric {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 88px;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.mini-metric p,
.mini-metric small {
  display: block;
  margin: 0;
  color: #756d6c;
  font-size: 12px;
}

.mini-metric strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 18px;
}

.bubble,
.tile {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  font-weight: 800;
}

.bubble {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.bubble-red,
.tile-red {
  background: linear-gradient(145deg, #f5a3aa, #d95167);
}

.bubble-violet,
.tile-purple {
  background: linear-gradient(145deg, #d8ccff, #8d68d8);
}

.tile-gold {
  background: linear-gradient(145deg, #ffd391, #d68a27);
}

.meter {
  display: block;
  width: 82px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e2df;
}

.meter i {
  display: block;
  width: 85%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #df5f6e, #8e6bd8);
}

.section-block {
  margin-top: 14px;
  padding: 14px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading h2,
.checkin-card h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 820;
}

.section-heading span,
.ghost-link {
  color: #918985;
  font-size: 12px;
}

.ghost-link {
  padding: 0;
  background: transparent;
}

.interaction-list,
.record-list {
  display: grid;
  gap: 10px;
}

.interaction-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(37, 32, 30, 0.07);
  border-radius: 8px;
  color: inherit;
  background: rgba(255, 255, 255, 0.65);
  text-align: left;
}

.interaction-item strong,
.interaction-item small,
.record-item strong,
.record-item small {
  display: block;
}

.interaction-item small,
.record-item small {
  margin-top: 3px;
  color: #918985;
  font-size: 12px;
}

.interaction-item em {
  min-width: 54px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--brand);
  background: #f7e8eb;
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.tile {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.life-gallery {
  display: grid;
  gap: 16px;
}

.moment-empty {
  padding: 22px 18px;
  border: 1px dashed rgba(119, 168, 91, 0.24);
  border-radius: 20px;
  color: #7b837b;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.06);
  font-size: 14px;
  line-height: 1.6;
}

.moment-card {
  position: relative;
  display: block;
  padding-left: 38px;
}

.moment-card__body {
  position: relative;
  min-width: 0;
  padding: 16px 14px 12px 52px;
  border: 1px solid rgba(37, 32, 30, 0.06);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 38px rgba(31, 41, 55, 0.08);
}

.moment-card__avatar {
  position: absolute;
  top: 15px;
  left: -31px;
  width: 58px;
  height: 58px;
  border: 4px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(31, 41, 55, 0.12);
}

.moment-card__more {
  position: absolute;
  top: 14px;
  right: 13px;
  z-index: 2;
  padding: 0;
  color: #8f949c;
  background: transparent;
  font-size: 18px;
  letter-spacing: 2px;
}

.moment-card__menu {
  position: absolute;
  top: 42px;
  right: 12px;
  z-index: 3;
  display: grid;
  min-width: 108px;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(37, 32, 30, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 32px rgba(31, 41, 55, 0.14);
  backdrop-filter: blur(14px);
}

.moment-card__menu button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  color: #2b3139;
  background: #f7f8fa;
  font-size: 14px;
  font-weight: 760;
  text-align: left;
}

.moment-card__menu button:last-child {
  color: #d25c68;
  background: rgba(255, 110, 123, 0.1);
}

.moment-card h3 {
  margin: 0 40px 4px 0;
  color: #20242c;
  font-size: 18px;
  font-weight: 880;
}

.moment-card h3 small {
  font-size: 15px;
}

.moment-card time {
  display: block;
  margin-bottom: 12px;
  color: #818792;
  font-size: 13px;
}

.moment-card p {
  margin: 0 0 12px;
  color: #383d46;
  font-size: 14px;
  line-height: 1.75;
  word-break: break-word;
}

.moment-card__photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.moment-card__photos img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  object-fit: cover;
}

.moment-card__comments {
  display: grid;
  gap: 7px;
  margin: -2px 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(247, 248, 250, 0.92), rgba(255, 255, 255, 0.95));
  list-style: none;
}

.moment-card__comments li {
  color: #59606b;
  font-size: 13px;
  line-height: 1.6;
}

.moment-card__comments strong {
  color: #2e3440;
}

.moment-card__composer {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(37, 32, 30, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(249, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
}

.moment-card__composer--edit {
  margin-top: -2px;
}

.moment-card__composer textarea {
  width: 100%;
  min-height: 76px;
  padding: 12px 13px;
  border: 1px solid rgba(37, 32, 30, 0.1);
  border-radius: 14px;
  outline: none;
  color: #2e3440;
  background: #fff;
  resize: vertical;
  font: inherit;
  font-size: 14px;
  line-height: 1.7;
}

.moment-card__composer textarea:focus {
  border-color: rgba(131, 183, 107, 0.45);
  box-shadow: 0 0 0 3px rgba(131, 183, 107, 0.12);
}

.moment-card__composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.moment-primary-button,
.moment-ghost-button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 780;
}

.moment-primary-button {
  color: #fff;
  background: linear-gradient(145deg, #83b76b, #60924d);
}

.moment-ghost-button {
  color: #5a6270;
  background: #eef1f4;
}

.moment-card__actions {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(35, 39, 48, 0.08);
}

.moment-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 999px;
  color: #6c717a;
  background: #f6f7f9;
  font-size: 14px;
  font-weight: 760;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.moment-action__icon {
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
}

.moment-action__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.moment-action.is-active {
  color: #ff5f72;
  background: rgba(255, 110, 123, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 110, 123, 0.14);
}

.moment-action--ghost {
  justify-self: end;
  padding: 0 16px;
  color: #4f6f53;
  background: rgba(131, 183, 107, 0.14);
}

.moment-action:active {
  transform: scale(0.97);
}

.memory-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.memory-strip img,
.memory-strip button {
  width: 100%;
  aspect-ratio: 1.08 / 1;
  border-radius: 8px;
  object-fit: cover;
}

.memory-strip button {
  display: grid;
  place-items: center;
  color: #9a928d;
  background: #f1ece7;
  font-size: 28px;
}

.embedded-page {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fffdfa;
}

.bottom-tabs {
  position: absolute;
  right: 18px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(38, 43, 52, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(31, 41, 55, 0.16);
  backdrop-filter: blur(22px);
}

.tab-button {
  position: relative;
  display: flex;
  min-height: 66px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 999px;
  background: transparent;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tab-button img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0.72;
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}

.tab-button span {
  color: #b3afb4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 180ms ease, transform 180ms ease;
}

.tab-button::after {
  position: absolute;
  top: 9px;
  right: 0;
  left: 0;
  display: block;
  width: 28px;
  height: 28px;
  margin: auto;
  content: "";
  background: linear-gradient(180deg, #69caff, #4f7cff);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 180ms ease, transform 180ms ease;
  mask: var(--tab-icon) center / contain no-repeat;
  -webkit-mask: var(--tab-icon) center / contain no-repeat;
}

.tab-button.is-active {
  background: transparent;
  box-shadow: none;
}

.tab-button.is-active img {
  opacity: 0;
}

.tab-button.is-active::after {
  opacity: 1;
  transform: translateY(-1px);
  filter: drop-shadow(0 9px 14px rgba(79, 124, 255, 0.34));
}

.tab-button.is-active span {
  color: #6db163;
  transform: translateY(1px);
}

.fitness-screen {
  overflow-x: hidden;
  padding: 20px 18px 34px;
  background: linear-gradient(180deg, #fffdfa 0%, #faf8f4 100%);
}

.fitness-overview.is-hidden,
.fitness-detail-page.is-hidden,
.fitness-plan-page.is-hidden {
  display: none;
}

.fitness-hero {
  position: relative;
  height: 168px;
  margin: -4px 0 18px;
  overflow: hidden;
  border-radius: 18px;
  background: #fff9ee;
  box-shadow: 0 16px 34px rgba(31, 41, 55, 0.08);
}

.fitness-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.98);
}

.fitness-hero::before {
  display: none;
}

.fitness-hero::after {
  display: none;
}

.fitness-checkin {
  display: none;
}

.fitness-checkin span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #5e984f;
  background: #fff;
  font-size: 15px;
  font-weight: 900;
}

.fitness-checkin strong {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.fitness-checkin.is-done {
  background: linear-gradient(145deg, #71aa62, #4f8b45);
}

.fitness-summary {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 18px;
  padding: 18px 8px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 52px rgba(99, 82, 58, 0.12);
  backdrop-filter: blur(18px);
}

.fitness-summary article {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 0 7px;
  border-right: 1px dashed rgba(117, 101, 81, 0.22);
  text-align: center;
}

.fitness-summary article:last-child {
  border-right: 0;
}

.fitness-summary i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 50%;
  font-style: normal;
}

.fitness-summary__fire {
  color: #ff7b39;
  font-size: 25px;
}

.fitness-summary__clock {
  color: #fff;
  background: #6ca35a;
  font-size: 18px;
}

.fitness-summary__cup {
  color: #ffc043;
  font-size: 24px;
}

.fitness-summary strong {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  color: #22252c;
  font-weight: 500;
}

.fitness-summary strong span {
  font-size: 29px;
  font-weight: 780;
  letter-spacing: -0.03em;
}

.fitness-summary small,
.fitness-summary > article > span {
  color: #79736f;
  font-size: 12px;
  white-space: nowrap;
}

.fitness-summary > article > span {
  margin-top: 7px;
}

.fitness-goal-ring {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 58%, transparent 60%),
    conic-gradient(#6ca35a calc(var(--progress) * 1%), #ece6de 0);
}

.fitness-goal-ring b {
  color: #2d3038;
  font-size: 18px;
  font-weight: 680;
}

.fitness-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.fitness-plan-button,
.fitness-new-workout {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 850;
}

.fitness-plan-button {
  border: 1px solid rgba(95, 156, 85, 0.2);
  color: #477d3d;
  background: linear-gradient(145deg, rgba(245, 251, 240, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 16px 30px rgba(82, 132, 70, 0.12);
}

.fitness-new-workout {
  color: #fff;
  background: linear-gradient(145deg, #7eb36b, #5b984e);
  box-shadow: 0 16px 30px rgba(82, 132, 70, 0.22);
}

.fitness-plan-button::before {
  content: "≡";
  font-size: 19px;
  line-height: 1;
}

.fitness-new-workout::before {
  content: "+";
  font-size: 22px;
  line-height: 1;
}

.fitness-calendar-card,
.fitness-record-card {
  overflow: hidden;
  border: 1px solid rgba(104, 82, 52, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 46px rgba(99, 82, 58, 0.1);
}

.fitness-calendar-card {
  padding: 18px 12px 16px;
}

.fitness-record-card {
  overflow: hidden;
  margin-top: 18px;
  padding: 16px 12px 14px;
}

.fitness-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.fitness-section-heading h2 {
  margin: 0;
  color: #22252c;
  font-size: 22px;
  font-weight: 880;
  letter-spacing: -0.03em;
}

.fitness-month-control {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #343841;
  font-size: 15px;
}

.fitness-month-control button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: #f5f2ec;
  font-size: 22px;
  line-height: 1;
}

.fitness-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 0 3px 9px;
  color: #2f333b;
  text-align: center;
  font-size: 14px;
}

.training-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(104, 82, 52, 0.1);
  border-radius: 18px;
  background: #fffdfa;
}

.calendar-day {
  position: relative;
  display: grid;
  min-height: 74px;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 5px 2px 4px;
  border-right: 1px solid rgba(104, 82, 52, 0.08);
  border-bottom: 1px solid rgba(104, 82, 52, 0.08);
  color: #22252c;
  background: rgba(255, 255, 255, 0.56);
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day:nth-last-child(-n + 7) {
  border-bottom: 0;
}

.calendar-day time {
  font-size: 13px;
  line-height: 1;
}

.calendar-day img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.calendar-day span {
  color: #4d4c4a;
  font-size: 11px;
  line-height: 1.1;
}

.calendar-day.is-muted {
  color: #b3ada6;
  background: rgba(250, 247, 241, 0.46);
}

.calendar-day.is-muted img,
.calendar-day.is-muted .calendar-rest-icon {
  opacity: 0.45;
}

.calendar-day.is-today {
  z-index: 1;
  border: 1px solid #5f9c55;
  border-radius: 10px;
  background: #f5fbf0;
  box-shadow: inset 0 0 0 1px rgba(95, 156, 85, 0.18);
}

.calendar-day b {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #6ca35a;
  font-size: 13px;
}

.calendar-rest-icon {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dce6fa;
}

.calendar-rest-icon::after {
  position: absolute;
  top: -2px;
  left: 9px;
  width: 26px;
  height: 26px;
  content: "";
  border-radius: 50%;
  background: #fffdfa;
}

.calendar-rest-icon::before {
  position: absolute;
  top: 3px;
  right: -6px;
  z-index: 1;
  content: "z";
  color: #8ca0ca;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 6px -5px 0 -2px #8ca0ca, 10px 3px 0 -2px #8ca0ca;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 14px 8px 0;
  color: #7f7974;
  font-size: 13px;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calendar-legend i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.calendar-legend .is-done {
  background: #6ca35a;
}

.calendar-legend .is-active {
  background: #ffc043;
}

.calendar-legend .is-rest {
  background: #cfd7ee;
}

.fitness-record-list {
  gap: 8px;
}

.fitness-record-item {
  position: relative;
  display: block;
  min-height: 78px;
  padding: 10px 12px 10px 8px;
  border: 1px solid rgba(104, 82, 52, 0.1);
  border-radius: 17px;
  color: inherit;
  background: linear-gradient(135deg, rgba(255, 252, 246, 0.96), rgba(255, 249, 236, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fitness-record-main {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-areas:
    "avatar copy"
    "avatar stats";
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.record-avatar {
  grid-area: avatar;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: #edf6d9;
  box-shadow: inset 0 0 0 1px rgba(95, 156, 85, 0.12);
}

.record-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fitness-record-copy {
  grid-area: copy;
  min-width: 0;
  padding-right: 68px;
}

.fitness-record-main strong,
.fitness-record-main small {
  display: block;
}

.fitness-record-main strong {
  color: #22252c;
  font-size: 15px;
  font-weight: 840;
}

.fitness-record-main small {
  margin-top: 5px;
  color: #8a8580;
  font-size: 12px;
}

.fitness-record-stats {
  grid-area: stats;
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.fitness-record-main em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #2d3038;
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
}

.fitness-record-main em i {
  color: #5f9c55;
  font-style: normal;
  font-size: 16px;
}

.fitness-record-main em:nth-of-type(2) i {
  color: #ff7b39;
}

.record-chevron {
  display: none;
}

.fitness-record-actions {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.fitness-record-actions button {
  display: grid;
  width: 28px;
  height: 28px;
  min-width: 0;
  min-height: 0;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 820;
  line-height: 1;
}

.fitness-record-actions .fitness-record-edit {
  color: #477d3d;
  background: rgba(236, 246, 231, 0.96);
}

.fitness-record-actions .fitness-record-delete {
  color: #b45309;
  background: rgba(255, 243, 224, 0.96);
}

.fitness-detail-page {
  min-height: 100%;
  padding: 18px 0 16px;
}

.fitness-plan-page {
  min-height: 100%;
  padding: 18px 0 16px;
}

.fitness-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  margin: 0 0 16px;
  padding: 4px 0 10px;
  background: linear-gradient(180deg, #fffdf8 76%, rgba(255, 253, 248, 0));
}

.fitness-detail-topbar button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: #253142;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.1);
  font-size: 30px;
  line-height: 1;
}

.fitness-detail-topbar strong {
  color: #1f2937;
  font-size: 18px;
  font-weight: 880;
  text-align: center;
}

.fitness-plan-content {
  display: grid;
  gap: 16px;
}

.fitness-plan-hero {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(104, 82, 52, 0.08);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0 0, rgba(100, 201, 255, 0.14), transparent 34%),
    radial-gradient(circle at 100% 10%, rgba(114, 180, 98, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(99, 82, 58, 0.08);
}

.fitness-plan-hero p {
  margin: 0;
  color: #5d6878;
  font-size: 14px;
  font-weight: 740;
  line-height: 1.7;
}

.fitness-plan-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.fitness-plan-hero__stats span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
  color: #607085;
  font-size: 12px;
  font-weight: 760;
  text-align: center;
}

.fitness-plan-hero__stats b {
  color: #1f2937;
  font-size: 22px;
  font-weight: 900;
}

.fitness-plan-day-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.fitness-plan-day-buttons button,
.fitness-plan-toggle button,
.fitness-plan-bodyparts button {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  color: #5f6d7c;
  background: rgba(248, 250, 252, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.fitness-plan-day-buttons button {
  min-height: 42px;
  font-size: 13px;
  font-weight: 820;
}

.fitness-plan-day-buttons button.is-active,
.fitness-plan-toggle button.is-active,
.fitness-plan-bodyparts button.is-active {
  border-color: rgba(95, 156, 85, 0.42);
  color: #477d3d;
  background: rgba(236, 246, 231, 0.96);
  box-shadow: 0 10px 20px rgba(95, 156, 85, 0.12);
}

.fitness-plan-schedule {
  display: grid;
  gap: 12px;
}

.fitness-plan-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(246, 249, 252, 0.88);
}

.fitness-plan-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fitness-plan-card__header strong {
  color: #1f2937;
  font-size: 17px;
  font-weight: 880;
}

.fitness-plan-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 142px;
}

.fitness-plan-toggle button {
  min-height: 36px;
  font-size: 12px;
  font-weight: 820;
}

.fitness-plan-bodyparts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.fitness-plan-bodyparts button {
  min-height: 44px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 820;
}

.fitness-plan-bodyparts.is-disabled {
  opacity: 0.48;
}

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

.fitness-plan-number {
  display: grid;
  gap: 8px;
}

.fitness-plan-number span {
  color: #64748b;
  font-size: 13px;
  font-weight: 760;
}

.fitness-plan-number input {
  min-height: 50px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 0 14px;
  color: #111827;
  background: #fff;
  font-size: 15px;
  outline: none;
}

.fitness-plan-number small {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 760;
}

.fitness-plan-rest {
  margin: 0;
  color: #374151;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.7;
}

.fitness-plan-actions {
  margin-top: -2px;
}

#fitnessDetailContent {
  display: grid;
  gap: 16px;
}

.fitness-detail-hero {
  display: grid;
  justify-items: center;
  padding: 28px 18px 22px;
  border: 1px solid rgba(104, 82, 52, 0.08);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0, rgba(95, 156, 85, 0.18), transparent 38%),
    radial-gradient(circle at 0 26%, rgba(100, 201, 255, 0.12), transparent 35%),
    rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(99, 82, 58, 0.1);
  text-align: center;
}

.fitness-detail-avatar {
  width: 92px;
  height: 92px;
  border: 5px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 18px 34px rgba(31, 41, 55, 0.14);
}

.fitness-detail-hero h1 {
  margin: 14px 0 5px;
  color: #111827;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.fitness-detail-hero p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  font-weight: 760;
}

.fitness-detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #477d3d;
  background: rgba(95, 156, 85, 0.12);
  font-size: 12px;
  font-weight: 820;
}

.fitness-detail-chip img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

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

.fitness-detail-grid article,
.fitness-detail-card {
  border: 1px solid rgba(104, 82, 52, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(99, 82, 58, 0.08);
}

.fitness-detail-grid article {
  min-height: 104px;
  padding: 15px;
}

.fitness-detail-grid span,
.fitness-detail-lines span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 780;
}

.fitness-detail-grid strong {
  display: block;
  margin-top: 9px;
  color: #1f2937;
  font-size: 18px;
  font-weight: 900;
}

.fitness-detail-grid small {
  display: block;
  margin-top: 5px;
  color: #8b9487;
  font-size: 11px;
  font-weight: 720;
}

.fitness-detail-card {
  padding: 16px;
}

.fitness-detail-card h2 {
  margin: 0 0 12px;
  color: #1f2937;
  font-size: 18px;
  font-weight: 880;
}

.fitness-detail-lines {
  display: grid;
  gap: 9px;
}

.fitness-detail-lines p {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(245, 251, 240, 0.74);
}

.fitness-detail-lines strong {
  color: #1f2937;
  font-size: 13px;
  font-weight: 820;
}

.fitness-detail-note {
  margin: 0;
  color: #374151;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.7;
}

.fitness-detail-photo {
  display: grid;
  min-height: 190px;
  place-items: center;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(104, 82, 52, 0.08);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(245, 251, 240, 0.95), rgba(248, 250, 252, 0.95));
  box-shadow: 0 14px 34px rgba(99, 82, 58, 0.08);
}

.fitness-detail-photo img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.fitness-detail-photo.is-icon img {
  width: 130px;
  height: 130px;
  object-fit: contain;
}

.fitness-detail-photo.is-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.fitness-detail-photo.is-gallery img {
  width: 100%;
  height: 132px;
  border-radius: 18px;
  object-fit: cover;
}

.fitness-detail-photo.is-gallery img:first-child:nth-last-child(3) {
  grid-column: 1 / -1;
  height: 160px;
}

.checkin-card {
  padding: 14px;
}

.checkin-layout {
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 142px;
}

.partner-check,
.check-ring {
  display: grid;
  place-items: center;
  color: inherit;
  background: transparent;
  text-align: center;
}

.avatar {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #e3d9d4, #8c7a72);
  color: #fff;
  box-shadow: 0 8px 22px rgba(38, 32, 28, 0.16);
  font-weight: 820;
}

.avatar-me {
  background: linear-gradient(145deg, #f7b2bd, #9d3f55);
}

.partner-check strong {
  margin-top: 8px;
  color: #7b7471;
  font-size: 12px;
}

.partner-check.is-done strong {
  color: var(--brand);
}

.check-ring {
  width: 120px;
  height: 120px;
  border: 8px solid #eee9e5;
  border-radius: 50%;
  box-shadow: inset 0 0 0 8px #faf7f4, 0 10px 28px rgba(38, 32, 28, 0.08);
}

.check-ring.is-done {
  border-color: #e48b9b;
}

.check-ring span,
.check-ring small {
  display: block;
}

.check-ring span {
  font-size: 15px;
  font-weight: 820;
}

.check-ring small {
  color: #9d9692;
  font-size: 11px;
}

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

.stats-grid article {
  min-width: 0;
  padding: 4px 10px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.stats-grid article:last-child {
  border-right: 0;
}

.stats-grid span {
  display: block;
  color: #918985;
  font-size: 11px;
}

.stats-grid strong {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 500;
}

.stats-grid b {
  font-size: 22px;
  font-weight: 820;
}

.chart-wrap {
  position: relative;
  height: 190px;
}

.chart-wrap canvas {
  width: 100%;
  height: 100%;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.inline-form input,
.inline-form button,
.settings-card input,
.primary-action,
.secondary-action {
  min-height: 42px;
  border-radius: 8px;
}

.inline-form input,
.settings-card input {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.inline-form button,
.primary-action {
  padding: 0 16px;
  color: #fff;
  background: var(--brand);
  font-weight: 760;
}

.record-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(37, 32, 30, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.record-item time {
  color: #8f8784;
  font-size: 12px;
}

.login-screen {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(42, 37, 34, 0.08);
  border-radius: 30px;
  background: #0a1735;
  box-shadow: var(--shadow);
}

.login-screen.is-hidden {
  display: none;
}

.login-cover {
  position: absolute;
  inset: 0;
}

.login-cover__art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.login-cover__frame {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(14, 22, 50, 0.18);
}

.login-lanyard {
  position: absolute;
  --lanyard-rope: clamp(140px, 22svh, 200px);
  left: 50%;
  top: 57%;
  width: clamp(102px, 29vw, 132px);
  aspect-ratio: 116 / 212;
  pointer-events: auto;
  touch-action: none;
  transform: translate(-50%, -50%);
}

.login-lanyard.is-dragging {
  cursor: grabbing;
}

.login-lanyard.is-rebounding {
  pointer-events: none;
}

.login-lanyard__pin {
  position: absolute;
  top: calc(-1 * var(--lanyard-rope) - 9px);
  left: 50%;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.38);
  transform: translateX(-50%);
}

.login-lanyard__cord {
  position: absolute;
  top: calc(-1 * var(--lanyard-rope));
  left: 50%;
  width: 180px;
  height: calc(var(--lanyard-rope) + 230px);
  overflow: visible;
  pointer-events: none;
  transform: translateX(-50%);
}

.login-lanyard__cord-path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.68);
  stroke-linecap: round;
  stroke-width: 2.3;
  filter: drop-shadow(1px 2px 4px rgba(7, 10, 19, 0.2));
}

.login-lanyard__cord-loop {
  fill: rgba(7, 10, 19, 0.12);
  stroke: rgba(255, 250, 245, 0.46);
  stroke-width: 1.5;
}

.login-lanyard__socket {
  position: absolute;
  top: 10.2%;
  left: 50%;
  width: 1px;
  height: 1px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.enter-lanyard {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  transform:
    translate(var(--login-lanyard-x, 0px), var(--login-lanyard-y, 0px))
    rotate(var(--login-lanyard-rotate, -1deg));
  border-radius: 22px;
  background: transparent;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.28));
  transform-origin: 50% calc(6% - var(--lanyard-rope));
  animation: loginLanyardFloat 4.8s ease-in-out infinite;
  touch-action: none;
  will-change: transform;
}

.login-lanyard.is-dragging .enter-lanyard,
.login-lanyard.is-rebounding .enter-lanyard {
  animation: none;
}

.login-lanyard.is-dragging .enter-lanyard {
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.34));
  transition: none;
}

.enter-lanyard img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes loginLanyardFloat {
  0%,
  100% {
    transform:
      translate(var(--login-lanyard-x, 0px), var(--login-lanyard-y, 0px))
      rotate(-1.8deg);
  }

  50% {
    transform:
      translate(var(--login-lanyard-x, 0px), var(--login-lanyard-y, 0px))
      rotate(1.8deg);
  }
}

.auth-dialog {
  position: fixed;
  inset: 0;
  width: min(calc(100vw - 28px), 390px);
  max-width: calc(100vw - 28px);
  max-height: min(100svh - 28px, 520px);
  margin: auto;
  border: 0;
  border-radius: 26px;
  padding: 0;
  color: #1e2430;
  background: transparent;
  overflow: visible;
}

.auth-dialog::backdrop {
  background: rgba(10, 12, 18, 0.38);
  backdrop-filter: blur(5px);
}

.auth-card {
  display: grid;
  max-height: min(100svh - 28px, 520px);
  overflow: auto;
  padding: 18px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.92), transparent 36%),
    linear-gradient(145deg, rgba(249, 249, 250, 0.92), rgba(226, 226, 229, 0.86));
  box-shadow: 0 26px 70px rgba(5, 9, 24, 0.32);
  backdrop-filter: blur(18px);
}

.auth-card__topline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.auth-close {
  color: #5f6470;
  background: rgba(255, 255, 255, 0.78);
}

.auth-close {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  font-size: 25px;
  line-height: 1;
}

.auth-profile {
  display: grid;
  justify-items: center;
  margin: 2px 0 18px;
}

.auth-profile img {
  width: 74px;
  height: 74px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(42, 48, 66, 0.14);
}

.auth-profile h1 {
  margin: 12px 0 4px;
  font-size: 25px;
  font-weight: 860;
}

.auth-profile p {
  margin: 0;
  color: #9aa0aa;
  font-size: 14px;
}

.login-persons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.login-persons button {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 62px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 2px solid transparent;
  border-radius: 18px;
  color: #303746;
  background: rgba(255, 255, 255, 0.62);
  text-align: left;
  font-weight: 760;
}

.login-persons button.is-active {
  border-color: #1688ff;
  box-shadow: 0 0 0 4px rgba(22, 136, 255, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.login-persons img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.login-form,
.settings-card {
  display: grid;
  gap: 10px;
}

.login-form label,
.settings-card label {
  display: grid;
  gap: 6px;
  color: #625b58;
  font-size: 13px;
}

.auth-card .login-form {
  gap: 12px;
}

.auth-card .login-form label span {
  display: none;
}

.login-form input {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(30, 37, 52, 0.08);
  border-radius: 16px;
  padding: 0 18px;
  color: #252936;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
}

.form-message {
  min-height: 18px;
  margin: 0;
  color: var(--brand);
  font-size: 12px;
  text-align: center;
}

.auth-submit {
  min-height: 56px;
  border-radius: 16px;
  background: linear-gradient(180deg, #172133, #101827);
  box-shadow: 0 12px 24px rgba(15, 22, 34, 0.22);
  font-size: 16px;
}

.secondary-action {
  border: 1px solid var(--line);
  color: #4c4542;
  background: rgba(255, 255, 255, 0.78);
  font-weight: 720;
}

.settings-dialog {
  width: min(calc(100vw - 28px), 390px);
  border: 0;
  border-radius: 28px;
  padding: 0;
  color: var(--ink);
  background: transparent;
}

.settings-dialog::backdrop {
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(14px);
}

.settings-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background:
    radial-gradient(circle at 24% 0%, rgba(100, 201, 255, 0.13), transparent 36%),
    #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
}

.dialog-heading,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-heading h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 880;
}

.dialog-heading button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #64748b;
  background: #f4f7fb;
  font-size: 19px;
}

.dialog-actions {
  margin-top: 4px;
}

.dialog-actions button {
  flex: 1;
}

.settings-card label {
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 720;
}

.settings-card input {
  min-height: 52px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 0 15px;
  color: #111827;
  background: #f8fafc;
  font-size: 15px;
}

.dialog-actions .primary-action {
  min-height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6bd0ff, #4f7cff);
  box-shadow: 0 14px 26px rgba(79, 124, 255, 0.22);
}

.dialog-actions .secondary-action {
  min-height: 52px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  color: #475569;
  background: #fff;
}

.insight-dialog {
  width: min(calc(100vw - 34px), 390px);
}

.insight-dialog-card {
  max-height: min(78svh, 620px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 0%, rgba(229, 244, 235, 0.82), transparent 34%),
    radial-gradient(circle at 100% 10%, rgba(232, 244, 255, 0.72), transparent 34%),
    #fff;
  scrollbar-width: none;
}

.insight-dialog-card::-webkit-scrollbar {
  display: none;
}

.insight-dialog-content {
  display: grid;
  gap: 14px;
}

.insight-detail-metric {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.insight-detail-metric strong {
  color: #1f2937;
  font-size: 28px;
  font-weight: 880;
}

.insight-detail-metric strong small {
  margin-left: 4px;
  color: #8d949e;
  font-size: 14px;
}

.insight-detail-metric span,
.insight-empty {
  color: #7a8391;
  font-size: 13px;
  font-weight: 720;
}

.insight-calendar-detail {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.insight-calendar-detail article {
  display: grid;
  min-height: 74px;
  place-items: center;
  gap: 2px;
  border-radius: 16px;
  background: #f5f8fb;
}

.insight-calendar-detail article.is-done {
  background: rgba(90, 167, 255, 0.16);
}

.insight-calendar-detail article.is-today {
  color: #fff;
  background: linear-gradient(145deg, #64b5ff, #4f7cff);
  box-shadow: 0 12px 22px rgba(79, 124, 255, 0.2);
}

.insight-calendar-detail b,
.insight-calendar-detail small {
  font-size: 10px;
}

.insight-calendar-detail strong {
  font-size: 18px;
}

.insight-detail-list {
  display: grid;
  gap: 9px;
}

.insight-detail-list article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.insight-detail-list img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.insight-detail-list strong,
.insight-detail-list small {
  display: block;
}

.insight-detail-list strong {
  color: #1f2937;
  font-size: 14px;
}

.insight-detail-list small {
  margin-top: 3px;
  color: #7a8391;
  font-size: 12px;
}

.insight-week-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-height: 170px;
  align-items: end;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.insight-week-bars span {
  display: grid;
  height: 140px;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  gap: 5px;
  color: #7a8391;
  font-size: 10px;
  font-weight: 760;
}

.insight-week-bars i {
  align-self: end;
  width: 100%;
  border-radius: 999px 999px 5px 5px;
  background: linear-gradient(180deg, rgba(156, 136, 238, 0.74), rgba(156, 136, 238, 0.22));
}

.insight-chart-caption {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 760;
}

.insight-mood-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-height: 170px;
  align-items: end;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.insight-mood-chart span {
  display: grid;
  height: 140px;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  gap: 5px;
  color: #7a8391;
  font-size: 10px;
  font-weight: 760;
}

.insight-mood-chart i {
  align-self: end;
  width: 100%;
  border-radius: 999px 999px 5px 5px;
  background: linear-gradient(180deg, rgba(255, 174, 66, 0.8), rgba(255, 174, 66, 0.2));
}

.insight-mood-chart .is-empty i {
  background: rgba(148, 163, 184, 0.18);
}

.insight-mood-list {
  display: grid;
  gap: 8px;
}

.insight-mood-list article {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  color: #374151;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
  font-size: 13px;
  font-weight: 760;
}

.insight-mood-list article.is-empty {
  color: #9aa3af;
}

.insight-mood-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-mood-list b {
  color: #ff9f35;
}

.moment-dialog {
  width: min(calc(100vw - 34px), 380px);
}

.moment-composer-card {
  gap: 16px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 236, 199, 0.56), transparent 36%),
    radial-gradient(circle at 100% 10%, rgba(229, 244, 235, 0.82), transparent 34%),
    #fff;
}

.moment-compose-panel {
  display: none;
}

.moment-compose-panel.is-active {
  display: block;
}

.moment-photo-picker {
  display: grid;
  min-height: 164px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(95, 148, 117, 0.35);
  border-radius: 22px;
  color: #5f9475;
  background:
    linear-gradient(145deg, rgba(241, 249, 244, 0.92), rgba(255, 255, 255, 0.96)),
    #fff;
  cursor: pointer;
}

.moment-photo-picker span {
  font-size: 15px;
  font-weight: 820;
}

.moment-photo-picker img {
  display: none;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.moment-photo-picker img.is-visible {
  display: block;
}

.moment-photo-picker:has(img.is-visible) span {
  display: none;
}

.moment-mood-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.moment-mood-grid button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 999px;
  color: #59606b;
  background: #f4f7fb;
  font-size: 13px;
  font-weight: 780;
  white-space: nowrap;
}

.moment-mood-grid button span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #75a865;
  background: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  line-height: 1;
}

.moment-mood-grid button.is-active {
  color: #fff;
  background: linear-gradient(145deg, #83b76b, #60924d);
  box-shadow: 0 10px 18px rgba(96, 146, 77, 0.22);
}

.moment-mood-grid button.is-active span {
  color: #60924d;
  background: rgba(255, 255, 255, 0.92);
}

.moment-custom-mood {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.moment-custom-mood span {
  color: #64748b;
  font-size: 13px;
  font-weight: 760;
}

.moment-custom-mood input {
  min-height: 46px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 0 14px;
  color: #111827;
  background: #fff;
  font-size: 14px;
  outline: none;
}

.moment-custom-mood input:focus {
  border-color: rgba(95, 148, 117, 0.42);
  box-shadow: 0 0 0 3px rgba(95, 148, 117, 0.12);
}

.moment-text-field {
  display: grid;
  gap: 8px;
}

.moment-text-field span {
  color: #64748b;
  font-size: 13px;
  font-weight: 760;
}

.moment-text-field textarea {
  width: 100%;
  min-height: 112px;
  padding: 14px 15px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  outline: none;
  color: #111827;
  background: #f8fafc;
  resize: vertical;
  font: inherit;
  font-size: 15px;
  line-height: 1.7;
}

.moment-text-field textarea:focus {
  border-color: rgba(95, 148, 117, 0.42);
  box-shadow: 0 0 0 3px rgba(95, 148, 117, 0.12);
}

.workout-dialog {
  position: relative;
  width: min(calc(100vw - 44px), 360px);
  max-height: min(74svh, 650px);
  overflow: hidden;
}

.workout-card {
  position: relative;
  max-height: min(74svh, 650px);
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: 12px;
  padding: 18px 18px 16px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 0 0, rgba(100, 201, 255, 0.18), transparent 38%),
    radial-gradient(circle at 100% 12%, rgba(114, 180, 98, 0.12), transparent 32%),
    #fff;
  scrollbar-width: none;
}

.workout-card::-webkit-scrollbar {
  display: none;
}

.workout-card .dialog-heading {
  margin-bottom: 2px;
  padding-right: 44px;
  background: transparent;
}

.workout-card .dialog-heading h2 {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.workout-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #64748b;
  background: #f1f5f9 !important;
  font-size: 19px;
}

.workout-field {
  display: grid;
  gap: 10px;
}

.workout-field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #52627a;
  font-size: 13px;
  font-weight: 820;
}

.workout-field__label b {
  color: #5f9c55;
  font-size: 14px;
}

.workout-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.workout-type-groups {
  display: grid;
  gap: 12px;
}

.workout-type-group {
  display: grid;
  gap: 8px;
}

.workout-type-group__title {
  color: #7b8794;
  font-size: 12px;
  font-weight: 780;
}

.workout-type-option {
  display: grid;
  min-height: 72px;
  place-items: center;
  gap: 5px;
  padding: 9px 6px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  color: #5f6d7c;
  background: rgba(248, 250, 252, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.workout-type-option img {
  display: block;
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.workout-type-option span {
  font-size: 12px;
  font-weight: 820;
}

.workout-type-option.is-active {
  border-color: rgba(95, 156, 85, 0.42);
  color: #477d3d;
  background: linear-gradient(145deg, rgba(236, 248, 229, 0.98), rgba(255, 255, 255, 0.95));
  box-shadow: 0 12px 24px rgba(95, 156, 85, 0.16);
  transform: translateY(-1px);
}

.workout-custom-type {
  display: grid;
  gap: 8px;
}

.workout-custom-type.is-hidden {
  display: none;
}

.workout-custom-type span {
  color: #7b8794;
  font-size: 12px;
  font-weight: 780;
}

.workout-custom-type input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  color: #253041;
  background: rgba(248, 250, 252, 0.9);
  outline: none;
}

.workout-custom-type input:focus {
  border-color: rgba(95, 156, 85, 0.4);
  box-shadow: 0 0 0 4px rgba(95, 156, 85, 0.12);
}

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

.workout-status-option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 54px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  color: #5f6d7c;
  background: rgba(248, 250, 252, 0.88);
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.workout-status-option i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 13px;
  color: #5f9c55;
  background: rgba(95, 156, 85, 0.12);
  font-style: normal;
  font-size: 17px;
  font-weight: 850;
}

.workout-status-option span {
  font-size: 12px;
  font-weight: 820;
}

.workout-status-option.is-active {
  border-color: rgba(95, 156, 85, 0.42);
  color: #477d3d;
  background: linear-gradient(145deg, rgba(236, 248, 229, 0.98), rgba(255, 255, 255, 0.95));
  box-shadow: 0 10px 20px rgba(95, 156, 85, 0.14);
  transform: translateY(-1px);
}

.workout-card input[type="number"],
.workout-card input[type="text"],
.workout-card input:not([type]) {
  min-height: 48px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 0 16px;
  color: #111827;
  background: #f8fafc;
  font-size: 15px;
  font-weight: 760;
}

.workout-card input[type="range"] {
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  appearance: none;
}

.workout-card input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #65c7ff var(--range-progress, 23%), #e9eef4 0);
}

.workout-card input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -9px;
  border: 5px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #6bd0ff, #4f7cff);
  box-shadow: 0 8px 18px rgba(79, 124, 255, 0.28);
  appearance: none;
}

.workout-card input[type="range"]::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: #e9eef4;
}

.workout-card input[type="range"]::-moz-range-progress {
  height: 10px;
  border-radius: 999px;
  background: #65c7ff;
}

.workout-card input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #4f7cff;
  box-shadow: 0 8px 18px rgba(79, 124, 255, 0.28);
}

.workout-photo-picker {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 58px;
  min-height: 72px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 10px 12px;
  border: 1px dashed rgba(95, 156, 85, 0.32);
  border-radius: 20px;
  color: #52627a;
  background: linear-gradient(145deg, rgba(245, 251, 240, 0.9), rgba(248, 250, 252, 0.94));
  cursor: pointer;
}

.workout-photo-plus {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  color: #5f9c55;
  background: rgba(95, 156, 85, 0.12);
  font-size: 28px;
  line-height: 1;
}

.workout-photo-picker strong,
.workout-photo-picker small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workout-photo-picker strong {
  color: #1f2937;
  font-size: 14px;
  font-weight: 850;
}

.workout-photo-picker small {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.workout-photo-preview {
  display: none;
  width: 58px;
  height: 52px;
  gap: 3px;
}

.workout-photo-preview.is-visible {
  display: grid;
}

.workout-photo-preview.is-multiple {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workout-photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 10px;
  object-fit: cover;
}

.workout-card input.visually-hidden {
  position: absolute;
  width: 1px;
  min-height: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
}

.workout-card .dialog-actions {
  margin-top: 2px;
}

.workout-card .dialog-actions .primary-action {
  min-height: 56px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 860;
}

@media (max-width: 390px) {
  .game-mini-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .game-mini-card__badge {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .app-viewport {
    padding: 0;
  }

  .mobile-shell,
  .login-screen {
    width: 100vw;
    height: 100svh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .panel-scroll {
    padding-right: 16px;
    padding-left: 16px;
  }

  .home-screen {
    padding: 0 0 34px;
  }

  .hero-card,
  .hero-card__overlay {
    min-height: 216px;
  }

  .fitness-screen {
    padding-right: 16px;
    padding-left: 16px;
  }

  .fitness-hero {
    margin-right: 0;
    margin-left: 0;
  }

  .login-cover__frame {
    inset: 12px;
  }

  .login-lanyard {
    width: clamp(102px, 29vw, 132px);
  }

  .auth-dialog {
    width: min(calc(100vw - 18px), 390px);
    max-width: calc(100vw - 18px);
    max-height: min(100svh - 18px, 520px);
  }

  .workout-dialog {
    width: min(calc(100vw - 44px), 360px);
    max-height: 74svh;
  }

  .workout-card {
    max-height: 74svh;
  }
}

@media (max-height: 760px) {
  .login-lanyard {
    top: 57%;
    --lanyard-rope: clamp(112px, 19svh, 150px);
    width: clamp(92px, 26vw, 118px);
  }

  .auth-card {
    padding: 14px 16px 16px;
    max-height: min(100svh - 18px, 480px);
  }

  .auth-profile {
    margin-bottom: 12px;
  }

  .auth-profile img {
    width: 60px;
    height: 60px;
  }

  .auth-profile h1 {
    margin-top: 8px;
    font-size: 21px;
  }

  .login-persons {
    gap: 10px;
    margin-bottom: 12px;
  }

  .login-persons button {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 54px;
    padding: 6px 10px;
  }

  .login-persons img {
    width: 42px;
    height: 42px;
  }

  .login-form input,
  .auth-submit {
    min-height: 48px;
  }
}
