:root {
  color-scheme: dark;
  --bg: #06100d;
  --panel: #0f211b;
  --line: rgba(150, 224, 201, 0.13);
  --text: #effbf7;
  --muted: #829d94;
  --muted-2: #597168;
  --mint: #63f2c1;
  --gold: #f7c96b;
  --blue: #77b9ff;
  --red: #ff7d8b;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 80% 0, rgba(44, 173, 133, 0.17), transparent 34%),
    var(--bg);
  background-size: 34px 34px, 34px 34px, auto, auto;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button {
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

svg {
  fill: currentColor;
}

.mobile-ambient {
  position: fixed;
  z-index: -1;
  width: 280px;
  height: 280px;
  top: -140px;
  right: -120px;
  border-radius: 50%;
  background: rgba(68, 224, 175, 0.16);
  filter: blur(80px);
}

.mobile-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: calc(66px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 16, 13, 0.85);
  backdrop-filter: blur(18px);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(99, 242, 193, 0.25);
  border-radius: 11px 11px 11px 3px;
  color: var(--mint);
  background: rgba(99, 242, 193, 0.08);
  font-family: "STSong", "Songti SC", serif;
  font-size: 17px;
}

.mobile-brand strong,
.mobile-brand small {
  display: block;
}

.mobile-brand strong {
  font-size: 14px;
}

.mobile-brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.sync-state {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 9px;
}

.sync-state i,
.auto-chip i,
.live-dot i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 9px rgba(99, 242, 193, 0.8);
}

.sync-state.offline {
  color: #ffabb3;
  border-color: rgba(255, 125, 139, 0.22);
}

.sync-state.offline i {
  background: var(--red);
  box-shadow: 0 0 9px rgba(255, 125, 139, 0.7);
}

main {
  padding: 14px 13px calc(88px + env(safe-area-inset-bottom));
}

.campaign-switch {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 0 12px;
  scrollbar-width: none;
}

.campaign-switch::-webkit-scrollbar {
  display: none;
}

.campaign-switch button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
}

.campaign-switch button.active {
  color: #071d16;
  border-color: transparent;
  background: var(--mint);
  font-weight: 700;
}

.mobile-total {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 19px 19px 17px;
  border: 1px solid rgba(99, 242, 193, 0.2);
  border-radius: 23px;
  background:
    linear-gradient(145deg, rgba(99, 242, 193, 0.14), transparent 45%),
    linear-gradient(180deg, #102920, #0b1a16);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.total-glow {
  position: absolute;
  width: 210px;
  height: 210px;
  top: -105px;
  right: -80px;
  border-radius: 50%;
  background: rgba(99, 242, 193, 0.17);
  filter: blur(28px);
}

.total-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #b3cac3;
  font-size: 9px;
}

.auto-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid rgba(99, 242, 193, 0.17);
  border-radius: 99px;
  color: var(--mint);
  background: rgba(99, 242, 193, 0.06);
  font-size: 7px;
}

.mobile-total h1 {
  position: relative;
  z-index: 1;
  margin: 8px 0 23px;
  color: #d9ebe5;
  font-family: "STSong", "Songti SC", serif;
  font-size: 17px;
  font-weight: 600;
}

.total-label {
  position: relative;
  z-index: 1;
  color: #91aaa2;
  font-size: 10px;
}

.mobile-total-value {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 4px;
}

.mobile-total-value strong {
  font-family: "Bahnschrift", "DIN Alternate", sans-serif;
  font-size: clamp(44px, 13vw, 58px);
  font-weight: 300;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.mobile-total-value span {
  color: var(--mint);
  font-size: 11px;
}

.total-caption {
  position: relative;
  z-index: 1;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.total-bottom {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
}

.total-bottom > div {
  padding: 10px 8px;
  background: rgba(9, 27, 21, 0.83);
}

.total-bottom span,
.total-bottom strong {
  display: block;
}

.total-bottom span {
  color: var(--muted-2);
  font-size: 7px;
}

.total-bottom strong {
  margin-top: 3px;
  font-family: "Bahnschrift", sans-serif;
  font-size: 15px;
  font-weight: 400;
}

.coverage-line {
  position: relative;
  z-index: 2;
  height: 2px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

.coverage-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
  transition: width 400ms ease;
}

.mobile-total > svg {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 74px;
  color: var(--mint);
  opacity: 0.14;
}

.mobile-total > svg path {
  fill: rgba(99, 242, 193, 0.13);
  stroke: currentColor;
  stroke-width: 1;
}

.quick-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.quick-status div {
  min-width: 0;
  padding: 12px 13px;
  background: rgba(13, 31, 25, 0.88);
}

.quick-status span,
.quick-status strong {
  display: block;
}

.quick-status span {
  color: var(--muted-2);
  font-size: 7px;
}

.quick-status strong {
  overflow: hidden;
  margin-top: 3px;
  color: #c9dcd6;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-guide {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(99, 242, 193, 0.035), transparent 45%),
    rgba(13, 30, 25, 0.9);
}

.data-guide summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}

.data-guide summary::-webkit-details-marker {
  display: none;
}

.data-guide summary strong,
.data-guide summary span {
  display: block;
}

.data-guide summary strong {
  font-size: 11px;
}

.data-guide summary span {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7px;
}

.data-guide summary > b {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 1px solid rgba(99, 242, 193, 0.16);
  border-radius: 99px;
  color: var(--mint);
  background: rgba(99, 242, 193, 0.05);
  font-size: 7px;
  font-weight: 500;
}

.guide-list {
  padding: 0 14px 10px;
  border-top: 1px solid var(--line);
}

.guide-row {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(150, 224, 201, 0.07);
}

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

.guide-row > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: var(--mint);
  background: rgba(99, 242, 193, 0.07);
  font-family: "Cascadia Code", monospace;
  font-size: 7px;
}

.guide-row strong {
  display: block;
  color: #d5e6e0;
  font-size: 9px;
}

.guide-row p {
  margin: 3px 0 0;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.7;
}

.mobile-section {
  margin-top: 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.02), transparent 40%),
    rgba(13, 30, 25, 0.9);
}

.mobile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
}

.mobile-section-head h2 {
  margin: 0;
  font-size: 13px;
}

.mobile-section-head p {
  margin: 3px 0 0;
  color: var(--muted-2);
  font-size: 8px;
}

.mobile-section-head > span {
  color: var(--muted-2);
  font-size: 8px;
}

.live-dot {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--red) !important;
  font-size: 7px !important;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.live-dot i {
  width: 5px;
  height: 5px;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  animation: pulse 1.5s infinite;
}

.mobile-ranking,
.mobile-feed,
.mobile-hall-list {
  padding: 0 14px 11px;
}

.mobile-search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  margin: 0 14px 10px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
}

.mobile-search-box span {
  margin: 0;
  color: var(--muted-2);
  font-size: 15px;
}

.mobile-search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 10px;
}

.mobile-hall-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.mobile-hall-card {
  position: relative;
  overflow: hidden;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(99, 242, 193, 0.05), transparent 55%),
    rgba(0, 0, 0, 0.08);
  color: inherit;
  text-align: left;
}

.mobile-hall-card:first-child {
  grid-column: span 2;
  border-color: rgba(247, 201, 107, 0.24);
  background:
    linear-gradient(135deg, rgba(247, 201, 107, 0.12), transparent 65%),
    rgba(0, 0, 0, 0.08);
}

.mobile-hall-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mobile-hall-rank {
  color: var(--muted-2);
  font-family: "Cascadia Code", monospace;
  font-size: 8px;
}

.mobile-hall-card:first-child .mobile-hall-rank {
  color: var(--gold);
}

.mobile-hall-name {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  color: #d8e9e3;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-hall-score {
  display: block;
  margin-top: 4px;
  font-family: "Bahnschrift", sans-serif;
  font-size: 16px;
  font-weight: 400;
}

.mobile-hall-score small {
  margin-left: 3px;
  color: var(--muted-2);
  font-family: inherit;
  font-size: 7px;
}

.hall-detail {
  margin: 2px 14px 12px;
  overflow: hidden;
  border: 1px solid rgba(99, 242, 193, 0.16);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.12);
}

.hall-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.hall-detail-head strong {
  font-size: 10px;
}

.hall-detail-head span {
  color: var(--muted-2);
  font-size: 8px;
}

.hall-member-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-bottom: 1px solid rgba(150, 224, 201, 0.07);
}

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

.hall-member-rank {
  color: var(--muted-2);
  font-family: "Cascadia Code", monospace;
  font-size: 8px;
  text-align: center;
}

.hall-member-name {
  overflow: hidden;
  color: #d7e7e2;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hall-member-name small {
  margin-left: 4px;
  color: var(--muted-2);
  font-size: 7px;
}

.hall-member-value {
  color: var(--gold);
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
}

.mobile-rank-row {
  position: relative;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 2px;
  border: 0;
  border-top: 1px solid rgba(150, 224, 201, 0.08);
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.mobile-rank-row::after {
  content: "›";
  position: absolute;
  right: -1px;
  color: var(--muted-2);
  font-size: 15px;
}

.mobile-rank-number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-family: "Cascadia Code", monospace;
  font-size: 8px;
}

.mobile-rank-number.top-1 {
  color: #251a07;
  background: linear-gradient(135deg, #ffe49c, #e5ac38);
}

.mobile-rank-number.top-2 {
  color: #162128;
  background: linear-gradient(135deg, #eef6f8, #9fb4be);
}

.mobile-rank-number.top-3 {
  color: #2b190e;
  background: linear-gradient(135deg, #e6ab7c, #b66a38);
}

.mobile-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.mobile-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(99, 242, 193, 0.14);
  border-radius: 10px;
  color: var(--mint);
  background: rgba(99, 242, 193, 0.05);
  font-family: "STSong", serif;
  font-size: 12px;
}

.mobile-person strong,
.mobile-person small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-person strong {
  font-size: 11px;
}

.mobile-person small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7px;
}

.mobile-rank-value {
  padding-right: 15px;
  text-align: right;
}

.mobile-rank-value strong,
.mobile-rank-value small {
  display: block;
}

.mobile-rank-value strong {
  font-family: "Bahnschrift", sans-serif;
  font-size: 13px;
  font-weight: 500;
}

.mobile-rank-value small {
  margin-top: 2px;
  color: var(--mint);
  font-size: 7px;
}

.mobile-event {
  position: relative;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 11px 2px;
  border-top: 1px solid rgba(150, 224, 201, 0.08);
}

.mobile-event.new {
  animation: event-in 450ms ease both;
}

.mobile-gift-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--gold);
  background: rgba(247, 201, 107, 0.08);
}

.mobile-gift-icon svg {
  width: 14px;
}

.mobile-event-copy {
  min-width: 0;
}

.mobile-event-copy strong,
.mobile-event-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-event-copy strong {
  color: #d7e7e2;
  font-size: 10px;
  font-weight: 600;
}

.mobile-event-copy span {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 7px;
}

.mobile-event-score {
  text-align: right;
}

.mobile-event-score strong,
.mobile-event-score span {
  display: block;
}

.mobile-event-score strong {
  color: var(--gold);
  font-size: 10px;
}

.mobile-event-score span {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 7px;
}

.mobile-empty {
  padding: 38px 14px;
  color: var(--muted-2);
  font-size: 9px;
  text-align: center;
}

.rules-section {
  overflow: hidden;
}

.rule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 12px;
}

.rule-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.08);
}

.rule-card.emphasized {
  grid-column: span 2;
  border-color: rgba(99, 242, 193, 0.2);
  background:
    linear-gradient(135deg, rgba(99, 242, 193, 0.09), transparent 70%),
    rgba(0, 0, 0, 0.08);
}

.rule-card > span,
.rule-card > strong {
  display: block;
}

.rule-card > span {
  color: var(--mint);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.rule-card > strong {
  margin-top: 5px;
  color: #dbeae5;
  font-size: 10px;
  line-height: 1.55;
}

.rule-card p {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.65;
}

.calculator-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 14px 12px;
  padding: 13px;
  border: 1px solid rgba(247, 201, 107, 0.18);
  border-radius: 13px;
  background: rgba(247, 201, 107, 0.035);
}

.calculator-head {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calculator-head strong,
.calculator-head span {
  display: block;
}

.calculator-head strong {
  font-size: 10px;
}

.calculator-head div > span {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7px;
}

.calculator-card label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 7px;
}

.calculator-card input {
  width: 100%;
  height: 35px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--text);
  background: rgba(0, 0, 0, 0.12);
  font: inherit;
  font-size: 10px;
}

.percent-input {
  position: relative;
}

.percent-input input {
  padding-right: 24px;
}

.percent-input b {
  position: absolute;
  top: 9px;
  right: 9px;
  color: var(--muted-2);
  font-size: 9px;
}

.calculator-result {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border-radius: 9px;
  background: var(--line);
}

.calculator-result div {
  padding: 9px;
  background: #0d201a;
}

.calculator-result span,
.calculator-result strong {
  display: block;
}

.calculator-result span {
  color: var(--muted-2);
  font-size: 7px;
}

.calculator-result strong {
  margin-top: 3px;
  color: var(--gold);
  font-family: "Bahnschrift", sans-serif;
  font-size: 16px;
  font-weight: 400;
}

.rule-note {
  margin: 0 14px 14px;
  padding: 10px 11px;
  border-left: 2px solid var(--gold);
  border-radius: 0 8px 8px 0;
  color: var(--muted-2);
  background: rgba(247, 201, 107, 0.035);
  font-size: 8px;
  line-height: 1.7;
}

.rule-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 7px;
}

.rule-links a {
  color: var(--mint);
  font-size: 8px;
  text-decoration: none;
}

.mobile-footer {
  padding: 27px 0 10px;
  color: var(--muted-2);
  text-align: center;
}

.mobile-footer strong,
.mobile-footer span {
  display: block;
}

.mobile-footer strong {
  color: #6e8980;
  font-family: "STSong", serif;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.mobile-footer span {
  margin-top: 4px;
  font-size: 7px;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(9, 25, 20, 0.91);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(20px);
}

.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  height: 47px;
  border: 0;
  border-radius: 12px;
  color: var(--muted-2);
  background: transparent;
  font-size: 7px;
}

.bottom-nav button svg {
  width: 18px;
  height: 18px;
}

.bottom-nav button.active {
  color: var(--mint);
  background: rgba(99, 242, 193, 0.07);
}

.sheet {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
}

.sheet.open {
  display: block;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 7, 5, 0.72);
  backdrop-filter: blur(6px);
}

.sheet-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 92vh;
  overflow-y: auto;
  padding: 11px 17px calc(25px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(circle at 10% 0, rgba(99, 242, 193, 0.08), transparent 30%),
    #0b1916;
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.42);
  animation: sheet-in 220ms ease both;
}

.sheet-handle {
  width: 35px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: 99px;
  background: #3a5149;
}

.sheet-close {
  position: absolute;
  top: 17px;
  right: 16px;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 19px;
}

.sheet-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 45px;
}

.sheet-avatar {
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  border: 1px solid rgba(99, 242, 193, 0.2);
  border-radius: 15px 15px 15px 5px;
  color: var(--mint);
  background: rgba(99, 242, 193, 0.07);
  font-family: "STSong", serif;
  font-size: 22px;
}

.sheet-person small {
  color: var(--mint);
  font-size: 8px;
}

.sheet-person h2 {
  margin: 2px 0 0;
  font-family: "STSong", serif;
  font-size: 22px;
}

.sheet-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 11px;
  background: var(--line);
}

.sheet-metrics div {
  padding: 10px;
  background: #0f221c;
}

.sheet-metrics span,
.sheet-metrics strong {
  display: block;
}

.sheet-metrics span {
  color: var(--muted-2);
  font-size: 7px;
}

.sheet-metrics strong {
  margin-top: 4px;
  font-family: "Bahnschrift", sans-serif;
  font-size: 16px;
  font-weight: 400;
}

.sheet-note {
  margin-top: 9px;
  padding: 8px 10px;
  border-left: 2px solid var(--gold);
  border-radius: 0 7px 7px 0;
  color: var(--muted-2);
  background: rgba(247, 201, 107, 0.035);
  font-size: 7px;
  line-height: 1.65;
}

.sheet-tabs {
  display: flex;
  gap: 6px;
  margin-top: 15px;
}

.sheet-tabs button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  font-size: 8px;
}

.sheet-tabs button.active {
  color: var(--mint);
  border-color: rgba(99, 242, 193, 0.17);
  background: rgba(99, 242, 193, 0.06);
}

.sheet-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 9px 0;
}

.sheet-search input {
  flex: 1;
  min-width: 0;
  height: 35px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  color: var(--text);
  background: rgba(0, 0, 0, 0.12);
  font: inherit;
  font-size: 9px;
}

.sheet-search span {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 7px;
  white-space: nowrap;
}

.sheet-body {
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.sheet-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px 11px;
  border-bottom: 1px solid rgba(150, 224, 201, 0.07);
}

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

.sheet-row-index {
  color: var(--muted-2);
  font-size: 8px;
  text-align: center;
}

.sheet-row-main {
  min-width: 0;
}

.sheet-row-main strong,
.sheet-row-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-row-main strong {
  font-size: 9px;
}

.sheet-row-main span {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7px;
}

.sheet-row-value {
  color: var(--gold);
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  text-align: right;
}

.offline-banner {
  position: fixed;
  z-index: 50;
  top: calc(70px + env(safe-area-inset-top));
  right: 16px;
  left: 16px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 125, 139, 0.24);
  border-radius: 9px;
  color: #ffd2d6;
  background: rgba(64, 24, 29, 0.95);
  font-size: 9px;
  text-align: center;
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.offline-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.mobile-toast {
  position: fixed;
  z-index: 150;
  right: 18px;
  bottom: calc(82px + env(safe-area-inset-bottom));
  left: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #d5e8e2;
  background: rgba(14, 34, 28, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  font-size: 9px;
  text-align: center;
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.mobile-toast.show {
  transform: translateY(0);
  opacity: 1;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes event-in {
  from { opacity: 0; transform: translateY(-5px); background: rgba(99, 242, 193, 0.08); }
  to { opacity: 1; transform: translateY(0); background: transparent; }
}

@keyframes sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (min-width: 600px) {
  body {
    max-width: 560px;
    margin: 0 auto;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .bottom-nav {
    right: calc(50% - 268px);
    left: calc(50% - 268px);
  }
}
