/* ===== Bổ sung cho bản ONLINE: hộp thoại vào lớp, điện thoại, trang chủ ===== */
.brand { text-decoration: none; color: inherit; }
.online-tag { font-size: 10px; letter-spacing: .09em; padding: 2px 7px; border-radius: 99px; background: #22c55e; color: #052e16; vertical-align: middle; margin-left: 4px; }
.pillbtn { border: 0; cursor: pointer; font-family: inherit; }
.pillbtn:hover { background: rgba(255,255,255,.2); }
.demobar { padding: 7px 16px; background: #fef3c7; color: #92400e; font-size: 12.5px; text-align: center; border-bottom: 1px solid #fcd34d; }
.file-row { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.mobseg { display: none; }
.qk { display: none; }
.logo.big { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.logo.big .i { width: 24px; height: 24px; }

/* hộp thoại vào lớp */
.joinalt { margin-top: -4px; display: flex; flex-direction: column; gap: 8px; }
.linkbtn { color: var(--blue); font: inherit; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-size: 13.5px; }
.linkbtn:hover { text-decoration: underline; }
.dlgwrap { position: fixed; inset: 0; background: rgba(8,20,36,.62); z-index: 200; display: grid; place-items: center; padding: 16px; overflow: auto; backdrop-filter: blur(3px); }
.joincard { background: #fff; border-radius: 18px; padding: 24px; width: min(540px, 100%); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.joincard .jt { display: flex; gap: 14px; align-items: center; }
.joincard h2 { margin: 0 0 2px; font-size: 22px; } .joincard p { margin: 0; color: var(--muted); font-size: 13.5px; }
.joincard .row2 { display: grid; grid-template-columns: 1fr 84px 96px; gap: 10px; }
.joincard .inp { width: 100%; } .inp.big { height: 48px; font-size: 18px; font-weight: 600; letter-spacing: .02em; }
.joinerr { padding: 10px 14px; background: var(--red-l); color: var(--red-d); border-radius: 8px; font-weight: 600; }
.jactions { display: flex; gap: 10px; flex-wrap: wrap; } .jactions .btn { flex: 1; justify-content: center; }
.btn.big { height: 46px; font-size: 15px; }
.jnote { font-size: 12.5px !important; }

@media (pointer: coarse), (max-width: 820px) {
  .qk { display: flex; gap: 6px; padding: 7px 8px; overflow-x: auto; background: #f1f5f9; border-top: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
  .qk button { flex: none; min-width: 42px; height: 40px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; font: 600 17px var(--mono); color: #1e293b; }
  .qk button:active { background: var(--blue-l); }
}

@media (max-width: 820px) {
  html, body { overscroll-behavior: none; }
  .app { height: 100vh; height: 100dvh; }
  .topbar { padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); }
  .b2 { display: none; } .b1 { font-size: 16px; } .logo { width: 34px; height: 34px; } .brand { gap: 9px; }
  .top-right { gap: 8px; } .top-right .lbl { display: none; }
  .pill { height: 30px; font-size: 12px; max-width: 46vw; } .pill #connTxt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .btn.light { padding: 0 10px; }

  .infobar { display: grid; grid-template-columns: 62px 1fr 74px 62px; gap: 8px; padding: 8px 10px; align-items: end; }
  .infobar .w-may, .infobar .w-name, .infobar .w-lop, .infobar .w-bai { width: auto; }
  .infobar .spacer { display: none; }
  .infobar .field > span { font-size: 10px; }
  .infobar .inp { height: 38px; padding: 0 8px; font-size: 15px; }
  .info-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
  .info-actions .btn { flex: 1; justify-content: center; height: 36px; }

  .mobseg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px 10px 0; background: var(--panel); border-bottom: 1px solid var(--line); }
  .mobseg button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; border: 0; background: none; font: 700 14px var(--sans); color: var(--muted); border-bottom: 3px solid transparent; position: relative; }
  .mobseg button.active { color: var(--blue); border-bottom-color: var(--blue); }
  .gdot2 { width: 8px; height: 8px; border-radius: 50%; background: var(--green); position: absolute; top: 6px; right: 22%; }

  .work { display: block; flex: 1; min-height: 0; padding: 8px; position: relative; }
  .work .pane { height: 100%; border-radius: 12px; }
  .work[data-view="code"] .pane-out { display: none; }
  .work[data-view="out"] .pane-code { display: none; }
  .splitter { display: none; }
  .hide-m, .pane-head .lbl { display: none; }
  #btnSubmit .lbl { display: inline; }
  .pane-head { padding: 6px 8px; gap: 6px; }
  .pane-head .btn { height: 38px; padding: 0 12px; }
  .pane-head .btn.small { height: 34px; }
  .tab span { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .console, .CodeMirror { font-size: var(--code-fs, 16px); }
  .statusbar { padding: 0 10px; gap: 10px; height: auto; min-height: 26px; flex-wrap: wrap; padding-bottom: env(safe-area-inset-bottom); }
  #stPos, #stVer, #stSub { display: none; }
  .credit { font-size: 10.5px; }
  #toasts { right: 10px; left: 10px; bottom: 70px; } .toast { max-width: none; }
  .drawer { width: 100%; max-width: 100%; }
  .joincard { padding: 18px; } .joincard .row2 { grid-template-columns: 1fr 1fr; } .joincard .row2 .field:first-child { grid-column: 1 / -1; }
}
