/* 友君游戏厅 · Apple 设计语言（对齐工作台 apple-ui-system：扁平、留白、系统蓝、发丝线） */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: #f7f7f9;
  color: #1d1d1f;
  min-height: 100vh;
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: #007aff; text-decoration: none; }
svg { display: block; }

button {
  font-family: inherit;
  border: none;
  background: none;
  border-radius: 12px;
  cursor: pointer;
  color: #1d1d1f;
  transition: opacity .12s ease, transform .12s ease, background-color .15s ease;
  touch-action: manipulation;
}
button:active { opacity: .55; transform: scale(.98); }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 2px;
  border-radius: 10px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .3px;
  border-radius: 14px;
}
.btn-primary { background: #007aff; color: #fff; }
.btn-primary:active { background: #006ee6; opacity: 1; }
.btn-tinted { background: rgba(0, 122, 255, .1); color: #007aff; }
.btn-ghost { background: #fff; color: #007aff; }
.btn:disabled { opacity: .35; cursor: default; transform: none; }

.wrap { max-width: 480px; margin: 0 auto; padding: 14px 16px calc(30px + env(safe-area-inset-bottom)); }

.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.title-hero { text-align: center; padding: 26px 0 18px; }
.title-hero .logo { display: flex; justify-content: center; color: #1d1d1f; margin-bottom: 10px; }
.title-hero h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1d1d1f;
}
.title-hero p { color: #6e6e73; font-size: 14px; margin-top: 6px; letter-spacing: .5px; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: #6e6e73; margin-bottom: 7px; padding-left: 2px; font-weight: 500; }
.field input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(60, 60, 67, .14);
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 17px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.field input:focus { border-color: #007aff; background: #fff; }

.muted { color: #6e6e73; font-size: 13px; line-height: 1.55; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 15%;
  transform: translateX(-50%);
  background: rgba(29, 29, 31, .92);
  color: #fff;
  padding: 11px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  max-width: 80vw;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
#toast.show { opacity: 1; }

.game-card {
  display: block;
  background: #fff;
  border-radius: 16px;
  padding: 15px 16px;
  margin-bottom: 14px;
  color: #1d1d1f;
}
.game-card:active { background: #f5f5f7; }
.game-card .row { display: flex; align-items: center; gap: 14px; }
.game-card .icon {
  width: 52px; height: 52px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #007aff;
  background: rgba(0, 122, 255, .1);
  border-radius: 13px;
}
.game-card .chev { margin-left: auto; color: rgba(60, 60, 67, .3); flex: none; }
.game-card h2 { font-size: 17px; margin-bottom: 3px; font-weight: 600; color: #1d1d1f; }
.game-card p { font-size: 13px; color: #6e6e73; }
.game-card .badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #007aff;
  background: rgba(0, 122, 255, .1);
  border-radius: 6px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: 2px;
}

.game-card .share-mini {
  width: 34px; height: 34px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #007aff;
  background: rgba(0, 122, 255, .1);
  border-radius: 10px;
  margin-left: 10px;
}
.game-card .row { position: relative; }
.game-card h2 { padding-right: 4px; }

.cats {
  display: flex;
  gap: 2px;
  border-radius: 10px;
  background: rgba(120, 120, 128, .14);
  padding: 2px;
  margin-bottom: 14px;
}
.cats button {
  flex: 1;
  min-height: 34px;
  background: transparent;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
}
.cats button.on {
  background: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.cats button:active { opacity: .8; transform: none; }

table.rank { width: 100%; border-collapse: collapse; font-size: 15px; }
table.rank th, table.rank td { padding: 12px 6px; text-align: center; border-bottom: 1px solid rgba(60, 60, 67, .1); }
table.rank tr:last-child td { border-bottom: none; }
table.rank th { color: #6e6e73; font-weight: 500; font-size: 13px; }
table.rank td.name { text-align: left; font-weight: 500; font-variant-numeric: tabular-nums; }
table.rank td { font-variant-numeric: tabular-nums; }
table.rank tr:first-child td { color: #c93400; font-weight: 700; }
table.rank tr.me td { color: #007aff; font-weight: 600; }
.empty-tip { text-align: center; color: #8e8e93; padding: 28px 0; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
