/* คำสั่ง 54 / 55 ข้อ A — ป๊อปอัปฝาขาด (lid-short-popup.js) · มือถือ = แผ่นเลื่อนขึ้นจากล่าง (แบบป๊อปอัปติดลบ คำสั่ง 50)
   · จอ ≥ 700px = กล่องกลางจอ กว้าง ~460px · สูงตามเนื้อหา */

/* ป้าย "✗ ขาด" ในตารางงานของกล่องแก้วพร้อมสกรีน: กดได้ (เมาส์รูปมือ) · พื้นที่กดสูง 44px โดยไม่ขยายตัวหนังสือ/แถว */
.sq-top .sq-ready-lid.short[data-lid-short] {
  position: relative;
  cursor: pointer;
}

.sq-top .sq-ready-lid.short[data-lid-short]::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -8px;
  left: -8px;
  height: 44px;
  transform: translateY(-50%);
}

html.lsp-lock,
html.lsp-lock body {
  overflow: hidden;
}

.lsp-modal {
  position: fixed;
  z-index: 9500;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(17, 12, 8, 0.52);
}

.lsp-modal.open {
  display: flex;
}

.lsp-sheet {
  box-sizing: border-box;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #fff;
  color: #1f2937;
  font-family: 'Anuphan', sans-serif;
}

.lsp-grab {
  width: 44px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 99px;
  background: #d6d3d1;
}

.lsp-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.lsp-head-text {
  flex: 1;
  min-width: 0;
}

.lsp-title {
  color: #1f2937;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.lsp-sub {
  margin-top: 3px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.lsp-x {
  flex: none;
  width: 40px;
  height: 40px;
  margin: -6px -6px 0 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
  font-size: 20px;
  cursor: pointer;
}

.lsp-x:hover {
  background: #f3f4f6;
}

.lsp-label {
  margin: 0 0 8px;
  color: #b91c1c;
  font-size: 13.5px;
  font-weight: 800;
}

.lsp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px 16px;
  border: 1px solid #f5c2c2;
  border-radius: 14px;
  background: #fdecec;
}

.lsp-lid {
  flex: 1;
  min-width: 0;
}

.lsp-lid-code {
  color: #1f2937;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.lsp-lid-name {
  margin-top: 1px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.lsp-short {
  flex: none;
  color: #b91c1c;
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}

@media (min-width: 700px) {
  .lsp-modal {
    align-items: center;
    padding: 24px;
  }

  .lsp-sheet {
    max-width: 460px;
    max-height: 86vh;
    padding: 20px 22px 16px;
    border-radius: 22px;
  }

  .lsp-grab {
    display: none;
  }
}
