/* ================= 联机：大厅、等待房、断线条 =================
   和主画面同一张背景，中间一块米色纸面板；深红标题、宋体，与开局页一致。手机横屏（矮视口）面板可滚动。 */
.online-view { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px;
  background: #2A1A0E url(../assets/menu/menu-bg.webp?v=1a934bea54) center bottom / cover no-repeat; overflow: auto; }
.online-view[hidden] { display: none; }
.ol-panel { width: min(860px, 100%); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box;
  padding: 20px 26px 18px; border-radius: 14px; color: #3A2412;
  background: linear-gradient(#FBF3E1, #F3E4C4); border: 2px solid #B8925A;
  box-shadow: 0 0 0 5px rgba(251,243,225,.55), 0 18px 40px rgba(30,12,0,.55);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif; }
.ol-room { width: min(560px, 100%); }
html[data-lang="en"] .ol-room { width: min(660px, 100%); }
.ol-seat b { white-space: nowrap; }
.ol-seat em { min-width: 0; }
.ol-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #D7BD8C; padding-bottom: 8px; margin-bottom: 12px; }
.ol-head h2 { margin: 0; font-size: 26px; color: #8E1B16; letter-spacing: .08em; }
.ol-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .18em; background: #fff8e8; border: 1px solid #C9A86A; border-radius: 8px; padding: 0 8px; }
.ol-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ol-box { background: rgba(255,250,238,.75); border: 1px solid #DCC59A; border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; align-content: start; }
.ol-box h3, .ol-sub { margin: 0; font-size: 18px; color: #6B2410; }
.ol-sub { margin-top: 4px; }
.ol-field { display: grid; gap: 4px; font-size: 15px; }
.ol-field input { font: inherit; font-size: 17px; padding: 7px 10px; border: 1px solid #B8925A; border-radius: 8px; background: #FFFDF6; color: #2A1A0E; min-height: 40px; box-sizing: border-box; }
#ol-code { text-transform: uppercase; letter-spacing: .2em; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.ol-panel > .ol-field { max-width: 280px; margin-bottom: 12px; }
.ol-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 15px; }
.ol-row > span { min-width: 4.5em; color: #6B4A2A; }
.ol-row label, .ol-check { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; min-height: 32px; }
.ol-check { font-size: 15px; }
.ol-btn { font: inherit; font-size: 16px; min-height: 40px; padding: 6px 18px; border-radius: 10px; cursor: pointer;
  border: 1px solid #B8925A; background: #FFF8E6; color: #5A2A10; }
.ol-btn:hover { background: #FFEFC8; }
.ol-btn.primary { background: linear-gradient(#C8402E, #9E2A1C); border-color: #7A1E12; color: #FFF5DD; font-weight: 600; box-shadow: 0 2px 0 #6A160C; }
.ol-btn.primary:hover { background: linear-gradient(#D24A36, #A93222); }
.ol-btn:disabled { opacity: .5; cursor: not-allowed; }
.ol-btn:focus-visible, .ol-link:focus-visible, .ol-field input:focus-visible { outline: 3px solid #E0B04A; outline-offset: 2px; }
.ol-link { font: inherit; font-size: 15px; background: none; border: 0; color: #8E1B16; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 40px; padding: 0 6px; }
.ol-note { margin: 0; font-size: 14px; color: #6B4A2A; }
.ol-err { margin: 10px 0 0; min-height: 1.2em; color: #A3200F; font-size: 15px; }
.ol-err:empty { margin: 0; }
.ol-rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.ol-rooms li { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 6px 8px; border-radius: 8px; background: #FFFDF6; border: 1px solid #E5D3AE; }
.ol-rooms .ol-host { font-weight: 600; }
.ol-rooms .ol-meta { grid-row: 2; font-size: 13px; color: #6B4A2A; }
.ol-rooms .ol-btn { grid-row: 1 / span 2; grid-column: 2; min-height: 36px; padding: 4px 14px; }
.ol-rooms .ol-empty { display: block; font-size: 14px; color: #6B4A2A; background: none; border-style: dashed; }
.ol-invite { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 14px; color: #3E7A4A; }
.ol-seats { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.ol-seat { display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: #FFFDF6; border: 1px solid #E0CBA0; font-size: 17px; min-height: 44px; box-sizing: border-box; }
.ol-seat em { font-style: normal; font-size: 14px; color: #6B4A2A; }
.ol-no { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: #E9D7B1; color: #5A3A1A; }
.ol-kind { font-size: 13px; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.ol-seat.human .ol-kind { color: #8E1B16; }
.ol-seat.cpu { background: #F1F4F7; border-color: #B9C4CF; }
.ol-seat.cpu .ol-kind { color: #3C5A78; }
.ol-seat.empty .ol-kind { color: #8A6A4A; border-style: dashed; }
.ol-btn.small { min-height: 36px; padding: 4px 12px; font-size: 14px; }
.ol-seat.ready { border-color: #6FA57D; background: #F3FAF0; }
.ol-seat.empty b { font-weight: 400; }
.ol-seat.me b::after { content: attr(data-you); font-weight: 400; font-size: 14px; color: #6B4A2A; }
.ol-seat.empty { border-style: dashed; color: #8A6A4A; }
.ol-actions { display: flex; gap: 10px; }
.ol-why { margin-top: 8px; }

/* 断线 / 暂停提示条：盖在牌桌顶部中间 */
.online-bar { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 24px);
  padding: 8px 18px; border-radius: 999px; background: rgba(42,26,14,.92); color: #FFF2D0; font-size: 15px; box-shadow: 0 6px 18px rgba(0,0,0,.35);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif; text-align: center; }
.online-bar[hidden] { display: none; }

@media (max-height: 520px) {
  .online-view { padding: 6px; }
  .ol-panel { padding: 10px 14px; max-height: calc(100dvh - 12px); }
  .ol-head { margin-bottom: 6px; padding-bottom: 4px; }
  .ol-head h2 { font-size: 20px; }
  .ol-panel > .ol-field { margin-bottom: 6px; }
  .ol-box { padding: 8px 10px; gap: 6px; }
  .ol-rooms { max-height: 120px; }
  .ol-seat { padding: 6px 10px; font-size: 15px; }
}
@media (max-width: 640px) { .ol-cols { grid-template-columns: 1fr; } }

/* ===== 触屏：可点区域 ≥ 44px ===== */
@media (pointer: coarse) {
  .ol-btn, .ol-link, .ol-btn.small { min-height: 44px; }
  .ol-field input { min-height: 44px; }
  .ol-row label, .ol-check { min-height: 44px; }
  .ol-rooms .ol-btn { min-height: 44px; }
  .online-view { padding: max(6px, var(--sai-t, 0px)) max(8px, var(--sai-r, 0px)) max(6px, var(--sai-b, 0px)) max(8px, var(--sai-l, 0px)); }
}
@media (pointer: coarse) { .ol-link { min-width: 44px; } }
@media (pointer: coarse) { .ol-row label { min-width: 44px; } }
/* 短横屏（手机）：等待房一屏放下「开始」，按钮贴面板底部常驻 */
@media (max-height: 520px) {
  .ol-room .ol-head h2 { font-size: 18px; }
  .ol-room > .ol-note:first-of-type { font-size: 12px; }
  .ol-invite { margin: 4px 0; }
  .ol-seats { gap: 4px; margin-bottom: 6px; }
  .ol-seat { padding: 2px 8px; gap: 8px; font-size: 14px; }
  .ol-seat em { font-size: 12px; }
  .ol-room .ol-actions { position: sticky; bottom: 0; padding-top: 4px; background: linear-gradient(rgba(243,228,196,0), #F3E4C4 30%); align-items: center; }
  .ol-room .ol-why { margin-top: 2px; font-size: 12px; }
}
