.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; }
.brand__mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--brand); color: #fff; font-size: 18px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px;
  color: var(--sub); font-weight: 600; font-size: 14px;
}
.nav-item:hover { background: var(--card-alt); }
.nav-item.is-active { background: var(--brand); color: #fff; }
.nav-item__ico { width: 20px; text-align: center; font-size: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 18px; border: 1px solid transparent;
  border-radius: 12px; font-weight: 700; font-size: 14px;
  transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { filter: brightness(.95); }
.btn--ghost { background: var(--card-alt); border-color: var(--line); color: var(--text); }
.btn--outline { background: transparent; border-color: var(--brand); color: var(--brand-dark); }
.btn--block { width: 100%; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 12px; border-radius: 10px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card-alt); font-size: 17px; line-height: 1;
}
.pill {
  display: inline-flex; align-items: center; min-height: 32px;
  padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--card-alt); border: 1px solid var(--line);
}
.pill--points { background: #e6f8f0; color: var(--brand-dark); border-color: #ccefe2; }
.badge {
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--green-top); color: var(--green-text);
}
.badge--soon { background: var(--orange-top); color: var(--orange-text); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field__label { font-size: 13px; font-weight: 700; color: var(--sub); }
.field__hint { font-size: 12px; color: var(--sub); }
.field input, .field select {
  width: 100%; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 11px;
  background: #fff; font-size: 15px;
}
.field input:focus, .field select:focus { border-color: var(--brand); outline: none; }
.form-error { min-height: 20px; color: var(--danger); font-size: 13px; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 16px;
  background: rgba(6, 20, 18, .5);
}
.modal {
  width: min(520px, 100%); max-height: min(760px, 90dvh); overflow-y: auto;
  padding: 22px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow);
}
.modal__head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal__head h2 { font-size: 20px; }
.modal__head p { color: var(--sub); font-size: 13px; }
.modal__body { display: block; }
.modal__submit { width: 100%; margin-top: 6px; }

#toast-root {
  position: fixed; z-index: 200; left: 50%; top: 18px;
  transform: translateX(-50%); display: grid; gap: 8px;
  width: min(420px, calc(100vw - 24px)); pointer-events: none;
}
.toast {
  padding: 11px 16px; border-radius: 12px; text-align: center;
  background: var(--nav); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow);
}
.toast--success { background: var(--brand-dark); }
.toast--error { background: #b13c3c; }

/* ── 加入牌局：底部半屏数字键盘（房号即凭证） ───────────────────────── */
.join-sheet-overlay {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: flex-end;
  background: rgba(6, 20, 18, .42);
}
.join-sheet {
  width: 100%; max-height: 74dvh; overflow-y: auto;
  padding: 14px 16px 18px; border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #e8fbf4 0%, #f4faf8 22%, #ffffff 100%);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
}
.join-sheet__head { display: flex; align-items: center; justify-content: space-between; }
.join-sheet__head h2 { font-size: 17px; font-weight: 700; color: var(--text); }
.join-sheet__preview {
  min-height: 34px; margin: 10px 0 12px; padding: 8px 12px;
  border-radius: 10px; background: #eaf6f1; color: var(--brand-dark);
  font-size: 13px; line-height: 1.4; text-align: center; outline: none;
}
.join-sheet__preview:focus { box-shadow: 0 0 0 2px var(--brand); }
.join-digits {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
  max-width: 520px; margin: 0 auto;
}
.join-digit {
  display: grid; place-items: center; aspect-ratio: 3 / 4;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font-size: 28px; font-weight: 600; color: var(--text);
}
.join-digit:not(:empty) { border-color: var(--brand); }
.join-sheet__hint { margin: 12px 0 14px; text-align: center; color: var(--sub); font-size: 12px; }
.join-keypad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.join-key {
  min-height: 52px; border: 1px solid #e2e8e6; border-radius: 10px;
  background: #fff; color: var(--text); font-size: 22px; font-weight: 500;
}
.join-key:active { background: #eaf6f1; }

/* ── 创建牌局：整页配置（借鉴分组卡片 + 滑块 + 折叠高级设置） ─────────── */
.create-overlay {
  position: fixed; inset: 0; z-index: 110; overflow-y: auto;
  background: var(--bg);
}
.create-sheet {
  width: min(560px, 100%); min-height: 100%; margin: 0 auto;
  padding: 0 0 92px; display: flex; flex-direction: column; gap: 12px;
  background: var(--bg);
}
.create-sheet__head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: rgba(219, 243, 235, .94);
}
.create-sheet__head h2 { font-size: 17px; font-weight: 700; color: var(--text); }
.create-sheet__back {
  border: 0; background: none; padding: 4px 2px;
  color: var(--text); font-size: 18px; cursor: pointer;
}
.create-native { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.create-status { margin: 2px 0 6px; font-size: 12px; color: var(--sub); }
.create-group {
  margin: 0 12px; padding: 12px 14px;
  border-radius: 14px; background: var(--card); box-shadow: 0 1px 5px rgba(20, 70, 58, .05);
}
.create-group__head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 4px 0 12px; border: 0; background: none;
  color: var(--sub); font-size: 13px; font-weight: 600; text-align: left;
}
.create-badge {
  padding: 3px 9px; border-radius: 999px;
  background: var(--orange-top); color: var(--orange-text); font-size: 11px; font-weight: 700;
}
.create-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.create-row:last-child { border-bottom: 0; }
.create-row__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.create-row__label { font-size: 13px; font-weight: 600; color: var(--text); }
.create-row__value { font-size: 20px; font-weight: 700; color: var(--text); }
.create-row__scale { display: flex; justify-content: space-between; margin-top: 2px; color: var(--sub); font-size: 11px; }
.create-range {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 4px; margin: 12px 0 0; border-radius: 4px;
  background: var(--brand);
}
.create-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); box-shadow: 0 1px 5px rgba(0, 0, 0, .18);
}
.create-range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); box-shadow: 0 1px 5px rgba(0, 0, 0, .18);
}
.create-row--select { display: flex; align-items: center; justify-content: space-between; }
.create-select-wrap { position: relative; display: flex; align-items: center; gap: 6px; }
.create-select-value { font-size: 14px; font-weight: 600; color: var(--text); }
.create-chevron { color: var(--sub); font-size: 15px; }
.create-select-wrap select {
  position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px);
  opacity: 0; cursor: pointer;
}
.create-row--switch { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; }
.create-soon {
  padding: 2px 8px; border-radius: 999px;
  background: var(--card-alt); color: var(--sub); font-size: 11px;
}
.create-group--advanced { padding-bottom: 4px; }
.create-group__toggle { cursor: pointer; }
.create-group--advanced.is-collapsed .create-advanced { display: none; }
.create-advanced .create-row:last-child { border-bottom: 0; }
.create-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--line);
  background: var(--card);
}
.create-foot__note { color: var(--sub); font-size: 12px; }
.create-foot__spacer { flex: 1; }
.create-foot__submit {
  min-width: 112px; padding: 11px 18px; border: 0; border-radius: 11px;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}
.create-foot__submit:disabled { background: var(--line); color: var(--sub); cursor: default; }
