mobux 0.1.0

A touch-friendly tmux web UI for unhinged people who run terminal sessions from their phone while walking the dog
:root {
  --bg: #0f1115;
  --panel: #171a21;
  --text: #e6e9ef;
  --muted: #8b93a7;
  --primary: #4f8cff;
  --danger: #ff6b6b;
  --border: #2a2f3b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 16px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 12px;
  padding: 14px;
}

.error {
  color: #ffd0d0;
  border-color: #803636;
}

h1, h2, h3 { margin: 0 0 8px 0; }
.hint { color: var(--muted); margin: 8px 0 0; }

#newSessionForm {
  display: flex;
  gap: 8px;
}

input {
  flex: 1;
  background: #0d0f13;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 18px;
}

.session-list {
  display: grid;
  gap: 10px;
}

.session-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.session-head h3 { margin-bottom: 4px; }
.meta { color: var(--muted); font-size: 16px; }
.actions { display: flex; gap: 8px; }

.btn {
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  background: #151925;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 18px;
  cursor: pointer;
  touch-action: manipulation;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.danger {
  border-color: #6e3030;
  color: #ffb8b8;
}

.term-body {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

#terminal {
  flex: 1;
  width: 100%;
  padding: 6px;
  min-height: 0;
  overflow: hidden;
}

#loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--muted);
  font-size: 18px;
}

#touchOverlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  touch-action: none;
  /* transparent to mouse so wheel/click go straight to xterm */
  pointer-events: none;
}

.term-toolbar {
  display: none;
}

.tb-btn {
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  background: var(--bg);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 16px;
  cursor: pointer;
  touch-action: manipulation;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tb-btn:active {
  background: var(--border);
}

.tb-exit {
  margin-left: auto;
  border-color: #6e3030;
  color: #ffb8b8;
}

.tb-label {
  color: var(--muted);
  font-size: 13px;
  min-width: 40px;
  text-align: center;
}

/* ── Tmux command pick list ─────────────────────────────── */

#cmdPickList {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
  max-height: 70dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
  animation: slideUp 0.2s ease-out;
}

#cmdPickList.visible {
  display: block;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.cmd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.cmd-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.cmd-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  touch-action: manipulation;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 17px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.cmd-item:active {
  background: var(--border);
}

.cmd-item .cmd-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.cmd-item .cmd-label {
  flex: 1;
}

.cmd-item .cmd-desc {
  color: var(--muted);
  font-size: 13px;
}

.cmd-separator {
  height: 1px;
  background: var(--border);
  margin: 4px 16px;
}

#cmdOverlayBg {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99;
  background: rgba(0,0,0,0.4);
}

#cmdOverlayBg.visible {
  display: block;
}

@media (max-width: 620px) {
  .container { padding: 12px; }
  .actions { width: 100%; }
  .session-card { flex-direction: column; align-items: stretch; }
  .actions > * { flex: 1; text-align: center; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }
  .btn { padding: 14px 16px; min-height: 48px; }
  .panel { padding: 16px; }
  .hint { font-size: 16px; }
}