:root {
  --green: #35d07f;
  --green-deep: #169b5a;
  --blue: #4da3ff;
  --blue-deep: #1d76d8;
  --orange: #ff9f43;
  --orange-deep: #c86f12;
  --yellow: #ffd166;
  --ink: #172033;
  --muted: #6b7280;
  --line: #e3efe9;
  --bg: #f4fbf7;
  --card: #ffffff;
  --soft-green: #e9fff3;
  --soft-blue: #eaf5ff;
  --soft-orange: #fff3e6;
  --shadow: 0 16px 40px rgba(25, 108, 77, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(53, 208, 127, 0.2), transparent 32%),
    radial-gradient(circle at bottom right, rgba(77, 163, 255, 0.18), transparent 34%),
    var(--bg);
}

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

.phone-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.phone {
  width: min(100vw - 28px, 430px);
  height: min(900px, calc(100vh - 28px));
  min-height: 720px;
  border: 12px solid #172033;
  border-radius: 42px;
  background: var(--bg);
  box-shadow: 0 26px 70px rgba(42, 85, 70, 0.22);
  overflow: hidden;
  position: relative;
}

.status-bar {
  height: 34px;
  padding: 10px 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.app-screen {
  height: calc(100% - 106px);
  overflow: auto;
  padding: 14px 18px 18px;
  scrollbar-width: none;
}

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

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 8px 8px 10px;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.game-page {
  gap: 12px;
}

.game-hero {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 18px;
  border-radius: 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.26), transparent 24%),
    linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: var(--shadow);
}

.game-hero h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.12;
}

.game-hero .subtitle {
  color: rgba(255, 255, 255, 0.88);
}

.game-open-pill {
  position: absolute;
  left: 18px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 950;
}

.hero-bolt,
.hero-flag {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 950;
}

.hero-bolt {
  right: 22px;
  bottom: 18px;
  width: 48px;
  height: 48px;
  font-size: 25px;
}

.hero-flag {
  right: 78px;
  top: 22px;
  width: 34px;
  height: 34px;
}

.cat-card {
  position: relative;
  overflow: hidden;
  min-height: 286px;
  border-radius: 26px;
  color: #ffffff;
  background:
    radial-gradient(circle at 14% 20%, rgba(255, 255, 255, 0.22), transparent 24%),
    linear-gradient(145deg, #19bf79 0%, #309bff 100%);
  box-shadow: 0 18px 38px rgba(29, 118, 216, 0.22);
}

.cat-card-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  padding: 18px;
}

.cat-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.cat-card p {
  margin: 0;
  max-width: 260px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 850;
  line-height: 1.45;
}

.game-mode,
.hot-chip,
.cat-status span,
.game-tags span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.game-mode,
.hot-chip {
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.18);
}

.hot-chip {
  color: #164b35;
  background: rgba(255, 255, 255, 0.82);
}

.game-tags,
.cat-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.game-tags span {
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.18);
}

.cat-status span {
  padding: 7px 9px;
  background: rgba(23, 32, 51, 0.16);
}

.cat-join-btn {
  width: 100%;
  min-height: 46px;
  margin-top: 2px;
  color: var(--green-deep);
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(23, 32, 51, 0.18);
}

.cat-map {
  position: absolute;
  inset: 0;
  opacity: 0.72;
}

.map-point {
  position: absolute;
  z-index: 1;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 11px;
  font-weight: 950;
}

.map-point::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.18);
}

.map-point.dorm {
  right: 26px;
  top: 78px;
}

.map-point.track {
  right: 34px;
  bottom: 72px;
}

.map-point.cafe {
  left: 22px;
  bottom: 48px;
}

.route-line {
  position: absolute;
  height: 3px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.76) 0 12px, transparent 12px 20px);
  transform-origin: left center;
}

.route-line.one {
  right: 72px;
  top: 120px;
  width: 130px;
  transform: rotate(22deg);
}

.route-line.two {
  left: 76px;
  bottom: 84px;
  width: 150px;
  transform: rotate(-14deg);
}

.safety-card {
  display: flex;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(77, 163, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.safety-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

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

.game-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(227, 239, 233, 0.95);
  box-shadow: 0 10px 26px rgba(25, 108, 77, 0.07);
}

.game-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.game-card-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--orange-deep);
  background: var(--soft-orange);
}

.game-card-icon.blue {
  color: var(--blue-deep);
  background: var(--soft-blue);
}

.status-chip.orange {
  color: var(--orange-deep);
  background: var(--soft-orange);
}

.status-chip.blue {
  color: var(--blue-deep);
  background: var(--soft-blue);
}

.boss-card {
  background: linear-gradient(180deg, #ffffff 0%, #fff8f0 100%);
}

.boss-face {
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: var(--orange-deep);
  background:
    radial-gradient(circle at 28% 38%, #ffffff 0 5px, transparent 6px),
    radial-gradient(circle at 68% 38%, #ffffff 0 5px, transparent 6px),
    linear-gradient(135deg, #ffbc6b, var(--orange));
  font-weight: 950;
}

.boss-health {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #ffe1bd;
}

.boss-health span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), #ff5e5e);
}

.orange-btn {
  color: var(--orange-deep);
  background: var(--soft-orange);
}

.flag-card {
  background: linear-gradient(180deg, #ffffff 0%, #f2f9ff 100%);
}

.campus-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.campus-points span {
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #667085;
  background: #edf4f1;
  font-size: 12px;
  font-weight: 900;
}

.campus-points span.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.leader-line {
  margin: 0;
  color: #315046;
  font-size: 12px;
  line-height: 1.35;
}

.game-card-actions,
.relay-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.game-card-actions .ghost-btn,
.relay-actions .ghost-btn {
  min-height: 38px;
  padding-inline: 10px;
  white-space: nowrap;
}

.relay-card {
  display: grid;
  gap: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fffb 100%);
}

.relay-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  position: relative;
}

.relay-track::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 20px;
  height: 3px;
  border-radius: 999px;
  background: #dfeae5;
}

.relay-member {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 900;
}

.relay-member span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #e7f0ec;
}

.relay-member.done {
  color: var(--green-deep);
}

.relay-member.done span {
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.relay-member.current span {
  box-shadow: 0 0 0 4px rgba(255, 159, 67, 0.24);
}

.relay-status {
  margin: 0;
  color: #315046;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.hot-game-list {
  display: grid;
  gap: 8px;
}

.hot-game-list > div {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-radius: 15px;
  background: #f8fdfa;
}

.hot-game-list span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--soft-green);
}

.hot-game-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: right;
}

.game-rules-modal {
  text-align: left;
}

.game-rules-modal .modal-icon,
.game-rules-modal h2 {
  text-align: center;
}

.game-rules-modal ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: #475467;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.game-detail-modal {
  text-align: left;
}

.game-detail-modal .modal-icon,
.game-detail-modal h2 {
  text-align: center;
}

.game-detail-grid,
.boss-report {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-top: 14px;
}

.game-detail-grid > div,
.boss-report > div {
  padding: 11px;
  border-radius: 15px;
  background: #f8fdfa;
  border: 1px solid var(--line);
}

.game-detail-grid strong,
.game-detail-grid span,
.boss-report strong,
.boss-report span {
  display: block;
}

.game-detail-grid strong,
.boss-report span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.game-detail-grid span,
.boss-report strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.game-detail-section {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--soft-blue);
}

.game-detail-section strong {
  display: block;
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 950;
}

.game-detail-section p {
  margin: 6px 0 0;
  color: #475467;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.mini-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.mini-timeline span {
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #7a8495;
  background: #edf4f1;
  font-size: 12px;
  font-weight: 900;
}

.mini-timeline span.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.flag-battle-map {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.flag-battle-map span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--blue-deep);
  background: var(--soft-blue);
  font-size: 13px;
  font-weight: 950;
}

.flag-battle-map span.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.modal-rewards {
  margin-top: 12px;
}

button:active {
  transform: translateY(1px) scale(0.99);
}

.tab-btn {
  display: grid;
  place-items: center;
  gap: 2px;
  color: #7a8495;
  background: transparent;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
}

.tab-btn .icon {
  font-size: 21px;
  line-height: 1;
}

.tab-btn.active {
  color: var(--green-deep);
  background: var(--soft-green);
}

.page {
  display: grid;
  gap: 14px;
  animation: rise 0.22s ease-out;
}

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

.hero {
  padding: 18px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(53, 208, 127, 0.96), rgba(77, 163, 255, 0.88)),
    url("data:image/svg+xml,%3Csvg width='220' height='160' viewBox='0 0 220 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M160 26c17 12 28 33 23 51-4 18-24 32-42 40-18 9-34 12-52 8-18-5-37-17-44-34-8-18-3-41 12-56 15-14 40-21 61-23 16-1 30 2 42 14z' fill='white' fill-opacity='.14'/%3E%3C/svg%3E");
  color: white;
  box-shadow: var(--shadow);
}

.today-hero {
  padding-bottom: 16px;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.24), transparent 26%),
    linear-gradient(135deg, rgba(53, 208, 127, 0.98), rgba(77, 163, 255, 0.9) 68%, rgba(255, 159, 67, 0.86));
}

.today-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.today-hero-badges span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 900;
}

.hero-top,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  opacity: 0.78;
  font-weight: 700;
}

.hero h1,
.page-title h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.hero .subtitle {
  color: rgba(255, 255, 255, 0.86);
}

.level-pill,
.small-pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.stats-strip {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.progress {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(23, 32, 51, 0.1);
}

.hero .progress {
  background: rgba(255, 255, 255, 0.25);
}

.progress > span {
  display: block;
  height: 100%;
  width: var(--value);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #75e8aa);
}

.hero .progress > span,
.profile-card .progress > span {
  background: linear-gradient(90deg, var(--orange), #ffffff);
}

.card {
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 10px 26px rgba(25, 108, 77, 0.07);
  border: 1px solid rgba(227, 239, 233, 0.95);
  padding: 16px;
}

.section-title {
  margin: 0 0 12px;
  font-size: 17px;
}

.task-main {
  display: grid;
  gap: 12px;
}

.today-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10px;
}

.task-badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--soft-orange);
  color: var(--orange-deep);
  font-size: 12px;
  font-weight: 900;
}

.reward-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reward {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--soft-orange);
  color: var(--orange-deep);
  font-size: 12px;
  font-weight: 900;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 38px;
  border-radius: 14px;
  padding: 0 14px;
  font-weight: 900;
}

.auth-page {
  min-height: 100%;
  align-content: center;
}

.auth-hero {
  padding: 20px 4px 2px;
  text-align: center;
}

.auth-logo {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-deep), var(--blue-deep));
  font-size: 28px;
  font-weight: 950;
  box-shadow: var(--shadow);
}

.auth-card {
  display: grid;
  gap: 14px;
}

.input-field {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
}

.input-field input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.input-field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.15);
}

.ghost-btn.full {
  width: 100%;
}

.account-card {
  display: grid;
  gap: 12px;
}

.account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.account-actions .ghost-btn:only-child {
  grid-column: 1 / -1;
}

.admin-user-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
  max-height: 300px;
  overflow: auto;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.admin-user-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--green), #4edb91);
  box-shadow: 0 10px 22px rgba(53, 208, 127, 0.28);
}

.primary-btn.done {
  background: #b7d9c9;
  box-shadow: none;
}

.secondary-btn {
  color: var(--green-deep);
  background: var(--soft-green);
}

.ghost-btn {
  color: var(--blue-deep);
  background: var(--soft-blue);
}

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

.side-task-grid {
  display: grid;
  gap: 9px;
}

.mini-task,
.member,
.feed-item,
.setting-row,
.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-task {
  padding: 11px;
  border-radius: 16px;
  background: #f8fdfa;
}

.side-claim {
  align-items: center;
}

.side-claim.claimed {
  opacity: 0.72;
}

.task-name {
  font-weight: 900;
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.check {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-weight: 900;
}

.check.todo {
  color: #98a2b3;
  background: #e7f0ec;
}

.avatars {
  display: flex;
  align-items: center;
  margin-top: 12px;
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 3px solid white;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--green));
  font-weight: 900;
  margin-right: -7px;
  position: relative;
}

.buddy-list {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.buddy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.buddy-row .avatar {
  width: 34px;
  height: 34px;
  margin: 0;
  border-width: 2px;
}

.buddy-row .check {
  width: 24px;
  height: 24px;
}

.avatar.off {
  filter: grayscale(1);
  opacity: 0.62;
}

.avatar::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid white;
  background: var(--green);
}

.avatar.off::after {
  background: #c2cad4;
}

.page-title {
  padding: 4px 2px 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border-radius: 16px;
  background: #e7f2ee;
  gap: 4px;
}

.segmented button {
  min-height: 36px;
  border-radius: 12px;
  background: transparent;
  color: #667085;
  font-weight: 900;
}

.segmented button.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 4px 12px rgba(31, 45, 61, 0.08);
}

.task-card {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 14px;
  border-radius: 18px;
  background: white;
  border: 1px solid var(--line);
}

.task-card.claimed {
  opacity: 0.68;
  background: #f8fdfa;
}

.task-card.locked {
  border-style: dashed;
}

.status-chip {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green-deep);
  background: var(--soft-green);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-chip.todo {
  color: #7a8495;
  background: #edf4f1;
}

.team-header {
  background: linear-gradient(135deg, var(--blue), #35c8b0);
  color: white;
}

.team-header .subtitle {
  color: rgba(255, 255, 255, 0.82);
}

.big-number {
  font-size: 30px;
  font-weight: 950;
}

.member {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.member:last-child {
  border-bottom: 0;
}

.member-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.member .avatar {
  margin: 0;
  flex: 0 0 auto;
}

.feed-item {
  justify-content: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: #465064;
  font-size: 13px;
}

.feed-item:last-child {
  border-bottom: 0;
}

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

.badge {
  min-height: 124px;
  padding: 13px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fdfa);
  border: 1px solid var(--line);
  text-align: left;
}

.badge.unlocked {
  border-color: rgba(255, 159, 67, 0.32);
  background: linear-gradient(180deg, #fff6ec, #ffffff);
}

.badge.locked {
  filter: grayscale(1);
  opacity: 0.55;
}

.badge-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--soft-orange);
  font-size: 23px;
}

.rank-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.rank-tabs button {
  min-height: 34px;
  border-radius: 12px;
  background: #edf4f1;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.rank-tabs button.active {
  background: var(--soft-green);
  color: var(--green-deep);
}

.rank-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.profile-card {
  background:
    linear-gradient(135deg, rgba(255, 159, 67, 0.95), rgba(53, 208, 127, 0.9)),
    #fff;
  color: white;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-xp {
  margin-top: 14px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  border: 3px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.2);
  font-size: 28px;
}

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

.data-cell {
  padding: 12px;
  border-radius: 18px;
  background: var(--soft-blue);
  border: 1px solid rgba(77, 163, 255, 0.18);
}

.data-cell strong {
  color: var(--blue-deep);
}

.data-cell strong {
  display: block;
  font-size: 22px;
}

.achievement-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.achievement-strip > div {
  padding: 12px;
  border-radius: 16px;
  background: #f8fdfa;
}

.achievement-strip strong,
.achievement-strip span {
  display: block;
}

.profile-badges .badge {
  min-height: 108px;
}

.preference-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.preference-summary {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.preference-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: #f8fdfa;
}

.preference-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.preference-summary strong {
  font-size: 13px;
  text-align: right;
}

.tag {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 900;
}

.setting-row {
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.setting-row:last-child {
  border-bottom: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 20;
  transform: translate(-50%, 18px);
  max-width: 340px;
  padding: 12px 16px;
  border-radius: 999px;
  color: white;
  background: rgba(23, 32, 51, 0.9);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: 0.22s ease;
  font-size: 14px;
  font-weight: 800;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.modal {
  width: min(360px, 92vw);
  padding: 22px;
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow);
  text-align: center;
}

.modal-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 24px;
  background: var(--soft-green);
  font-size: 34px;
}

.modal h2 {
  margin: 0 0 8px;
}

.modal p {
  margin: 6px 0;
  color: #475467;
  font-weight: 700;
}

@media (max-height: 760px) {
  .phone {
    min-height: auto;
  }

  .app-screen {
    padding-inline: 14px;
  }
}

button:disabled {
  cursor: default;
}

.app-icon {
  width: var(--icon-size);
  height: var(--icon-size);
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: calc(var(--icon-size) * 0.82);
  line-height: 1;
}

.tab-btn .app-icon {
  font-size: 18px;
}

.hero h1,
.page-title h1,
.team-header h1 {
  line-height: 1.16;
}

.hero-medal {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.meta.light {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 7px;
}

.card {
  border-radius: 18px;
}

.section-title.tight {
  margin: 0;
}

.task-badge.done {
  color: var(--green-deep);
  background: var(--soft-green);
}

.task-spotlight,
.task-card-title {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.spot-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  color: var(--green-deep);
  background: var(--soft-green);
  font-weight: 950;
}

.spot-icon.small {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.reward.blue {
  color: var(--blue-deep);
  background: var(--soft-blue);
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.primary-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.66;
  box-shadow: none;
}

.mini-task.finished {
  background: linear-gradient(135deg, var(--soft-green), #f8fdfa);
}

.team-progress-card .progress > span {
  background: linear-gradient(90deg, var(--blue), #8bc5ff);
}

.team-status-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fffb 100%);
}

.team-status-card .progress > span {
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.today-relay-card {
  display: grid;
  gap: 12px;
}

.compact-relay .relay-member span {
  width: 34px;
  height: 34px;
}

.compact-relay::before {
  top: 17px;
}

.task-stack {
  display: grid;
  gap: 12px;
}

.task-card {
  margin-bottom: 0;
}

.team-header h1 {
  margin: 2px 0 4px;
  font-size: 24px;
}

.team-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.team-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.team-facts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 900;
}

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

.join-card {
  min-height: 126px;
  padding: 13px;
  border-radius: 18px;
  background: white;
  border: 1px solid rgba(227, 239, 233, 0.95);
  box-shadow: 0 10px 26px rgba(25, 108, 77, 0.06);
  text-align: left;
}

.join-card > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-bottom: 9px;
  border-radius: 13px;
  color: var(--blue-deep);
  background: var(--soft-blue);
  font-weight: 950;
}

.join-card strong,
.join-card small {
  display: block;
}

.join-card strong {
  line-height: 1.25;
}

.join-card small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.team-tip {
  margin: 10px 0 0;
  color: #315046;
  font-size: 13px;
  font-weight: 800;
}

.badge-icon.featured {
  color: var(--orange-deep);
}

.challenge-card {
  background: linear-gradient(180deg, #ffffff, var(--soft-green));
}

.rank-note {
  margin: -5px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.rank-no {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green-deep);
  background: var(--soft-green);
  font-size: 12px;
  font-weight: 950;
}

.rank-no.top {
  color: var(--orange-deep);
  background: var(--soft-orange);
}

.profile-main h1,
.profile-main p {
  margin: 0;
}

.profile-main p {
  margin: 5px 0 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.feedback-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--soft-orange), #ffffff);
}

.feedback-card > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  color: var(--orange-deep);
  background: var(--soft-orange);
}

.feedback-card p {
  margin: 0;
  color: #315046;
  font-size: 15px;
  font-weight: 850;
}

.setting-row {
  width: 100%;
  background: transparent;
  color: var(--ink);
}

.setting-row,
.setting-row > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.setting-row > span {
  justify-content: flex-start;
}

.modal .primary-btn {
  width: 100%;
  margin-top: 16px;
}

.modal-icon.success {
  color: var(--green-deep);
}

@media (max-width: 390px) {
  .hero h1,
  .page-title h1,
  .team-header h1 {
    font-size: 22px;
  }

  .hero-top {
    align-items: flex-start;
  }
}

@media (max-width: 360px) {
  .phone-shell {
    padding: 8px;
  }

  .phone {
    width: calc(100vw - 12px);
    border-width: 8px;
    border-radius: 34px;
  }

  .member {
    align-items: flex-start;
    flex-direction: column;
  }
}

.action-card {
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfffd 100%);
  border-color: rgba(53, 208, 127, 0.22);
}

.action-meta-grid,
.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.action-meta-grid > div,
.rule-card {
  padding: 11px;
  border-radius: 16px;
  background: #f8fdfa;
}

.action-meta-grid strong,
.action-meta-grid span,
.rule-card strong,
.rule-card span {
  display: block;
}

.action-meta-grid strong,
.rule-card strong {
  font-size: 15px;
}

.action-meta-grid span,
.rule-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.rule-card.xp {
  border: 1px solid rgba(255, 159, 67, 0.28);
  background: var(--soft-orange);
}

.rule-card.xp strong {
  color: var(--orange-deep);
}

.rule-card.energy {
  border: 1px solid rgba(77, 163, 255, 0.22);
  background: var(--soft-blue);
}

.rule-card.energy strong {
  color: var(--blue-deep);
}

.onboarding-card {
  display: grid;
  gap: 13px;
}

.onboard-form {
  display: grid;
  gap: 11px;
}

.onboard-form label {
  display: grid;
  gap: 7px;
  color: #315046;
  font-size: 13px;
  font-weight: 900;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.choice-row button {
  min-height: 34px;
  border-radius: 12px;
  color: #667085;
  background: #edf4f1;
  font-size: 12px;
  font-weight: 900;
}

.choice-row button.active {
  color: var(--green-deep);
  background: var(--soft-green);
  box-shadow: inset 0 0 0 1px rgba(53, 208, 127, 0.28);
}

.workout-page {
  align-content: start;
}

.back-btn {
  width: fit-content;
  min-height: 34px;
}

.workout-hero {
  display: grid;
  gap: 16px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.22), transparent 38%),
    linear-gradient(135deg, var(--green), var(--blue));
}

.workout-hero h1,
.workout-hero p {
  margin: 0;
}

.workout-hero p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
}

.workout-hero .progress {
  background: rgba(255, 255, 255, 0.25);
}

.timer-ring {
  width: 184px;
  height: 184px;
  display: grid;
  place-items: center;
  margin: 4px auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.18) 0 58%, transparent 59%),
    conic-gradient(#ffffff 0 74%, rgba(255, 255, 255, 0.24) 74% 100%);
  box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.12);
}

.timer-ring span,
.timer-ring small {
  grid-area: 1 / 1;
}

.timer-ring span {
  font-size: 38px;
  font-weight: 950;
  letter-spacing: 0;
}

.timer-ring small {
  align-self: end;
  margin-bottom: 48px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 900;
}

.workout-actions {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 10px;
}

.workout-actions .secondary-btn {
  color: white;
  background: rgba(255, 255, 255, 0.22);
}

.workout-actions .primary-btn {
  color: var(--green-deep);
  background: #ffffff;
}

.treasure-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--soft-orange), #ffffff);
}

.treasure-row > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: white;
  color: var(--orange-deep);
}

.treasure-row strong,
.treasure-row small {
  display: block;
}

.treasure-row small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.compact {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 11px;
  font-size: 12px;
}

.review-bars {
  display: grid;
  gap: 11px;
}

.review-bars > div {
  display: grid;
  gap: 7px;
}

.review-bars span {
  color: #315046;
  font-size: 13px;
  font-weight: 900;
}

.feedback-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
