/* ==========================================================================================
   screens/matchmaking.css — 匹配页面（public/js/ui/matchmaking.js，2026-10-17 服主定制）

   页面骨架直接复用统计页/排行榜那套（.st / .st__bg / .st-top / .st-note / .st-body，见 stats.css），
   这里只补匹配页自己的东西：
     · 两列布局（我的盟约标签 + 等候中的玩家 / 等候中的房间）
     · 盟约标签 chip（.mm-tag）与选择器（.mm-opt）—— 房间里/座位上/玩家行上共用同一套 chip
     · 等候中的玩家一行（.mm-player）
   尺寸沿用项目的设计 px ÷ 100（theme.css 的根字号缩放）；手机上必须可读的文字用 max(.xxrem, Npx)。
   ========================================================================================== */

.mm { z-index: 55; } /* 和其它整页 overlay 一样：高于屏幕(1)与对局横幅(40)，低于连接横幅(75)/弹窗(80) */

.mm-top__title {
  font-family: var(--font-display);
  font-size: max(.3rem, 17px);
  font-weight: 900;
  letter-spacing: .06em;
  color: var(--text-hi);
  margin: 0;
}
.mm-note { position: relative; }
.mm-note__off { margin-left: .1rem; color: var(--amber); }

/* ---- body: 两列 -------------------------------------------------------------------------------------- */
.mm-body {
  position: relative;
  display: grid;
  /* 2026-10-20 宽屏铺满：原来受 stats.css 的 .st-body > * 限制（max-width 12.4rem 居中），
     两栏各被压到 760px，宽屏时中间一条、两侧全空。这里放开并重新分配比例。 */
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  align-content: start;
  align-items: start;
  gap: .18rem .32rem;
  padding: .18rem .44rem .34rem;
  overflow-y: auto;
}
.mm-body > * { max-width: none; margin-left: 0; margin-right: 0; }
.mm-col--mine { position: sticky; top: 0; align-self: start; }
.mm-col { display: flex; flex-direction: column; gap: .16rem; min-width: 0; }
@media (max-width: 900px) {
  .mm-body { grid-template-columns: minmax(0, 1fr); padding: .14rem .2rem .3rem; }
}

/* ---- 区块（等候中的玩家 / 房间） ---------------------------------------------------------------------- */
.mm-section {
  display: flex;
  flex-direction: column;
  gap: .08rem;
  min-width: 0;
  padding: .14rem .16rem;
  border: 1px solid var(--line-2);
  background: linear-gradient(100deg, rgba(13, 44, 36, .5), rgba(10, 14, 12, .78));
}
.mm-section__head { display: flex; align-items: center; gap: .08rem; min-width: 0; }
.mm-section__head .icon { flex: none; width: max(.19rem, 13px); height: max(.19rem, 13px); color: var(--mint-400); }
.mm-section__head strong { font-size: max(.22rem, 14px); color: var(--text-hi); white-space: nowrap; }
.mm-section__count { margin-left: auto; color: var(--text-lo); font-size: max(.14rem, 10px); white-space: nowrap; }
.mm-empty {
  display: grid; place-items: center;
  min-height: 1.1rem; padding: .12rem;
  color: var(--text-lo); font-size: max(.16rem, 11px); text-align: center; line-height: 1.6;
}
.mm-empty.is-error { color: var(--amber); }

/* ---- 等候中的玩家 ------------------------------------------------------------------------------------ */
.mm-players { display: flex; flex-direction: column; gap: .05rem; max-height: 4.6rem; overflow-y: auto; padding-right: .03rem; }
.mm-player {
  display: flex; align-items: center; gap: .1rem;
  min-height: .5rem; padding: .06rem .08rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
}
.mm-player.is-me { border-color: var(--mint-800); background: var(--mint-a10); }
.mm-player.has-tags { border-left: 2px solid var(--mint-600); }
.mm-player__who { display: flex; flex: none; align-items: center; gap: .07rem; min-width: 0; }
.mm-player__name { display: flex; align-items: center; gap: .05rem; color: var(--text-hi); font-size: max(.19rem, 12px); white-space: nowrap; }
.mm-player__you { padding: 0 .05rem; border: 1px solid var(--mint-700); color: var(--mint-400); font-size: max(.12rem, 9px); }
.mm-player__none { flex: 1 1 auto; min-width: 0; color: var(--text-dim); font-size: max(.14rem, 10px); }
.mm-player__tags { flex: 1 1 auto; min-width: 0; }
.mm-player__actions { flex: none; margin-left: auto; }
.mm-player__actions .btn { height: .34rem; padding: 0 .1rem; white-space: nowrap; }

/* ---- 盟约标签 chip（玩家行 / 房间行 / 座位共用） -------------------------------------------------------- */
.mm-tags { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .05rem; min-width: 0; }
.mm-tag {
  display: inline-flex; align-items: center; gap: .045rem;
  max-width: 100%; padding: .02rem .07rem .02rem .05rem;
  border: 1px solid var(--mint-800);
  background: var(--mint-a10);
  color: var(--mint-400);
  font-size: max(.14rem, 10px); white-space: nowrap;
}
.mm-tag__glyph { flex: none; width: max(.15rem, 10px) !important; height: max(.15rem, 10px) !important; }
.mm-tag__name { overflow: hidden; text-overflow: ellipsis; }
.mm-tags--xs .mm-tag { padding: .01rem .05rem; font-size: max(.12rem, 9px); }
.mm-tags--xs .mm-tag__glyph { width: max(.13rem, 9px) !important; height: max(.13rem, 9px) !important; }
/* 房间行里的 chip 跟在状态文字后面，不要撑破那一行的省略号行为 */
.lobby-directory__room-meta .mm-tags { flex: 0 1 auto; overflow: hidden; }

/* ---- 我的盟约标签：选择器 ---------------------------------------------------------------------------- */
.mm-picker {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .14rem .16rem .12rem;
  border: 1px solid var(--mint-800);
  background: linear-gradient(100deg, rgba(13, 44, 36, .68), rgba(10, 14, 12, .8));
  box-shadow: inset 0 0 .55rem rgba(23, 249, 183, .03);
}
.mm-picker__head { display: flex; align-items: center; gap: .08rem; min-width: 0; }
.mm-picker__title { font-size: max(.22rem, 14px); color: var(--text-hi); white-space: nowrap; }
.mm-picker__count { margin-left: auto; color: var(--mint-400); font-size: max(.17rem, 11px); font-weight: 800; }
.mm-picker__head .btn { flex: none; height: .34rem; padding: 0 .1rem; font-size: max(.14rem, 10px); }
.mm-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(1.15rem, 96px), 1fr));
  gap: .06rem;
  max-height: 3.4rem;
  overflow-y: auto;
  padding-right: .03rem;
}
.mm-opt {
  position: relative;
  display: flex; align-items: center; gap: .06rem;
  min-width: 0; height: .44rem; padding: 0 .08rem;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .03);
  color: var(--text-lo);
  font: inherit; font-size: max(.17rem, 11px);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.mm-opt:hover:not(:disabled) { border-color: var(--mint-600); color: var(--text-hi); }
.mm-opt:disabled { opacity: .42; cursor: default; }
.mm-opt.is-on { border-color: var(--mint-500); background: var(--mint-a20); color: var(--mint-400); font-weight: 700; }
.mm-opt__glyph { flex: none; width: max(.19rem, 13px) !important; height: max(.19rem, 13px) !important; }
.mm-opt__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-opt__check { flex: none; width: max(.16rem, 11px); height: max(.16rem, 11px); margin-left: auto; color: var(--mint-400); }
.mm-picker__waiting { display: grid; place-items: center; min-height: .9rem; }
.mm-picker__hint { margin: 0; color: var(--text-lo); font-size: max(.14rem, 10px); line-height: 1.6; }

/* ---- 房间区（复用大厅目录的房间行） -------------------------------------------------------------------- */
.mm-rooms { max-height: 4.9rem; }
.mm-pager { margin-top: .06rem; }

/* 等待室座位卡上的盟约标签（screens/room.js 的 SeatCard 复用同一套 chip，样式放这里，
   room.css 一行都不用动）*/
.seat__tags { margin-top: .03rem; justify-content: center; }
.seat__tags .mm-tag { max-width: 100%; }

/* 入口按钮上的小角标（联机大厅区块里的「匹配页面」） */
.mm-entry { position: relative; }
.mm-entry__badge {
  margin-left: .05rem; padding: 0 .04rem;
  min-width: max(.18rem, 12px);
  border-radius: .1rem;
  background: var(--mint-a20); color: var(--mint-400);
  font-size: max(.13rem, 9px); font-weight: 800;
}
