.mobl-lb-layer {
  --lb-panel: rgba(7, 26, 48, 0.96);
  --lb-card: rgba(31, 50, 76, 0.96);
  --lb-button: #4b5260;
  --lb-text: #f8fbff;
  --lb-muted: #b8c6da;
  --lb-line: rgba(201, 226, 255, 0.22);
  --lb-accent: #f0c933;
  position: absolute;
  inset: 0;
  z-index: 5;
  color: var(--lb-text);
  font-family: "Noto Sans", system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
  pointer-events: none;
}

.mobl-lb-layer[hidden] { display: none; }
.mobl-lb-layer *, .mobl-lb-layer *::before, .mobl-lb-layer *::after {
  box-sizing: border-box;
}

.mobl-lb-terminal-card {
  position: absolute;
  left: 12%;
  top: 31%;
  width: 31%;
  min-height: 31%;
  padding: clamp(16px, 2.2vw, 38px);
  border: 1px solid rgba(210, 231, 255, 0.15);
  border-radius: 18px;
  background: rgba(6, 24, 45, 0.94);
  box-shadow: 0 20px 60px rgba(0, 8, 20, 0.32);
  text-align: center;
  pointer-events: auto;
}

.mobl-lb-terminal-card h1, .mobl-lb-header h1 {
  margin: 0;
  color: var(--lb-text);
  font-size: clamp(24px, 3vw, 52px);
  line-height: 1;
  letter-spacing: 0.02em;
}

.mobl-lb-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4em;
  margin: 1.25em 0;
  color: var(--lb-muted);
  font-size: clamp(12px, 1.2vw, 21px);
}

.mobl-lb-result strong { color: var(--lb-text); font-size: 1.4em; }
.mobl-lb-name-label { display: block; color: var(--lb-muted); text-align: left; }
.mobl-lb-name {
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  padding: 8px 14px;
  border: 2px solid rgba(205, 227, 255, 0.36);
  border-radius: 10px;
  outline: none;
  background: rgba(243, 248, 255, 0.96);
  color: #0b2038;
  font: 700 clamp(20px, 2vw, 34px)/1 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: none;
  -webkit-user-select: text;
  user-select: text;
}
.mobl-lb-name:focus { border-color: var(--lb-accent); }
.mobl-lb-name[aria-invalid=true] { border-color: #ef6572; }
.mobl-lb-hint { min-height: 1.4em; margin: 5px 0 8px; color: #ffb4bc; font-size: 12px; }

.mobl-lb-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mobl-lb-actions-stack { grid-template-columns: 1fr; }
.mobl-lb-button {
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--lb-button);
  color: var(--lb-text);
  font: 700 clamp(13px, 1.2vw, 22px)/1 system-ui, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  touch-action: manipulation;
}
.mobl-lb-button:hover, .mobl-lb-button:focus-visible { background: #616b7c; }
.mobl-lb-button:active { transform: translateY(1px); }
.mobl-lb-button:disabled { cursor: default; opacity: 0.42; transform: none; }
.mobl-lb-primary { background: var(--lb-accent); color: #182131; }
.mobl-lb-primary:hover, .mobl-lb-primary:focus-visible { background: #ffe069; }
.mobl-lb-pending-note { color: var(--lb-accent); font-weight: 700; }

.mobl-lb-panel {
  position: absolute;
  left: 55.2%;
  right: 2.7%;
  top: 5.6%;
  bottom: 5.6%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(210, 231, 255, 0.14);
  border-radius: 16px;
  background: var(--lb-panel);
  box-shadow: 0 20px 60px rgba(0, 8, 20, 0.32);
  pointer-events: auto;
}
.mobl-lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 14px;
}
.mobl-lb-header h1 { font-size: clamp(24px, 2.5vw, 46px); }
.mobl-lb-status { margin: 8px 0 0; color: var(--lb-muted); font-size: 12px; letter-spacing: 0.08em; }
.mobl-lb-close { min-width: 96px; }
.mobl-lb-columns, .mobl-lb-row {
  display: grid;
  grid-template-columns: 38px 30px minmax(74px, 1fr) 92px minmax(78px, 0.85fr);
  align-items: center;
  gap: 8px;
}
.mobl-lb-columns {
  padding: 8px 24px;
  border-top: 1px solid var(--lb-line);
  border-bottom: 1px solid var(--lb-line);
  color: var(--lb-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.mobl-lb-columns > :first-child,
.mobl-lb-columns > :nth-child(4) { text-align: right; }
.mobl-lb-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(210, 231, 255, 0.35) transparent;
  -webkit-overflow-scrolling: touch;
}
.mobl-lb-row {
  width: 100%;
  min-height: 50px;
  padding: 7px 24px;
  border: 0;
  border-bottom: 1px solid rgba(201, 226, 255, 0.10);
  border-radius: 0;
  background: transparent;
  color: var(--lb-text);
  font: 650 clamp(12px, 1vw, 18px)/1.2 system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}
.mobl-lb-row:hover, .mobl-lb-row:focus-visible { background: rgba(255, 255, 255, 0.08); }
.mobl-lb-row.is-selected { background: rgba(240, 201, 51, 0.18); outline: 2px solid var(--lb-accent); outline-offset: -2px; }
.mobl-lb-row.is-player { color: #fff0a6; }
.mobl-lb-row.is-pending { background: rgba(240, 201, 51, 0.10); opacity: 1; }
.mobl-lb-position { color: var(--lb-muted); text-align: right; }
.mobl-lb-flag { width: 28px; height: 21px; object-fit: cover; border-radius: 2px; }
.mobl-lb-player { overflow: hidden; text-overflow: ellipsis; }
.mobl-lb-time { font-variant-numeric: tabular-nums; text-align: right; }
.mobl-lb-seed { overflow: hidden; color: var(--lb-muted); font-variant-numeric: tabular-nums; text-overflow: ellipsis; }
.mobl-lb-empty { margin: 40px 24px; color: var(--lb-muted); text-align: center; }
.mobl-lb-own-divider { margin: 0; padding: 10px 24px; color: var(--lb-accent); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.mobl-lb-footer {
  display: grid;
  grid-template-columns: minmax(128px, 0.3fr) 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--lb-line);
}
.mobl-lb-footer p { margin: 0; color: var(--lb-muted); font-size: 10px; line-height: 1.35; }
#mobl-turnstile { grid-column: 1 / -1; min-height: 0; pointer-events: auto; }

@media (orientation: portrait) {
  .mobl-lb-terminal-card {
    left: 16.5%;
    top: 23%;
    width: 67%;
    min-height: 25%;
    padding: clamp(18px, 5vw, 34px);
  }
  .mobl-lb-terminal-card h1 { font-size: clamp(26px, 9vw, 48px); }
  .mobl-lb-result { font-size: clamp(12px, 3.3vw, 18px); }
  .mobl-lb-actions { grid-template-columns: 1fr; }
  .mobl-lb-panel {
    inset: 0;
    border: 0;
    border-radius: 0;
  }
  .mobl-lb-header { padding: max(14px, env(safe-area-inset-top)) 12px 10px; }
  .mobl-lb-header h1 { font-size: clamp(23px, 8vw, 42px); }
  .mobl-lb-close { min-width: 82px; }
  .mobl-lb-columns, .mobl-lb-row {
    grid-template-columns: 30px 24px minmax(60px, 1fr) 78px minmax(62px, 0.85fr);
    gap: 5px;
  }
  .mobl-lb-columns { padding: 7px 10px; font-size: 9px; }
  .mobl-lb-row { min-height: 48px; padding: 6px 10px; font-size: clamp(10px, 3.2vw, 16px); }
  .mobl-lb-flag { width: 24px; height: 18px; }
  .mobl-lb-footer {
    grid-template-columns: minmax(112px, 0.42fr) 1fr;
    padding: 10px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom));
  }
  .mobl-lb-footer p { font-size: 9px; }
}

@media (max-width: 420px) and (orientation: portrait) {
  .mobl-lb-seed { font-size: 9px; }
  .mobl-lb-terminal-card { top: 22%; }
}
